* configure: error: no usable python found
@ 2010-03-03 11:38 Anton Kunze
2010-03-03 11:54 ` Joel Brobecker
2010-03-03 12:11 ` Andreas Schwab
0 siblings, 2 replies; 12+ messages in thread
From: Anton Kunze @ 2010-03-03 11:38 UTC (permalink / raw)
To: gdb
Hello,
I try to compile gdb 7.0.1 with python on suse linux, but I get this
error message ("no usable python found").
1. I build python in folder "/usr/lib/Python-2.6.4" with "./configure --enable-shared" and "make"
2. I compile gdb with "./configure --with-python=/usr/lib/Python-2.6.4" and "make"
3. I get this message on the end:
checking whether to use python... /usr/lib/Python-2.6.4
checking for python2.6... no
checking for python2.5... no
checking for python2.4... no
configure: error: no usable python found at /usr/lib/Python-2.6.4
Files on /usr/lib/Python-2.6.4:
drwxr-xr-x 5 root root 4096 1. MÀr 18:22 build
-rw-r--r-- 1 root root 329565 2. MÀr 10:54 config.log
-rwxr-xr-x 1 root root 44843 2. MÀr 10:54 config.status
-rwxr-xr-x 1 root root 684664 29. Sep 15:01 configure
-rw-r--r-- 1 root root 109668 29. Sep 15:01 configure.in
drwxr-xr-x 23 root root 4096 26. Okt 02:49 Demo
drwxr-xr-x 16 root root 4096 26. Okt 02:56 Doc
drwxr-xr-x 2 root root 4096 26. Okt 02:49 Grammar
drwxr-xr-x 2 root root 4096 26. Okt 02:49 Include
-rwxr-xr-x 1 root root 7122 14. Jun 2003 install-sh
drwxr-xr-x 44 root root 12288 2. MÀr 10:55 Lib
lrwxrwxrwx 1 root root 36 2. MÀr 09:31 libpython2.6 ->
/usr/lib/Python-2.6.4/libpython2.6.a
-rw-r--r-- 1 root root 5803312 2. MÀr 10:55 libpython2.6.a
-rwxr-xr-x 2 root root 4196759 2. MÀr 10:55 libpython2.6.so
-rwxr-xr-x 2 root root 4196759 2. MÀr 10:55 libpython2.6.so.1.0
-rwxr-xr-x 1 root root 4196759 2. MÀr 10:55 libpython.so
-rw-r--r-- 1 root root 13925 3. Jan 2009 LICENSE
drwxr-xr-x 11 root root 4096 26. Okt 02:49 Mac
-rw-r--r-- 1 root root 42353 2. MÀr 10:54 Makefile
-rw-r--r-- 1 root root 39204 2. MÀr 10:54 Makefile.pre
-rw-r--r-- 1 root root 39091 24. Sep 21:22 Makefile.pre.in
drwxr-xr-x 5 root root 4096 26. Okt 02:49 Misc
drwxr-xr-x 8 root root 4096 2. MÀr 10:55 Modules
drwxr-xr-x 3 root root 4096 2. MÀr 10:55 Objects
drwxr-xr-x 2 root root 4096 2. MÀr 10:55 Parser
drwxr-xr-x 10 root root 4096 26. Okt 02:49 PC
drwxr-xr-x 2 root root 4096 26. Okt 02:49 PCbuild
-rw-r--r-- 1 root root 30962 2. MÀr 10:54 pyconfig.h
-rw-r--r-- 1 root root 29522 4. Mai 2009 pyconfig.h.in
-rwxr-xr-x 1 root root 11370 2. MÀr 10:55 python
drwxr-xr-x 2 root root 4096 2. MÀr 10:55 Python
-rw-r--r-- 1 root root 54933 26. Okt 02:48 README
drwxr-xr-x 5 root root 4096 26. Okt 02:49 RISCOS
-rw-r--r-- 1 root root 83097 8. Okt 11:48 setup.py
drwxr-xr-x 20 root root 4096 26. Okt 02:49 Tools
I'am perplexed
best regards
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: configure: error: no usable python found
2010-03-03 11:38 configure: error: no usable python found Anton Kunze
@ 2010-03-03 11:54 ` Joel Brobecker
2010-03-03 12:54 ` Chris Sutcliffe
2010-03-03 12:11 ` Andreas Schwab
1 sibling, 1 reply; 12+ messages in thread
From: Joel Brobecker @ 2010-03-03 11:54 UTC (permalink / raw)
To: Anton Kunze; +Cc: gdb
> checking whether to use python... /usr/lib/Python-2.6.4
> checking for python2.6... no
> checking for python2.5... no
> checking for python2.4... no
> configure: error: no usable python found at /usr/lib/Python-2.6.4
I'd recommend that you check the gdb/config.log file. Somewhere
close to the end, before configure dumped its entire environment,
you should see the compile check that was used to check for python2.6,
and the error that caused configure discard to 2.6 python install.
--
Joel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: configure: error: no usable python found
2010-03-03 11:54 ` Joel Brobecker
@ 2010-03-03 12:54 ` Chris Sutcliffe
2010-03-03 16:06 ` Tom Tromey
0 siblings, 1 reply; 12+ messages in thread
From: Chris Sutcliffe @ 2010-03-03 12:54 UTC (permalink / raw)
To: gdb
On 3 March 2010 06:54, Joel Brobecker wrote:
>> checking whether to use python... /usr/lib/Python-2.6.4
>> checking for python2.6... no
>> checking for python2.5... no
>> checking for python2.4... no
>> configure: error: no usable python found at /usr/lib/Python-2.6.4
>
> I'd recommend that you check the gdb/config.log file. Somewhere
> close to the end, before configure dumped its entire environment,
> you should see the compile check that was used to check for python2.6,
> and the error that caused configure discard to 2.6 python install.
I'm having a similar issue trying to build gdb for MinGW using MSYS
with Python support. I have the official Python 2.6.4 windows version
installed at C:\Python26, which I have mounted at /python within my
MSYS shell. I configured gdb with 'configure --with-python=/python'.
Looking at the config.log file I see:
| #include "python2.6/Python.h"
| int
| main ()
| {
| Py_Initialize ();
| ;
| return 0;
| }
Which is why it's failing, given that Python.h is in /python/include/.
Is there a way to override where configure is looking for Python.h?
Thank you,
Chris
--
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: configure: error: no usable python found
2010-03-03 12:54 ` Chris Sutcliffe
@ 2010-03-03 16:06 ` Tom Tromey
2010-03-03 16:25 ` Chris Sutcliffe
0 siblings, 1 reply; 12+ messages in thread
From: Tom Tromey @ 2010-03-03 16:06 UTC (permalink / raw)
To: Chris Sutcliffe; +Cc: gdb
>>>>> "Chris" == Chris Sutcliffe <ir0nh34d@gmail.com> writes:
Chris> I configured gdb with 'configure --with-python=/python'.
Chris> Looking at the config.log file I see:
Chris> | #include "python2.6/Python.h"
Chris> | int
Chris> | main ()
Chris> | {
Chris> | Py_Initialize ();
Chris> | ;
Chris> | return 0;
Chris> | }
Could you also paste the command line?
Chris> Which is why it's failing, given that Python.h is in /python/include/.
Chris> Is there a way to override where configure is looking for Python.h?
--with-python supposedly changes the includes:
case "${with_python}" in
[...]
/*)
python_includes="-I${with_python}/include"
python_libs="-L${with_python}/lib"
;;
[...]
CPPFLAGS="$CPPFLAGS ${python_includes}"
Tom
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: configure: error: no usable python found
2010-03-03 16:06 ` Tom Tromey
@ 2010-03-03 16:25 ` Chris Sutcliffe
2010-03-03 16:27 ` Tom Tromey
0 siblings, 1 reply; 12+ messages in thread
From: Chris Sutcliffe @ 2010-03-03 16:25 UTC (permalink / raw)
To: gdb
> Could you also paste the command line?
The full command line I used was:
$ ../gdb-7.0.90.20100303/configure \
--host=mingw32 \
--target=mingw32 \
--build=mingw32 \
--with-python=/python 1>out.txt 2>err.txt
$ make
Chris
--
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: configure: error: no usable python found
2010-03-03 16:25 ` Chris Sutcliffe
@ 2010-03-03 16:27 ` Tom Tromey
2010-03-03 16:54 ` Chris Sutcliffe
0 siblings, 1 reply; 12+ messages in thread
From: Tom Tromey @ 2010-03-03 16:27 UTC (permalink / raw)
To: Chris Sutcliffe; +Cc: gdb
>>>>> "Chris" == Chris Sutcliffe <ir0nh34d@gmail.com> writes:
Tom> Could you also paste the command line?
Chris> The full command line I used was:
Sorry, I wasn't clear.
I meant the command line used to compile the test program, from config.log.
Tom
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: configure: error: no usable python found
2010-03-03 16:27 ` Tom Tromey
@ 2010-03-03 16:54 ` Chris Sutcliffe
2010-03-03 19:03 ` Tom Tromey
0 siblings, 1 reply; 12+ messages in thread
From: Chris Sutcliffe @ 2010-03-03 16:54 UTC (permalink / raw)
To: gdb
> Tom> Could you also paste the command line?
> Chris> The full command line I used was:
>
> Sorry, I wasn't clear.
> I meant the command line used to compile the test program, from config.log.
configure:9438: checking whether to use python
configure:9440: result: /python
configure:9474: checking for python2.6
configure:9489: mingw32-gcc -o conftest.exe -g -O2
-D__USE_MINGW_ACCESS -I/python/include -Wl,--stack,8388608
conftest.c -lm -L/python/lib -lpython2.6 >&5
conftest.c:46:30: error: python2.6/Python.h: No such file or directory
configure:9489: $? = 1
So the include path supplied is correct, however the library path is
wrong, it should be /python/libs (not /python/lib).
| #include "python2.6/Python.h"
This is incorrect though, it should just be '#include "Python.h"'. Is
perhaps the win32 distribution of Python significantly different in
directory structure compared to the 'nix distribution directory
structure?
Chris
--
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: configure: error: no usable python found
2010-03-03 16:54 ` Chris Sutcliffe
@ 2010-03-03 19:03 ` Tom Tromey
2010-03-04 2:23 ` Chris Sutcliffe
0 siblings, 1 reply; 12+ messages in thread
From: Tom Tromey @ 2010-03-03 19:03 UTC (permalink / raw)
To: Chris Sutcliffe; +Cc: gdb
>>>>> "Chris" == Chris Sutcliffe <ir0nh34d@gmail.com> writes:
Chris> conftest.c:46:30: error: python2.6/Python.h: No such file or directory
Chris> So the include path supplied is correct, however the library path is
Chris> wrong, it should be /python/libs (not /python/lib).
Chris> | #include "python2.6/Python.h"
Chris> This is incorrect though, it should just be '#include "Python.h"'. Is
Chris> perhaps the win32 distribution of Python significantly different in
Chris> directory structure compared to the 'nix distribution directory
Chris> structure?
I don't know; I have never looked at it. If you could come up with a
configure patch that works for Windows, without breaking Linux, that
would be helpful. I can test it on Linux for you, if that would help.
Tom
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: configure: error: no usable python found
2010-03-03 19:03 ` Tom Tromey
@ 2010-03-04 2:23 ` Chris Sutcliffe
2010-03-04 21:45 ` Tom Tromey
0 siblings, 1 reply; 12+ messages in thread
From: Chris Sutcliffe @ 2010-03-04 2:23 UTC (permalink / raw)
To: gdb
> I don't know; I have never looked at it. If you could come up with a
> configure patch that works for Windows, without breaking Linux, that
> would be helpful. I can test it on Linux for you, if that would help.
I've hacked the configure script to allow for Python support under
Windows, but the source itself is also going to need some fixing up.
I'm working on making the configure script play a little nicer for
both Linux and Windows, but I'm a little stumped on how to make
somethings conditional. The code check itself is fairly straight
forward:
#include "${version}/Python.h"
becomes:
#ifdef WIN32
#include "Python.h"
#else
#include "${version}/Python.h"
#endif
what I'm unclear on is how to make (line 9470):
version=python2.6
conditional on Windows to be:
version=python26
and similarly (line 9456):
python_libs="-L${with_python}/lib"
to conditionally be:
python_libs="-L${with_python}/libs"
on Windows.
Any pointers here would be greatly appreciated.
Thank you,
Chris
--
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: configure: error: no usable python found
2010-03-04 2:23 ` Chris Sutcliffe
@ 2010-03-04 21:45 ` Tom Tromey
0 siblings, 0 replies; 12+ messages in thread
From: Tom Tromey @ 2010-03-04 21:45 UTC (permalink / raw)
To: Chris Sutcliffe; +Cc: gdb
>>>>> "Chris" == Chris Sutcliffe <ir0nh34d@gmail.com> writes:
Chris> I've hacked the configure script to allow for Python support under
Chris> Windows, but the source itself is also going to need some fixing up.
Chris> what I'm unclear on is how to make (line 9470):
Chris> version=python2.6
Chris> conditional on Windows to be:
Chris> version=python26
You'll want to change configure.ac, not configure.
One idea would be to change AC_TRY_LIBPYTHON to try both forms, by
removing the "."; or look at $host_os. There are other examples of the
latter in the code.
Chris> and similarly (line 9456):
Chris> python_libs="-L${with_python}/lib"
Chris> to conditionally be:
Chris> python_libs="-L${with_python}/libs"
Chris> on Windows.
Examining $host_os seems reasonable here.
Tom
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: configure: error: no usable python found
2010-03-03 11:38 configure: error: no usable python found Anton Kunze
2010-03-03 11:54 ` Joel Brobecker
@ 2010-03-03 12:11 ` Andreas Schwab
2010-03-03 13:32 ` Anton Kunze
1 sibling, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2010-03-03 12:11 UTC (permalink / raw)
To: Anton Kunze; +Cc: gdb
Anton Kunze <ak@technosis.de> writes:
> 1. I build python in folder "/usr/lib/Python-2.6.4" with "./configure --enable-shared" and "make"
You run make install then.
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: configure: error: no usable python found
2010-03-03 12:11 ` Andreas Schwab
@ 2010-03-03 13:32 ` Anton Kunze
0 siblings, 0 replies; 12+ messages in thread
From: Anton Kunze @ 2010-03-03 13:32 UTC (permalink / raw)
Cc: gdb
Hello Andreas,
after "make install" in python folder and a new "configure" and "make"
in gdb it works fine. :-)
best regards
Andreas Schwab schrieb:
> Anton Kunze <ak@technosis.de> writes:
>
>
>> 1. I build python in folder "/usr/lib/Python-2.6.4" with "./configure --enable-shared" and "make"
>>
>
> You run make install then.
>
> Andreas.
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-03-04 21:45 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 11:38 configure: error: no usable python found Anton Kunze
2010-03-03 11:54 ` Joel Brobecker
2010-03-03 12:54 ` Chris Sutcliffe
2010-03-03 16:06 ` Tom Tromey
2010-03-03 16:25 ` Chris Sutcliffe
2010-03-03 16:27 ` Tom Tromey
2010-03-03 16:54 ` Chris Sutcliffe
2010-03-03 19:03 ` Tom Tromey
2010-03-04 2:23 ` Chris Sutcliffe
2010-03-04 21:45 ` Tom Tromey
2010-03-03 12:11 ` Andreas Schwab
2010-03-03 13:32 ` Anton Kunze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox