problem installing ESys with custom locations

Asked by voulgaris

OS: Scientific Linux 5.0

I read the faqs and still have the problem.I'm trying to install the last version of ESys in a custom location of a user "granos" /home/granos/ESyS-Particle-2.0.I installed with no problem python 2.6 and boost 1.40.0, povray amd vtk in dir. /share/applications (all apps must be installed in /share or the /home/users dirs):

[granos@master ~]$ pwd
/home/granos

[granos@master esys-particle-lastver]$ l -d /share/applications/python-2.6.5
drwxr-xr-x 6 root root 4096 Apr 6 17:04 /share/applications/python-2.6.5
[granos@master esys-particle-lastver]$ l -d /share/applications/boost_1_40_0/
drwxr-xr-x 13 root root 4096 Jun 14 17:32 /share/applications/boost_1_40_0/

I updated the enviroment vars with python, boost, openmpi:

[granos@master esys-particle-lastver]$ echo $LD_LIBRARY_PATH
/usr/lib64/openmpi/1.2.5-gcc/lib:/share/applications/esys-particle-2.0/lib:/share/applications/Python-2.6.5/lib:/share/applications/boost_1_40_0/lib

/share/applications/python-2.6.5/bin/python is in the PATH:

[granos@master ~]$ echo $PATH
/gridware/sge/bin/lx24-amd64:/gridware/sge/bin/lx24-amd64:/usr/lib64/openmpi/1.2.5-gcc/bin:/gridware/sge/bin/lx24-amd64:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/share/applications/mpi/mpich2-1.2.1/bin:/root/bin:/home/granos/bin:/share/applications/povray-3.6.1/bin:/share/applications/VTK-5.4.2/bin:/share/applications/esys-particle-2.0/bin:/home/granos/Runs/analisis:/share/applications/python-2.6.5/bin

I'd set also alias python='/share/applications/python-2.6.5/bin/python'
if i run autogen.sh and configure:

 ./configure --prefix=/home/granos/ESyS-Particle-2.0 CC=mpicc CXX=mpic++ --without-epydoc --with-boost=/share/applications/boost_1_40_0 --with-boost-libdir=/share/applications/boost_1_40_0/lib --with-boost-filesystem=boost_filesystem --with-boos-python=boost_python

*** the first problem is that with this it doesn't find python2.6 in the custom install y finds the default python 2.4:
.....
configure:2042: checking for a Python interpreter with version >= 2.3
configure:2059: python -c import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Pyt
hon 3.0 and a list in 2.x minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minv
erhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)
configure:2062: $? = 0
configure:2069: result: python
configure:2077: checking for python
configure:2095: found /usr/bin/python
configure:2107: result: /usr/bin/python
configure:2126: checking for python version
configure:2133: result: 2.4
.....

****the only work around is setting the var PYTHON wich the configure script use:

export PYTHON=/share/application/python-2.6.5/bin/python

.....
configure:2014: checking whether /share/applications/python-2.6.5/bin/python version >= 2.3
configure:2025: /share/applications/python-2.6.5/bin/python -c import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex convers
ion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iter
ator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)
configure:2028: $? = 0
configure:2030: result: yes
configure:2126: checking for /share/applications/python-2.6.5/bin/python version
configure:2133: result: 2.6
configure:2145: checking for /share/applications/python-2.6.5/bin/python platform
configure:2152: result: linux2
configure:2159: checking for /share/applications/python-2.6.5/bin/python script directory
configure:2180: result: ${prefix}/lib/python2.6/site-packages
configure:2189: checking for /share/applications/python-2.6.5/bin/python extension module directory
configure:2210: result: ${exec_prefix}/lib/python2.6/site-packages
.......

*****but configure exit with error, it still apears tobe some problem with python boost lib:

.......
configure:22170: checking for __cxa_atexit in -lboost_filesystem
configure:22200: mpic++ -o conftest -g -O2 -I/share/applications/boost_1_40_0/include -L/share/applications/boost_1_40_0/lib conftest.cc -lboost_filesystem >&5
configure:22206: $? = 0
configure:22210: test -z
                         || test ! -s conftest.err
configure:22213: $? = 0
configure:22216: test -s conftest
configure:22219: $? = 0
configure:22232: result: yes
configure:22268: checking whether the Boost::Python library is available
configure:22305: mpic++ -c -g -O2 -I/share/applications/boost_1_40_0/include -I/share/applications/python-2.6.5/include/python2.6 conftest.cc >&5
configure:22311: $? = 0
configure:22315: test -z
                         || test ! -s conftest.err
configure:22318: $? = 0
configure:22321: test -s conftest.o
configure:22324: $? = 0
configure:22343: result: yes
configure:22364: checking for __cxa_atexit in -lboost_python
configure:22394: mpic++ -o conftest -g -O2 -L/share/applications/boost_1_40_0/lib conftest.cc -lboost_python >&5
/share/applications/boost_1_40_0/lib/libboost_python.so: undefined reference to `PyList_Insert'
/share/applications/boost_1_40_0/lib/libboost_python.so: undefined reference to `PyExc_ImportError'
/share/applications/boost_1_40_0/lib/libboost_python.so: undefined reference to `PyString_InternFromString'
/share/applications/boost_1_40_0/lib/libboost_python.so: undefined reference to `PyProperty_Type'
/share/applications/boost_1_40_0/lib/libboost_python.so: undefined reference to `PyString_AsString'
/share/applications/boost_1_40_0/lib/libboost_python.so: undefined reference to `PyExc_StopIteration'
/share/applications/boost_1_40_0/lib/libboost_python.so: undefined reference to `PyImport_Import'
........

#### make of course exit with error. Is there something obvious missing for you?
#### all apps. must be installed in /share/applications or /home/user because this are the shared folders for the cluster
#### I'll tried to give as much info needed without the full logs, I'd been strugling iwith the install of the last Esys version
#### with python2.6 (the default python is 2.4 and cannot be upgraded)a long time, because there are some upgrades (made #### by Tancredi and Perchero from here) that we want to run in our cluster....thanks in advance

Question information

Language:
English Edit question
Status:
Answered
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Vince Boros (v-boros) said :
#1

As you want to use a version of Python that is different from the default version, you need to compile the Boost libraries with the nondefault version and build ESyS-Particle with the same version. If you read through my 2010-1-19 post in Question 96229 (https://answers.launchpad.net/esys-particle/+question/96229), you will find the steps you need to take. I will also copy these instructions in a new FAQ.

Let me know how you go.

Best,

Vince

Revision history for this message
voulgaris (cesarv-fisica) said :
#2

ok yes I have compiled, boost 1.4 as you see with the non default 2.6 python installation. Boost actually works well, I even try soime exmples. The problems is in ESys installation as you can see in the last logs. There were other errors through the compilation at some C test but I think the problem is at the libboost_python as you can see at the end of the last post

Revision history for this message
Dion Weatherley (d-weatherley) said :
#3

Hi Voulgaris,

As I discovered recently, it can take some trial-and-error to install ESyS-Particle on clusters where multiple versions of python and/or boost are installed. Don't give up though. It is always possible to get ESyS-Particle working eventually!

The error messages reported by configure are suggestive that configure is linking against the wrong version of the Python libraries when testing for the presence of boost-python. This is possibly because you set the --with-boost-libdir argument in the configure command. ./configure --help has this to say about that argument:

  --with-boost-libdir=LIB_DIR
                          Force given directory for boost libraries. Note that
                          this will overwrite library path detection, so use
                          this parameter only if default library detection
                          fails and you know exactly where your boost
                          libraries are located.

I suspect your LD_LIBRARY_PATH is being ignored so configure is trying to use the default system python libraries instead. Try removing the --with-boost-libdir argument from your configure command (but keep the other --with-boost-* arguments).

If you still have problems could you please post both the last few lines of output from ./configure as well as the relevant section of config.log. The configure output makes it easier to determine exactly which stage is failing.

Good luck!

Dion.

Revision history for this message
Vince Boros (v-boros) said :
#4

Another suggestion is to rearrange the ordering of search directories in your environment variable paths, placing the folders of custom installations ahead of default folders. I notice that "/usr/bin" appears before "/share/applications/python-2.6.5/bin" in $PATH. I do not think that the OS continues to search for more than one version of a program or library after it has found a candidate. (From your original post: "configure:2095: found /usr/bin/python".)

Vince

Can you help with this problem?

Provide an answer of your own, or ask voulgaris for more information if necessary.

To post a message you must log in.