Share

Avogadro

Tracker: Bugs

5 Can't find the shared python module - ID: 2885185
Last Update: Comment added ( nobody )

I just ran Avogadro 1.0.0 using the same build script as the one I've used
building Avogadro 0.9.5-0.9.9 and I ran into this error.

.0 -lrt -lpthread -ldl -lGLU -lGL -lGLEW
/usr/lib/python2.6/config/libpython2.6.a -lboost_python-mt
/usr/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function
`posix_forkpty':
/tmp/Python-2.6.2/./Modules/posixmodule.c:3745: undefined reference to
`forkpty'
/usr/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function
`posix_openpty':
/tmp/Python-2.6.2/./Modules/posixmodule.c:3686: undefined reference to
`openpty'
collect2: ld returned 1 exit status
make[2]: *** [lib/libavogadro.so.1.0.0] Error 1
make[2]: Leaving directory `/tmp/SBo/avogadro-1.0.0/build'
make[1]: *** [libavogadro/src/CMakeFiles/avogadro.dir/all] Error 2
make[1]: Leaving directory `/tmp/SBo/avogadro-1.0.0/build'
make: *** [all] Error 2

I know that this is because Cmake finds my static library instead of the
dynamic python library. But why all of the sudden this change in behavior?
I do know that FindPythonLibs.cmake is no longer shipped with 1.0.0 but
this now makes me force Cmake to use the dynamic library rather then having
Cmake find it on its own. On Arch linux this isn't a problem as the shared
lib is located in /usr/lib/python2.6/config/libpython2.6.so and Cmake finds
it. But on my Slackware installation it is located in
/usr/lib{,64}/libpython2.6.so (depending on architecture) and can only find
the static library.

Can FindPythonLibs.cmake be re-added to the next version of Avogadro


Lars ( larryhaja ) - 2009-10-24 01:57

5

Open

Accepted

Marcus D. Hanwell

Building / Install

v 1.0.0

Public


Comments ( 4 )




Date: 2009-10-27 10:59
Sender: nobody

@larryhaja

Yeap, that worked, thanks ;)


Date: 2009-10-27 01:51
Sender: larryhaja

You can force cmake to use the shared library as a workaround. In my case
I added -DPYTHON_LIBRARY:PATH="/path/to/libpython2.6.so". Change according
to your PATH as well as you python version.


Date: 2009-10-27 01:35
Sender: hailsematary

I'm packaging avogadro for Pardus Linux distro, and I'm suffering from the
same problem.
Everything's fine with Avogadro 0.9.9 but same output occurs and FTBFS for
Avogadro 1.0.0
Deus-Ex-Machine ~ # cmake --version
cmake version 2.6-patch 4




Date: 2009-10-24 13:36
Sender: cryosukProject Admin

I had not intended to commit that change. You will be happy to know that
CMake 2.8 has the fixed file, and I was testing that this worked properly.
I will add the file back for the next release, aiming to keep it until we
require CMake 2.8.0. Thanks for pointing this out.


Log in to comment.




Attached File

No Files Currently Attached

Changes ( 2 )

Field Old Value Date By
resolution_id None 2009-10-24 13:36 cryosuk
assigned_to nobody 2009-10-24 13:36 cryosuk