Linking error because of Python

Moin

Has anybody seen this one?

Linking CXX shared library libavogadro.so
/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function
posix_forkpty': (.text+0x3579): undefined reference toforkpty’
/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function
posix_openpty': (.text+0x3608): undefined reference toopenpty’
collect2: ld returned 1 exit status
make[2]: *** [libavogadro/src/libavogadro.so.0.6.9] Error 1
make[1]: *** [libavogadro/src/CMakeFiles/avogadro-lib.dir/all] Error 2
make: *** [all] Error 2

Carsten

Carsten Niehaus wrote:

Moin

Has anybody seen this one?

Linking CXX shared library libavogadro.so
/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function
posix_forkpty': (.text+0x3579): undefined reference toforkpty’
/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function
posix_openpty': (.text+0x3608): undefined reference toopenpty’
collect2: ld returned 1 exit status
make[2]: *** [libavogadro/src/libavogadro.so.0.6.9] Error 1
make[1]: *** [libavogadro/src/CMakeFiles/avogadro-lib.dir/all] Error 2
make: *** [all] Error 2

Yes - I am afraid it is an old CMake bug still not fixed. See bug
http://www.cmake.org/Bug/view.php?id=2257 for more details. I have
patched the Gentoo CMake 2.6 packages for now. Not sure why they haven’t
fixed it. I think I found a similar patch present in OpenSUSE too.
Overall CMake 2.6 is working much better but this deficiency is pretty
bad for us - if you know of a decent workaround until it is properly
fixed upstream let me know.

Am Montag, 12. Mai 2008 18:12:57 schrieb Carsten Niehaus:

Moin

Has anybody seen this one?

Linking CXX shared library libavogadro.so
/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function
posix_forkpty': (.text+0x3579): undefined reference toforkpty’
/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function
posix_openpty': (.text+0x3608): undefined reference toopenpty’
collect2: ld returned 1 exit status
make[2]: *** [libavogadro/src/libavogadro.so.0.6.9] Error 1
make[1]: *** [libavogadro/src/CMakeFiles/avogadro-lib.dir/all] Error 2
make: *** [all] Error 2

Hi

I am not sure if this is related or not:

[ 2%] Building CXX object
libavogadro/src/CMakeFiles/avogadro-lib.dir/elementtranslate.o
make[2]: *** [libavogadro/src/CMakeFiles/avogadro-lib.dir/pythoninterpreter.o]
Error 1
make[2]: *** Waiting for unfinished jobs…
make[1]: *** [libavogadro/src/CMakeFiles/avogadro-lib.dir/all] Error 2
make: *** [all] Error 2

I talked with Alex Neundorf about this but only have a german answer. I will
translate it and mail the answer to this list. But perhaps next week as I
will be offline a lot this weekend.

Carsten

Carsten Niehaus wrote:

Am Montag, 12. Mai 2008 18:12:57 schrieb Carsten Niehaus:

Moin

Has anybody seen this one?

Linking CXX shared library libavogadro.so
/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function
posix_forkpty': (.text+0x3579): undefined reference toforkpty’
/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function
posix_openpty': (.text+0x3608): undefined reference toopenpty’
collect2: ld returned 1 exit status
make[2]: *** [libavogadro/src/libavogadro.so.0.6.9] Error 1
make[1]: *** [libavogadro/src/CMakeFiles/avogadro-lib.dir/all] Error 2
make: *** [all] Error 2

I am not sure if this is related or not:

[ 2%] Building CXX object
libavogadro/src/CMakeFiles/avogadro-lib.dir/elementtranslate.o
make[2]: *** [libavogadro/src/CMakeFiles/avogadro-lib.dir/pythoninterpreter.o]
Error 1
make[2]: *** Waiting for unfinished jobs…
make[1]: *** [libavogadro/src/CMakeFiles/avogadro-lib.dir/all] Error 2
make: *** [all] Error 2

There isn’t enough in this paste to see what actually failed. It could
be related but to be honest I would need to see the rest of the output.

I talked with Alex Neundorf about this but only have a german answer. I will
translate it and mail the answer to this list. But perhaps next week as I
will be offline a lot this weekend.

I would be interested to know what he thinks. The bug report has been
there for quite some time though and I have already patched Gentoo’s
CMake 2.6. I think that quite a few Linux distributions will need to
patch their FindPythonLibs.cmake, I found at least one other distro with
a similar patch in their CMake stuff.

Am Freitag, 16. Mai 2008 10:52:27 schrieben Sie:

Carsten Niehaus wrote:

Am Montag, 12. Mai 2008 18:12:57 schrieb Carsten Niehaus:

Moin

Has anybody seen this one?

Linking CXX shared library libavogadro.so
/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function
posix_forkpty': (.text+0x3579): undefined reference toforkpty’
/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function
posix_openpty': (.text+0x3608): undefined reference toopenpty’
collect2: ld returned 1 exit status
make[2]: *** [libavogadro/src/libavogadro.so.0.6.9] Error 1
make[1]: *** [libavogadro/src/CMakeFiles/avogadro-lib.dir/all] Error 2
make: *** [all] Error 2

I am not sure if this is related or not:

[ 2%] Building CXX object
libavogadro/src/CMakeFiles/avogadro-lib.dir/elementtranslate.o
make[2]: ***
[libavogadro/src/CMakeFiles/avogadro-lib.dir/pythoninterpreter.o] Error 1
make[2]: *** Waiting for unfinished jobs…
make[1]: *** [libavogadro/src/CMakeFiles/avogadro-lib.dir/all] Error 2
make: *** [all] Error 2

There isn’t enough in this paste to see what actually failed. It could
be related but to be honest I would need to see the rest of the output.

Scanning dependencies of target avogadro-lib
[ 7%] [ 7%] Building CXX object
libavogadro/src/CMakeFiles/avogadro-lib.dir/global.o
Building CXX object libavogadro/src/CMakeFiles/avogadro-lib.dir/idlist.o
[ 8%] Building CXX object
libavogadro/src/CMakeFiles/avogadro-lib.dir/undosequence.o
[ 8%] Building CXX object
libavogadro/src/CMakeFiles/avogadro-lib.dir/primitiveitemmodel.o
[ 9%] Building CXX object
libavogadro/src/CMakeFiles/avogadro-lib.dir/camera.o
[ 9%] Building CXX object
libavogadro/src/CMakeFiles/avogadro-lib.dir/povpainter.o
[ 10%] Building CXX object
libavogadro/src/CMakeFiles/avogadro-lib.dir/pythoninterpreter.o
[ 10%] Building CXX object
libavogadro/src/CMakeFiles/avogadro-lib.dir/painter.o
[ 11%] Building CXX object
libavogadro/src/CMakeFiles/avogadro-lib.dir/glwidget.o
In file included
from /home/kde-devel/kde/src/avo-git/libavogadro/include/avogadro/boost.h:1,

from /home/kde-devel/kde/src/avo-git/libavogadro/src/pythoninterpreter.h:30,

from /home/kde-devel/kde/src/avo-git/libavogadro/src/pythoninterpreter.cpp:25:
/home/kde-devel/kde/src/avo-git/libavogadro/include/avogadro/…/…/src/boost.h:
In function ‘void init_module_Avogadro()’:
/home/kde-devel/kde/src/avo-git/libavogadro/include/avogadro/…/…/src/boost.h:50:
error: no matches converting function ‘GetBond’ to type 'class
OpenBabel::OBBond* (class OpenBabel::OBMol::)(int)const’
/home/kde-devel/kde/build/include/openbabel-2.0/openbabel/mol.h:265: error:
candidates are: OpenBabel::OBBond
OpenBabel::OBMol::GetBond(int)
/home/kde-devel/kde/build/include/openbabel-2.0/openbabel/mol.h:268: error:
OpenBabel::OBBond* OpenBabel::OBMol::GetBond(int, int)
/home/kde-devel/kde/build/include/openbabel-2.0/openbabel/mol.h:271: error:
OpenBabel::OBBond* OpenBabel::OBMol::GetBond(OpenBabel::OBAtom*,
OpenBabel::OBAtom*)
/home/kde-devel/kde/src/avo-git/libavogadro/include/avogadro/…/…/src/boost.h:51:
error: no matches converting function ‘GetBond’ to type 'class
OpenBabel::OBBond* (class OpenBabel::OBMol::)(int, int)const’
/home/kde-devel/kde/build/include/openbabel-2.0/openbabel/mol.h:265: error:
candidates are: OpenBabel::OBBond
OpenBabel::OBMol::GetBond(int)
/home/kde-devel/kde/build/include/openbabel-2.0/openbabel/mol.h:268: error:
OpenBabel::OBBond* OpenBabel::OBMol::GetBond(int, int)
/home/kde-devel/kde/build/include/openbabel-2.0/openbabel/mol.h:271: error:
OpenBabel::OBBond* OpenBabel::OBMol::GetBond(OpenBabel::OBAtom*,
OpenBabel::OBAtom*)
make[2]: *** [libavogadro/src/CMakeFiles/avogadro-lib.dir/pythoninterpreter.o]
Error 1
make[2]: *** Waiting for unfinished jobs…
make[1]: *** [libavogadro/src/CMakeFiles/avogadro-lib.dir/all] Error 2
make: *** [all] Error 2

I just realized this might be a OB or boost issue. I will update OB next week
and see if that fixes anything.

Carsten

On May 16, 2008, at 10:35 AM, Carsten Niehaus wrote:

from /home/kde-devel/kde/src/avo-git/libavogadro/include/avogadro/
boost.h:1,

/home/kde-devel/kde/src/avo-git/libavogadro/include/avogadro/…/…/
src/boost.h:50:
error: no matches converting function ‘GetBond’ to type 'class
OpenBabel::OBBond* (class OpenBabel::OBMol::)(int)const’
/home/kde-devel/kde/build/include/openbabel-2.0/openbabel/mol.h:265:
error:
candidates are: OpenBabel::OBBond
OpenBabel::OBMol::GetBond(int)

This is an OB issue – you’re not using the bleeding edge. I believe
this is one of Donald’s changes for the unique IDs.

Cheers,
-Geoff