[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
configure find wrong python path
From: |
Karl Hammar |
Subject: |
configure find wrong python path |
Date: |
Wed, 24 May 2006 23:51:01 +0200 |
Given:
$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root 9 May 24 15:51 /usr/bin/python -> python2.3
-rwxr-xr-x 1 root root 958764 Mar 6 11:32 /usr/bin/python2.3
-rwxr-xr-x 1 root root 1024460 Apr 23 01:34 /usr/bin/python2.4
configure will report wrong path of python:
$ ./configure
...
checking for bash... /bin/sh
checking for python... python
checking python version... 2.3.5
checking for python... /usr/bin/python
checking for gcc... gcc
...
checking New Century Schoolbook PFB files... /usr/share/fonts/type...
checking for python... /usr/bin/python
checking /usr/bin/python version... 2.3.5
python
checking python version... 2.3.5
python2
python2.4
checking python2.4 version... 2.4
checking for python2.4... (cached) /usr/bin/python
checking gcc version... 4.0.3
...
$ make
...
import subprocess
ImportError: No module named subprocess
make[2]: *** [out/lilypond.nexi] Error 1
make[2]: Leaving directory
`/home/karl/most/music/lilypond/head/Documentation/user'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/karl/most/music/lilypond/head/Documentation'
make: *** [all] Error 2
$
STEPMAKE_PYTHON is run twice during configure:
STEPMAKE_PYTHON(REQUIRED, 1.5)
configure.in line 15: STEPMAKE_INIT() ->
stepmake/aclocal.m4 line 755
and
STEPMAKE_PYTHON(REQUIRED, 2.4)
configure.in line 87.
STEPMAKE_PYTHON() calls
AC_PATH_PROG() which calls
AC_CACHE_VAL([ac_cv_path_$1], ... )
The second time AC_PATH_PROG() takes path from cache as seen in
configure trace above.
Since STEPMAKE_PYTHON() have a second argument (req. version)
and the cache don't know of versions, one should clear the cache when
seraching for a new python path.
Attached patch corrects the error above.
* stepmake/aclocal.m4: STEPMAKE_PYTHON(): clear cached value
since arg 2 might point us to a new binary
Regards
/Karl
diff
Description: diff
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- configure find wrong python path,
Karl Hammar <=