From: Joel Brobecker <brobecker@adacore.com>
To: dje@google.com
Cc: gdb-patches@sourceware.org, eliz@gnu.org
Subject: Re: GDB 7.4 --with-python doesn't like d:/foo/bar
Date: Fri, 27 Jan 2012 05:34:00 -0000 [thread overview]
Message-ID: <20120127052515.GW31383@adacore.com> (raw)
In-Reply-To: <E1RqJbR-00068v-M2@fencepost.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1809 bytes --]
Hi Doug,
> GDB 7.4 cannot be configured using --with-python-d:/foo/bar on
> MS-Windows. The gdb/configure script aborts with an error message:
>
> checking whether to use python... d:/usr/python26
> configure: error: invalid value for --with-python
>
> The culprit is this snippet from gdb/configure.ac:
>
> if test "${with_python}" = no; then
> AC_MSG_WARN([python support disabled; some features may be unavailable.])
> have_libpython=no
> else
> case "${with_python}" in
> /*) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> if test -d ${with_python}; then
> # Assume the python binary is ${with_python}/bin/python.
[...]
> As can be clearly seen, it only accepts absolute file names that begin
> with a forward slash.
>
> I don't have Autoconf installed on the Windows/MinGW machine where I
> did this (thus no patch), so I manually edited gdb/configure to
> replace the line marked above with
>
> [\\/]* | [A-Za-z]:[\\/]*)
>
> Then the configure and build steps ran successfully to completion.
>
> Since (AFAIK) [] is a quote sequence in Autoconf, could someone please
> make the appropriate change in configure.ac to fix this?
I can make the change for Eli sometime this weekend. Would it be OK
with you?
To me, the change would not be completely correct on Unix hosts,
but I think that the chances of someone calling a local directory
a single-letter followed by a colon are very small. So I think
it's OK.
I changed the expressions a bit replacing "[\\/]*" back into just "/"
as originally used. Eli, would that still work for you?
gdb/ChangeLog:
* configure.ac (--with-python): Directory names starting
with a letter followed by a colon are treated as non-relative.
Not tested yet (that part will have to wait for the weekend).
--
Joel
[-- Attachment #2: config-python-windows.diff --]
[-- Type: text/x-diff, Size: 413 bytes --]
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 6f9a42c..2154574 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -734,7 +734,7 @@ if test "${with_python}" = no; then
have_libpython=no
else
case "${with_python}" in
- /*)
+ /* | [A-Za-z]:/* )
if test -d ${with_python}; then
# Assume the python binary is ${with_python}/bin/python.
python_prog="${with_python}/bin/python"
next prev parent reply other threads:[~2012-01-27 5:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-26 7:31 Eli Zaretskii
2012-01-27 5:34 ` Joel Brobecker [this message]
2012-01-27 10:02 ` Eli Zaretskii
2012-01-27 11:49 ` Joel Brobecker
2012-01-27 19:01 ` Doug Evans
2012-01-27 20:32 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120127052515.GW31383@adacore.com \
--to=brobecker@adacore.com \
--cc=dje@google.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox