0.3.1 - undefined reference to boost::python...

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
Guest

0.3.1 - undefined reference to boost::python...

Post by Guest »

hi,

linking fails with:

...

ccache g++ -O2 -g -Wall -ffast-math -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2 -I/usr/include/SDL -D_REENTRANT -pipe -L/usr/X11R6/lib -L/usr/X11R6/lib -o vegaserver star_system_generic.o universe_generic.o universe_util_generic.o galaxy.o galaxy_xml.o galaxy_gen.o faction_generic.o hashtable.o configxml.o easydom.o xml_serializer.o xml_support.o lin_time.o endianness.o faction_util.o load_mission.o savegame.o vs_path.o gfxlib_struct_server.o libserver.o universe_util_server.o faction_util_server.o vs_globals.o vegaserver.o cmd/script/director_server.o cmd/unit_util_generic.o cmd/unit_util_server.o common/libvscommon.a networking/libnetserver.a cmd/libcmdserver.a cmd/script/libscriptserver.a cmd/ai/libaiserver.a cmd/script/c_alike/libc_alike.a python/libpythonserver.a gfx/libgfxserver.a gldrv/libgldrvserver.a boost/libboost_python.a -lutil -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lGL -lGLU -lglut -lXi -lXmu -lexpat -lpng -ljpeg /usr/lib/python2.2/config/libpython2.2.a -Xlinker -export-dynamic

/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o)(.text+0x3bf3): In function `posix_tmpnam':

: the use of `tmpnam_r' is dangerous, better use `mkstemp'

/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o)(.text+0x3afe): In function `posix_tempnam':

: the use of `tempnam' is dangerous, better use `mkstemp'

load_mission.o(.text+0x1f6d): In function `__static_initialization_and_destruction_0':

/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/../src/boost129/boost/python/type_id.hpp:55: undefined reference to `boost::python::converter::registry::lookup(boost::python::type_info)'

cmd/script/director_server.o(.text+0x79): In function `__static_initialization_and_destruction_0':

/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/cmd/script/../../boost129/boost/python/type_id.hpp:55: undefined reference to `boost::python::converter::registry::lookup(boost::python::type_info)'


... ~1500 more lines like these ...


/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/gfx/../boost129/boost/python/type_id.hpp:55: undefined reference to `boost::python::converter::registry::lookup(boost::python::type_info)'

gfx/libgfxserver.a(mesh_server.o)(.gnu.linkonce.d._ZTV4Mesh+0x14):/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/gfx/mesh_server.cpp:13: undefined reference to `Mesh::SelectCullFace(int)'

gfx/libgfxserver.a(mesh_server.o)(.gnu.linkonce.d._ZTV4Mesh+0x18):/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/gfx/mesh_server.cpp:14: undefined reference to `Mesh::RestoreCullFace(int)'

collect2: ld returned 1 exit status

gmake[3]: *** [vegaserver] Error 1

gmake[3]: Leaving directory `/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src'

gmake[2]: *** [all-recursive] Error 1

gmake[2]: Leaving directory `/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src'

gmake[1]: *** [all-recursive] Error 1

gmake[1]: Leaving directory `/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike'

gmake: *** [all-recursive-am] Error 2

(single lines separated with blank lines)

i am using gcc 3.2.2. the error occures whether i compile with or without ccache, whether i use the 'aclocal, autoconf, automake -a' or the 'autoconf, automake' procedure, whether i ./configure with or without --enable-boost-128. i dont neccesarily need openal, do i ?

any help appreciated :?

config.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:628: checking for a BSD compatible install
configure:681: checking whether build environment is sane
configure:738: checking whether make sets ${MAKE}
configure:784: checking for working aclocal
configure:797: checking for working autoconf
configure:810: checking for working automake
configure:823: checking for working autoheader
configure:836: checking for working makeinfo
configure:861: checking host system type
configure:889: checking for gcc
configure:1002: checking whether the C compiler (ccache gcc ) works
configure:1018: ccache gcc -o conftest conftest.c 1>&5
configure:1044: checking whether the C compiler (ccache gcc ) is a cross-compiler
configure:1049: checking whether we are using GNU C
configure:1077: checking whether ccache gcc accepts -g
configure:1118: checking for c++
configure:1150: checking whether the C++ compiler (ccache g++ ) works
configure:1166: ccache g++ -o conftest conftest.C 1>&5
configure:1192: checking whether the C++ compiler (ccache g++ ) is a cross-compiler
configure:1197: checking whether we are using GNU C++
configure:1225: checking whether ccache g++ accepts -g
configure:1260: checking for ranlib
configure:1290: checking how to run the C preprocessor
configure:1370: checking for ANSI C header files
configure:1477: checking for sys/time.h
configure:1477: checking for unistd.h
configure:1515: checking for working const
configure:1590: checking whether time.h and sys/time.h may both be included
configure:1628: checking for getcwd
configure:1628: checking for gettimeofday
configure:1628: checking for strdup
configure:1684: checking for finite
configure:1684: checking for isnan
configure:1739: checking for _finite
configure:1739: checking for _isnan
configure:1795: checking for ieeefp.h
configure:1878: checking for Win32 platform
configure:1905: checking for MacOSX platform
configure:1947: checking for python
configure:2158: checking for sdl-config
configure:2193: checking for SDL - version >= 1.0.1
configure:2278: ccache gcc -o conftest -I/usr/include/SDL -D_REENTRANT conftest.c -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread 1>&5
configure:2368: checking for SDL_JoystickOpen
configure:2443: checking for SDL/SDL_net.h
configure:2526: checking for GL library
configure:2536: ccache gcc -o conftest conftest.c -lutil -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lGL 1>&5
configure:2907: checking for GLU library
configure:2917: ccache gcc -o conftest conftest.c -lutil -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lGL -lGLU 1>&5
configure:3213: checking for GL/gl.h
configure:3223: ccache gcc -E -D_UDP_PROTO -DHAVE_SDL=1 -DSDL_WINDOWING=1 conftest.c >/dev/null 2>conftest.out
configure:3288: checking for GL/glext.h
configure:3338: checking whether glext.h is recent enough
configure:3402: checking for glut32 library
configure:3418: ccache gcc -o conftest -L/usr/X11R6/lib conftest.c -lutil -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lGL -lGLU -lglut32 -lXi -lXmu 1>&5
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lglut32
collect2: ld returned 1 exit status
configure: failed program was:
#line 3411 "configure"
#include "confdefs.h"

int main() {

; return 0; }
configure:3402: checking for glut library
configure:3418: ccache gcc -o conftest -L/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -lutil -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lGL -lGLU -lglut -lXi -lXmu 1>&5
configure:3469: checking for GL/glut.h
configure:3532: checking for expat library
configure:3542: ccache gcc -o conftest -L/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -lexpat 1>&5
configure:3590: checking for expat.h
configure:3654: checking for png library
configure:3664: ccache gcc -o conftest -L/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -lpng 1>&5
configure:3712: checking for png.h
configure:3783: checking for jpeg library
configure:3793: ccache gcc -o conftest -L/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -ljpeg 1>&5
configure:3841: checking for jpeglib.h
configure:3918: checking for openal library
configure:3928: ccache gcc -o conftest -L/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -lopenal 1>&5
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lopenal
collect2: ld returned 1 exit status
configure: failed program was:
#line 3921 "configure"
#include "confdefs.h"

int main() {

; return 0; }
configure:3979: checking for AL/al.h
configure:3986: ccache gcc -E conftest.c >/dev/null 2>conftest.out
configure:3982:21: AL/al.h: No such file or directory
configure: failed program was:
#line 3981 "configure"
#include "confdefs.h"
#include <AL/al.h>
configure:4014: checking for AL/al.h
configure:4021: ccache gcc -E -I/usr/local/include conftest.c >/dev/null 2>conftest.out
configure:4017:21: AL/al.h: No such file or directory
configure: failed program was:
#line 4016 "configure"
#include "confdefs.h"
#include <AL/al.h>
configure:4175: checking for gtk-config
configure:4210: checking for GTK - version >= 1.2.1
configure:4311: ccache gcc -o conftest -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -L/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm 1>&5
Guest

Post by Guest »

err, i am on (gentoo) linux
Guest

Post by Guest »

sorry, i was a bit wrong with the boost related error :oops:
configuring with --enable-boost-128 fixed that one. though there are some other undefined references left:

ccache g++ -O2 -g -Wall -ffast-math -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2 -I/usr/include/SDL -D_REENTRANT -pipe -L/usr/X11R6/lib -L/usr/X11R6/lib -o vegaserver star_system_generic.o universe_generic.o universe_util_generic.o galaxy.o galaxy_xml.o galaxy_gen.o faction_generic.o hashtable.o configxml.o easydom.o xml_serializer.o xml_support.o lin_time.o endianness.o faction_util.o load_mission.o savegame.o vs_path.o gfxlib_struct_server.o libserver.o universe_util_server.o faction_util_server.o vs_globals.o vegaserver.o cmd/script/director_server.o cmd/unit_util_generic.o cmd/unit_util_server.o common/libvscommon.a networking/libnetserver.a cmd/libcmdserver.a cmd/script/libscriptserver.a cmd/ai/libaiserver.a cmd/script/c_alike/libc_alike.a python/libpythonserver.a gfx/libgfxserver.a gldrv/libgldrvserver.a boost/libboost_python.a -lutil -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lGL -lGLU -lglut -lXi -lXmu -lexpat -lpng -ljpeg /usr/lib/python2.2/config/libpython2.2.a -Xlinker -export-dynamic

/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o)(.text+0x3bf3): In function `posix_tmpnam':

: the use of `tmpnam_r' is dangerous, better use `mkstemp'

/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o)(.text+0x3afe): In function `posix_tempnam':

: the use of `tempnam' is dangerous, better use `mkstemp'

cmd/libcmdserver.a(unit_xml.o)(.text+0xb350): In function `Unit::LoadXML(char const*, char const*, char*, int)':

/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/cmd/unit_xml.cpp:1721: undefined reference to `collideTrees::Get(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

cmd/libcmdserver.a(unit_xml.o)(.text+0xb491):/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/cmd/unit_xml.cpp:1789: undefined reference to `collideTrees::collideTrees[in-charge](std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, BSPTree*, BSPTree*, csRapidCollider*, csRapidCollider*)'

cmd/libcmdserver.a(unit_xml.o)(.text+0xb6fe):/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/cmd/unit_xml.cpp:1785: undefined reference to `csRapidCollider::csRapidCollider[in-charge](std::vector<bsp_polygon, std::allocator<bsp_polygon> > const&)'

cmd/libcmdserver.a(unit_xml.o)(.text+0xb78b): In function `Unit::LoadXML(char const*, char const*, char*, int)':

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3/bits/basic_string.h:781: undefined reference to `CheckBSP(char const*)'

cmd/libcmdserver.a(unit_xml.o)(.text+0xb7b1):/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3/bits/basic_string.h:781: undefined reference to `CheckBSP(char const*)'

cmd/libcmdserver.a(unit_xml.o)(.text+0xb7ed):/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3/bits/basic_string.h:781: undefined reference to `BSPTree::BSPTree[in-charge](char const*)'

cmd/libcmdserver.a(unit_xml.o)(.text+0xb89b):/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3/bits/basic_string.h:781: undefined reference to `CheckBSP(char const*)'

cmd/libcmdserver.a(unit_xml.o)(.text+0xb923):/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3/bits/basic_string.h:781: undefined reference to `CheckBSP(char const*)'

cmd/libcmdserver.a(unit_xml.o)(.text+0xb984): In function `Unit::LoadXML(char const*, char const*, char*, int)':

/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/cmd/unit_xml.cpp:1740: undefined reference to `csRapidCollider::csRapidCollider[in-charge](std::vector<bsp_polygon, std::allocator<bsp_polygon> > const&)'

cmd/libcmdserver.a(unit_xml.o)(.text+0xb9ff): In function `Unit::LoadXML(char const*, char const*, char*, int)':

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3/bits/basic_string.h:781: undefined reference to `BSPTree::BSPTree[in-charge](char const*)'

cmd/libcmdserver.a(unit_xml.o)(.text+0xbbef): In function `Unit::LoadXML(char const*, char const*, char*, int)':

/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/cmd/../gfx/sphere.h:19: undefined reference to `vtable for SphereMesh'

cmd/libcmdserver.a(unit_xml.o)(.text+0xbc65):/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/cmd/../gfx/sphere.h:20: undefined reference to `SphereMesh::InitSphere(float, int, int, char const*, char const*, bool, BLENDFUNC, BLENDFUNC, bool, float, float, float, float, FILTER)'

cmd/libcmdserver.a(planet_generic.o)(.text+0x122b): In function `Planet::beginElement(QVector, QVector, float, Vector const&, float, float, float, char const*, BLENDFUNC, BLENDFUNC, std::vector<char*, std::allocator<char*> >, int, GFXMaterial const&, std::vector<GFXLightLocal, std::allocator<GFXLightLocal> > const&, bool, int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)':

/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/cmd/planet_generic.cpp:174: undefined reference to `ScaleJumpRadius(float)'

gfx/libgfxserver.a(mesh_server.o)(.gnu.linkonce.d._ZTV4Mesh+0x14):/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/gfx/mesh_server.cpp:13: undefined reference to `Mesh::SelectCullFace(int)'

gfx/libgfxserver.a(mesh_server.o)(.gnu.linkonce.d._ZTV4Mesh+0x18):/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src/gfx/mesh_server.cpp:14: undefined reference to `Mesh::RestoreCullFace(int)'

collect2: ld returned 1 exit status

gmake[3]: *** [vegaserver] Error 1

gmake[3]: Leaving directory `/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src'

gmake[2]: *** [all-recursive] Error 1

gmake[2]: Leaving directory `/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike/src'

gmake[1]: *** [all-recursive] Error 1

gmake[1]: Leaving directory `/home/matthi/devel/vegastrike-cvs-0.3.1/vegastrike'

gmake: *** [all-recursive-am] Error 2
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

you have to check out the latest cvs in order to have the vegaserver link

the important binary, vegastrike, linked fine

look in vegastrike/src/vegastrike

you see? it's there :-)
that's teh binary you run from the data dir
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
Guest

Post by Guest »

thank you for the quick reply :)

and yes i noticed that the vegastrike binary built fine before :), but actually i want to write an ebuild (thats a small script which builds and installs a package from source) to help spreading vegastrike in the gentoo linux community :). So i am wondering if the vegaserver binary isnt supposed to compile at all in 0.3.1 :shock: and if so, is there a way to prevent make from attempting to build it ?
Post Reply