problem building NEURON 7.3 with python3 on Ubuntu 12.04
Posted: Wed Apr 03, 2013 10:27 am
I ran into an issue trying to build NEURON 7.3 on Ubuntu 12.04 64bit with python3 using the following configure command
./configure --prefix=`pwd` --with-iv --with-nrnpython=python3
I got the following error:
Python binary found (/usr/bin/python3)
checking nrnpython configuration... get_python_version() '3.2'
sys.version_info[0] '3'
get_python_inc(1) '/usr/include/python3.2mu'
get_config_var('LIBS') '-lpthread -ldl -lutil'
get_config_var('LINKFORSHARED') '-Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions'
get_config_var('LIBDIR') '/usr/lib'
checking if python include files and libraries work... configure: error: could not run a test that used the python library.
Examine config.log to see error details. Something wrong with
PYLIB=-L/usr/lib -lpython3.2 -lpthread -ldl -lutil -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -R/usr/lib
or
PYLIBDIR=/usr/lib
or
PYLIBLINK=-L/usr/lib -lpython3.2 -lpthread -ldl -lutil
or
PYINCDIR=/usr/include/python3.2mu
It turns out that the problem is with the '-lpython3.2'. On my system it needs to be '-lpython3.2mu'. Using a configure statement that explicitly defines PYLIB, PYLIBDIR, PYLIBLINK, and PYINCDIR solves the problem.
./configure --prefix=`pwd` --with-iv --with-nrnpython=python3 PYLIB='-L/usr/lib -lpython3.2mu' PYLIBDIR='/usr/lib' PYLIBLINK='-L/usr/lib -lpython3.2mu' PYINCDIR='/usr/include/python3.2mu'
I'm not sure if I inadvertently did something to my system or if this is an issue for anyone trying to use py3 on Ubuntu 12.04.
Configuring for python2 using
./configure --prefix=`pwd` --with-iv --with-nrnpython=python
works without having to specify library locations.
Larry
./configure --prefix=`pwd` --with-iv --with-nrnpython=python3
I got the following error:
Python binary found (/usr/bin/python3)
checking nrnpython configuration... get_python_version() '3.2'
sys.version_info[0] '3'
get_python_inc(1) '/usr/include/python3.2mu'
get_config_var('LIBS') '-lpthread -ldl -lutil'
get_config_var('LINKFORSHARED') '-Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions'
get_config_var('LIBDIR') '/usr/lib'
checking if python include files and libraries work... configure: error: could not run a test that used the python library.
Examine config.log to see error details. Something wrong with
PYLIB=-L/usr/lib -lpython3.2 -lpthread -ldl -lutil -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -R/usr/lib
or
PYLIBDIR=/usr/lib
or
PYLIBLINK=-L/usr/lib -lpython3.2 -lpthread -ldl -lutil
or
PYINCDIR=/usr/include/python3.2mu
It turns out that the problem is with the '-lpython3.2'. On my system it needs to be '-lpython3.2mu'. Using a configure statement that explicitly defines PYLIB, PYLIBDIR, PYLIBLINK, and PYINCDIR solves the problem.
./configure --prefix=`pwd` --with-iv --with-nrnpython=python3 PYLIB='-L/usr/lib -lpython3.2mu' PYLIBDIR='/usr/lib' PYLIBLINK='-L/usr/lib -lpython3.2mu' PYINCDIR='/usr/include/python3.2mu'
I'm not sure if I inadvertently did something to my system or if this is an issue for anyone trying to use py3 on Ubuntu 12.04.
Configuring for python2 using
./configure --prefix=`pwd` --with-iv --with-nrnpython=python
works without having to specify library locations.
Larry