[bullet] Undefined refernces compiling

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
flx
Space Krill
Posts: 6
Joined: Sun Feb 22, 2009 6:48 pm

[bullet] Undefined refernces compiling

#1 Post by flx »

Hi, I've tried the static linked packages that are out there and the game looks very good, so i've been trying to run freeorion from the source in my archlinux box... and i've run into some problems, mostly my noobness when it comes to setting up build environments.
Some of them i could fix (the unseen GG as in the other post) but now i'm stuck with bullet.

It configures ok:

Code: Select all

scons: Configure: Checking for bullet >= 2.73...
pkg-config bullet --atleast-version 2.73
scons: Configure: yes
but building fails with errors like these

Code: Select all

UI/CollisionMeshConverter-human.o: In function `CollisionMeshConverter::CollisionShape() const':                                                             
CollisionMeshConverter.cpp:(.text+0x388): undefined reference to `btAlignedAllocInternal(unsigned int, int)'                                                 
CollisionMeshConverter.cpp:(.text+0x3a3): undefined reference to `btTriangleMesh::btTriangleMesh(bool, bool)'                                                
CollisionMeshConverter.cpp:(.text+0x420): undefined reference to `btTriangleMesh::addTriangle(btVector3 const&, btVector3 const&, btVector3 const&, bool)'   
CollisionMeshConverter.cpp:(.text+0x440): undefined reference to `btAlignedAllocInternal(unsigned int, int)'                                                 
CollisionMeshConverter.cpp:(.text+0x461): undefined reference to `btBvhTriangleMeshShape::btBvhTriangleMeshShape(btStridingMeshInterface*, bool, bool)'      
CollisionMeshConverter.cpp:(.text+0x495): undefined reference to `btAlignedFreeInternal(void*)'                                                              
CollisionMeshConverter.cpp:(.text+0x4a7): undefined reference to `btAlignedFreeInternal(void*)'
If you need any other output, i'll be happy to post it.

Thanks!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [bullet] Undefined refernces compiling

#2 Post by Geoff the Medio »

I'm guessing here since I don't use linux to build FreeOrion, but it might help to post the contents of your config.log and config.cache in the FreeOrion directory, and post the equivalents of what was asked for in this post but for bullet instead of GiGi / OGRE.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: [bullet] Undefined refernces compiling

#3 Post by OndrejR »

FO doesn't see bullet. Did you create symlinks as are described in wiki linux compile howto when compiling bullet?

User avatar
flx
Space Krill
Posts: 6
Joined: Sun Feb 22, 2009 6:48 pm

Re: [bullet] Undefined refernces compiling

#4 Post by flx »

Sorry for the late reply, but i didnt have much time to try until today. Let's see
OndrejR wrote:FO doesn't see bullet. Did you create symlinks as are described in wiki linux compile howto when compiling bullet?
I compiled bullet with yaourt wich didnt built the shared libraries unless its told to :( . Fixed that, symliked and ran ldconfig, they are /usr/lib instead of /usr/local/lib, but i guess that is distro specific and harmless as long as ldconfig knows where it is

Code: Select all

$ ldconfig -v | grep bullet
        libBulletSoftBody.so.2.73 -> libbulletsoftbody.so
        libBulletCollision.so.2.73 -> libbulletcollision.so
        libBulletDynamics.so.2.73 -> libbulletdynamics.so
Then cleaned/reconfigured/tried again but no luck.
Geoff the Medio wrote:I'm guessing here since I don't use linux to build FreeOrion, but it might help to post the contents of your config.log and config.cache in the FreeOrion directory, and post the equivalents of what was asked for in this post but for bullet instead of GiGi / OGRE.

Code: Select all

$ pkg-config --cflags bullet

yep, empty :? could that be the problem?

this is my bullet.pc

Code: Select all

$ cat /usr/lib/pkgconfig/bullet.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Bullet
Version: 2.73
Description: Bullet Physics library
Cflags: -I${includedir}
config.log and config.cache attached

Thanks!
Attachments
config.zip
Config log and cache, zipped
(1.69 KiB) Downloaded 157 times

User avatar
flx
Space Krill
Posts: 6
Joined: Sun Feb 22, 2009 6:48 pm

Re: [bullet] Undefined refernces compiling

#5 Post by flx »

Hi i've been trying some more and i've found a litle oddity (i'm starting to hate scons :P )

If I run

Code: Select all

$ scons configure
It can't find GiGiOgre

Code: Select all

[...]
Checking for GiGiOgre >= 0.6.0... (cached) no
[...]
but if I run

Code: Select all

$ scons configure --config=force
It finds it

Code: Select all

[...]
Checking for GiGiOgre >= 0.6.0... yes
[...]
How can i disable or clear scons cache?

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: [bullet] Undefined refernces compiling

#6 Post by OndrejR »

delete config.cache or scons --clean

User avatar
flx
Space Krill
Posts: 6
Joined: Sun Feb 22, 2009 6:48 pm

Re: [bullet] Undefined refernces compiling

#7 Post by flx »

Thanks for the fast reply
OndrejR wrote:delete config.cache or scons --clean
Already tried, but it still uses cache

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: [bullet] Undefined refernces compiling

#8 Post by OndrejR »

Try also delete in .sconf_temp all files except *.cpp and *.c

User avatar
flx
Space Krill
Posts: 6
Joined: Sun Feb 22, 2009 6:48 pm

Re: [bullet] Undefined refernces compiling

#9 Post by flx »

OndrejR wrote:Try also delete in .sconf_temp all files except *.cpp and *.c
Didnt work, i'm checking out the project again.


edit: checking out clean half worked, it only configured boost from cache :?
edit2: configure ok with bullet but still fails compiling, i'll try building bullet again

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: [bullet] Undefined refernces compiling

#10 Post by OndrejR »

If you have something like this:

Code: Select all

scons: Configure: Checking for bullet >= 2.73... no
...
scons: Configure: Checking for btVector3() in C++ library bulletmath... yes
It means bullet was successfully found(if you have bullet 2.73). Bullet pkg config file is missing, but it doesn't matter.

User avatar
flx
Space Krill
Posts: 6
Joined: Sun Feb 22, 2009 6:48 pm

Re: [bullet] Undefined refernces compiling

#11 Post by flx »

OndrejR wrote:If you have something like this:

Code: Select all

scons: Configure: Checking for bullet >= 2.73... no
...
scons: Configure: Checking for btVector3() in C++ library bulletmath... yes
It means bullet was successfully found(if you have bullet 2.73). Bullet pkg config file is missing, but it doesn't matter.

scons configure finds the pkg-config.

Code: Select all

Checking for bullet >= 2.73... (cached) yes
maybe it can't find the headers, but they are in /usr/include

I'll try to move the pkg config, so it finds it the other way
edit: hiding bullet.pc from pkg-config didnt work :(

Post Reply