GDB 7.4 --with-python doesn't like d:/foo/bar
Joel Brobecker
brobecker@adacore.com
Fri Jan 27 05:34:00 GMT 2012
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config-python-windows.diff
Type: text/x-diff
Size: 413 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120127/a88a9d55/attachment.bin>
More information about the Gdb-patches
mailing list