Re: problem with AM_PATH_PYTHON
On 10/26/2012 07:30 PM, Stefano Lattarini wrote: > [Re-adding Václav in CC, please don't drop it in the future] > > On 10/26/2012 06:47 PM, Robert Boehne wrote: >> On 10/26/12 09:04, Stefano Lattarini wrote: >> >> [SNIP] >> >>> This doesn't look like output from the Automake-provided AM_PATH_PYTHON >>> macro... >> That is because it's coming from this line in AX_SWIG_PYTHON in the >> autoconf-archive. >> >> AC_REQUIRE([AX_PYTHON_DEVEL]) I can confirm this is the root of the evil. Inlining the macro without the AC_REQUIRE() makes it work for me in both native and cross compilation cases. Thank you for spotting this! >> > Ah, that makes sense. Thanks for the explanation. > > So this is neither an autoconf nor an automake problem in the end, > but an "autoconf-archive" one. Indeed. > > Václav, you should probably find out which project/person is the > author of the AX_PYTHON_DEVEL and/or AX_SWIG_PYTHON macros, and > report the issue to them. Will do. Thank you for the support, both of you. -- VZ signature.asc Description: OpenPGP digital signature
Re: problem with AM_PATH_PYTHON
[Re-adding Václav in CC, please don't drop it in the future] On 10/26/2012 06:47 PM, Robert Boehne wrote: > On 10/26/12 09:04, Stefano Lattarini wrote: > > [SNIP] > >> This doesn't look like output from the Automake-provided AM_PATH_PYTHON >> macro... > > That is because it's coming from this line in AX_SWIG_PYTHON in the > autoconf-archive. > > AC_REQUIRE([AX_PYTHON_DEVEL]) > Ah, that makes sense. Thanks for the explanation. So this is neither an autoconf nor an automake problem in the end, but an "autoconf-archive" one. Václav, you should probably find out which project/person is the author of the AX_PYTHON_DEVEL and/or AX_SWIG_PYTHON macros, and report the issue to them. Regards, Stefano
Re: problem with AM_PATH_PYTHON
On 10/26/12 09:04, Stefano Lattarini wrote: Hi Václav, sorry for the delay. On 10/15/2012 09:07 PM, Václav Zeman wrote: Hi. I am having a problem with AM_PATH_PYTHON. I have this in my configure.ac: AS_IF([test "x$with_python" = "xyes"], [AM_PATH_PYTHON([2.3], [:], [:]) AX_SWIG_PYTHON AC_CONFIG_FILES([swig/python/Makefile])]) The problem is that when I am cross compiling it ignores the if-block and puts the code of AM_PATH_PYTHON outside. The configure process then breaks like this: configure: WARNING: using cross tools not prefixed with host triplet checking pkg-config is at least version 0.9.0... yes checking for python... /usr/bin/python checking for a version of Python >= '2.1.0'... yes checking for the distutils Python package... yes checking for Python include path... -I/usr/include/python2.7 checking for Python library path... -L/usr/lib -lpython2.7 checking for Python site-packages path... /usr/lib/python2.7/dist-packages checking python extra libraries... -lssl -lcrypto -lssl -lcrypto \ -L/usr/lib -lz -lpthread -ldl -lutil checking python extra linking flags... -Xlinker -export-dynamic -Wl,-O1 \ -Wl,-Bsymbolic-functions checking consistency of all components of python development environment... no configure: error: in /home/wilx/log4cplus-bzr/work-trunk/objdir-mips-linux-gnu: configure: error: Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, via the LDFLAGS environment variable. Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib" This doesn't look like output from the Automake-provided AM_PATH_PYTHON macro... Could you please post your config.log, configure and aclocal.m4 files (all compressed, please), as well as the exact command you've used to generate them? Maybe we'll have a better chance to understand what is going on ... Thanks, Stefano That is because it's coming from this line in AX_SWIG_PYTHON in the autoconf-archive. AC_REQUIRE([AX_PYTHON_DEVEL])
Re: problem with AM_PATH_PYTHON
Hi Václav, sorry for the delay. On 10/15/2012 09:07 PM, Václav Zeman wrote: > Hi. > > I am having a problem with AM_PATH_PYTHON. I have this in my configure.ac: > > > AS_IF([test "x$with_python" = "xyes"], > [AM_PATH_PYTHON([2.3], [:], [:]) >AX_SWIG_PYTHON >AC_CONFIG_FILES([swig/python/Makefile])]) > > > The problem is that when I am cross compiling it ignores the if-block > and puts the code of AM_PATH_PYTHON outside. The configure process then > breaks like this: > > > configure: WARNING: using cross tools not prefixed with host triplet > checking pkg-config is at least version 0.9.0... yes > checking for python... /usr/bin/python > checking for a version of Python >= '2.1.0'... yes > checking for the distutils Python package... yes > checking for Python include path... -I/usr/include/python2.7 > checking for Python library path... -L/usr/lib -lpython2.7 > checking for Python site-packages path... /usr/lib/python2.7/dist-packages > checking python extra libraries... -lssl -lcrypto -lssl -lcrypto \ > -L/usr/lib -lz -lpthread -ldl -lutil > checking python extra linking flags... -Xlinker -export-dynamic -Wl,-O1 \ > -Wl,-Bsymbolic-functions > checking consistency of all components of python development environment... no > configure: error: in > /home/wilx/log4cplus-bzr/work-trunk/objdir-mips-linux-gnu: > configure: error: > Could not link test program to Python. Maybe the main Python library has > been > installed in some non-standard library path. If so, pass it to configure, > via the LDFLAGS environment variable. > Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib" > This doesn't look like output from the Automake-provided AM_PATH_PYTHON macro... Could you please post your config.log, configure and aclocal.m4 files (all compressed, please), as well as the exact command you've used to generate them? Maybe we'll have a better chance to understand what is going on ... Thanks, Stefano
problem with AM_PATH_PYTHON
Hi. I am having a problem with AM_PATH_PYTHON. I have this in my configure.ac: AS_IF([test "x$with_python" = "xyes"], [AM_PATH_PYTHON([2.3], [:], [:]) AX_SWIG_PYTHON AC_CONFIG_FILES([swig/python/Makefile])]) The problem is that when I am cross compiling it ignores the if-block and puts the code of AM_PATH_PYTHON outside. The configure process then breaks like this: configure: WARNING: using cross tools not prefixed with host triplet checking pkg-config is at least version 0.9.0... yes checking for python... /usr/bin/python checking for a version of Python >= '2.1.0'... yes checking for the distutils Python package... yes checking for Python include path... -I/usr/include/python2.7 checking for Python library path... -L/usr/lib -lpython2.7 checking for Python site-packages path... /usr/lib/python2.7/dist-packages checking python extra libraries... -lssl -lcrypto -lssl -lcrypto -L/usr/lib -lz -lpthread -ldl -lutil checking python extra linking flags... -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions checking consistency of all components of python development environment... no configure: error: in `/home/wilx/log4cplus-bzr/work-trunk/objdir-mips-linux-gnu': configure: error: Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, via the LDFLAGS environment variable. Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib" ERROR! You probably have to install the development version of the Python package for your distribution. The exact name of this package varies among them. See `config.log' for more details How can I change the configure.ac to make the Python checks be executed only when my --with-python switch is really enabled. I am not sure if this is a matter for for Automake mailing list or Autoconf list. -- VZ signature.asc Description: OpenPGP digital signature