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
Index: stepmake/aclocal.m4 =================================================================== RCS file: /sources/lilypond/lilypond/stepmake/aclocal.m4,v retrieving revision 1.168 diff -u -r1.168 aclocal.m4 --- stepmake/aclocal.m4 3 May 2006 20:30:59 -0000 1.168 +++ stepmake/aclocal.m4 24 May 2006 21:18:50 -0000 @@ -994,6 +994,8 @@ if test -n "$pv"; then STEPMAKE_ADD_ENTRY($1, $pv) fi + # clear cached value since arg 2 might point us to a new binary + unset ac_cv_path_PYTHON AC_PATH_PROG(PYTHON, $PYTHON) AC_SUBST(PYTHON) ])
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel