Bugs item #3577236, was opened at 2012-10-14 16:05
Message generated for change (Tracker Item Submitted) made by cwilling
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3577236&group_id=40728

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Installation/Building
Group: 2.3.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Christoph Willing (cwilling)
Assigned to: Nobody/Anonymous (nobody)
Summary: out of tree build failure with python

Initial Comment:
Building with -DPYTHON_BINDINGS=ON fails during an out of tree build. It 
succeeds with "in tree" build.
Out of tree build fails at linking stage with:
g++ -pthread -shared -I/usr/include/eigen2 
build/temp.linux-x86_64-2.7/tmp/SBo/openbabel-2.3.1/scripts/python/openbabel-python.o
 -L/tmp/SBo/openbabel-2.3.1/scripts/python/../../lib 
-L/tmp/SBo/openbabel-2.3.1/scripts/python/../../lib64 -L../lib -L/usr/lib64 
-lopenbabel -lpython2.7 -o 
/tmp/SBo/openbabel-2.3.1/build/scripts/pybuild/_openbabel.so
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld:
 cannot find -lopenbabel

Firstly, in the line that fails, none of the directory paths specified to look 
for libopenbabel contain the "build" directory (the root of my out of tree 
build), therefore linking with -lopenbabel could never succeed.
Secondly, Some of these directory paths specify "scripts/python" but no 
"scripts/python" directory has been generated by cmake in the build directory 
(only the scripts directory).
Thirdly, the path for python-openbabel.o is wrong (also incorrect path):
    
build/temp.linux-x86_64-2.7/tmp/SBo/openbabel-2.3.1/scripts/python/openbabel-python.o
should be:
    
scripts/build/temp.linux-x86_64-2.7/tmp/SBo/openbabel-2.3.1/scripts/python/openbabel-python.o

I can "fix" these things by creating the python directory and then running the 
same command at command line but including the correct library path i.e.
(from the out of tree "build" directory)
mkdir -p scripts/python
g++ -pthread -shared -I/usr/include/eigen2 
scripts/build/temp.linux-x86_64-2.7/tmp/SBo/openbabel-2.3.1/scripts/python/openbabel-python.o
 -L/tmp/SBo/openbabel-2.3.1/scripts/python/../../lib 
-L/tmp/SBo/openbabel-2.3.1/build/scripts/python/../../lib64 -L../lib 
-L/usr/lib64 -lopenbabel -lpython2.7 -o 
/tmp/SBo/openbabel-2.3.1/build/scripts/pybuild/_openbabel.so

which succeeds in building _openbabel.so

Conclusion: cmake isn't generating correct directories and linker paths for out 
of tree build with python
Platform - Linux, cmake-2.8.8, openbabel-2.3.1


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3577236&group_id=40728

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to