Jump to content

Link Failed


Recommended Posts

Hi all, please help me solve that error:

~/data/compile/bullet/dop/bullet-physics-solver/src$ ./build.sh

Making debug version

Linking with 'libBulletDynamics'

Linking with 'libBulletCollision'

Linking with 'libBulletSoftBody'

Linking with 'libLinearMath'

Making SIM_SolverBullet.o and /home/xx/houdini11.0/dso/SIM_SolverBullet.so from SIM_SolverBullet.cpp

/usr/bin/ld: /usr/local/lib//libBulletDynamics.a(btSequentialImpulseConstraintSolver.o): relocation R_X86_64_32S against `vtable for btSequentialImpulseConstraintSolver' can not be used when making a shared object; recompile with -fPIC

/usr/local/lib//libBulletDynamics.a: could not read symbols: Bad value

collect2: ld returned 1 exit status

Link failed

OS: Ubuntu 10.04 x64

Houdini: 11.813

Bullet: 2.78

Bullet-DOP: (i don't know where i can get ver)

Thanks for helping ...

Link to comment
Share on other sites

Just add -fPIC to your Makefile or where the build settings are specified.

looks like hcustom have used this option on compile time:

i check that with "-c" option:

hcustom -c

-DVERSION=\"11.0.813\" -D_GNU_SOURCE -DLINUX -DAMD64 -m64 -fPIC -DSIZEOF_VOID_P=8 -DSESI_LITTLE_ENDIAN -DENABLE_THREADS -DUSE_PTHREADS -D_REENTRANT -D_FILE_OFFSET_BITS=64 -c -DGCC4 -DGCC3 -Wno-deprecated -I/opt/h11/toolkit/include -I/opt/h11/toolkit/include/htools -Wall -W -Wno-parentheses -Wno-sign-compare -Wno-reorder -Wno-uninitialized -Wunused -Wno-unused-parameter -O2

?

Link to comment
Share on other sites

looks like hcustom have used this option on compile time:

i check that with "-c" option:

hcustom -c

-DVERSION=\"11.0.813\" -D_GNU_SOURCE -DLINUX -DAMD64 -m64 -fPIC -DSIZEOF_VOID_P=8 -DSESI_LITTLE_ENDIAN -DENABLE_THREADS -DUSE_PTHREADS -D_REENTRANT -D_FILE_OFFSET_BITS=64 -c -DGCC4 -DGCC3 -Wno-deprecated -I/opt/h11/toolkit/include -I/opt/h11/toolkit/include/htools -Wall -W -Wno-parentheses -Wno-sign-compare -Wno-reorder -Wno-uninitialized -Wunused -Wno-unused-parameter -O2

?

That indeed is already in there. From what repository did you check out the source code? I'll try compiling it here if I get the time.

Link to comment
Share on other sites

That indeed is already in there. From what repository did you check out the source code? I'll try compiling it here if I get the time.

Bullet from there: http://code.google.com/p/bullet/downloads/list

DOP's: http://gitorious.org/bullet-physics-solver/bullet-physics-solver (just go in and download "master" tar.gz)

Making SIM_SolverBullet.o and /home/roman/houdini11.0/dso/SIM_SolverBullet.so from SIM_SolverBullet.cpp
/usr/bin/ld: /usr/local/lib/libBulletDynamics.a(btSequentialImpulseConstraintSolver.o): relocation R_X86_64_32S against `vtable for btSequentialImpulseConstraintSolver' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libBulletDynamics.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
Link failed

i have not ideas what i can do with that error... Something is wrong with btSequentialImpulseConstraintSolver.o or it's src code.. I think i need Bullet DOP some developers help and attention, may be something versions mismatch...

Sad.

Link to comment
Share on other sites

Sorry it took some time. Trying to finish up my thesis. Anyways the problem is that bullet itself aint compiled with -fPIC.

You can fix this by when creating your makefiles for bullet use

cmake . -G "Unix Makefiles" -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_C_FLAGS="-fPIC"

instead of the regular

cmake . -G "Unix Makefiles"

After that it compiled fine here. I also used http://gitorious.org/~almatea/bullet-physics-solver/almateas-bullet-physics-solver instead which seems to be a slightly more recent fork but i think it should work with the regular one as well.

System specs for my machine:

Linux Mint 11 (Ubuntu 11.04) 64bit

Houdini 11.0.733

Bullet 2.78

Edited by Erik_JE
  • Like 1
Link to comment
Share on other sites

Sorry it took some time. Trying to finish up my thesis. Anyways the problem is that bullet itself aint compiled with -fPIC.

You can fix this by when creating your makefiles for bullet use

cmake . -G "Unix Makefiles" -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_C_FLAGS="-fPIC"

instead of the regular

cmake . -G "Unix Makefiles"

After that it compiled fine here. I also used http://gitorious.org/~almatea/bullet-physics-solver/almateas-bullet-physics-solver instead which seems to be a slightly more recent fork but i think it should work with the regular one as well.

System specs for my machine:

Linux Mint 11 (Ubuntu 11.04) 64bit

Houdini 11.0.733

Bullet 2.78

Thanks !

Today i have found another solution, all works but i'm on testing stage.

cmake . -G "Unix Makefiles" -DBUILD_SHARED_LIBS=ON -DBUILD_DEMOS=OFF

after that i can compile all what i need..

Now i test DOP and have some troubles. But this is for another thread :)

Thanks Erik_JE !

Link to comment
Share on other sites

Thanks !

Today i have found another solution, all works but i'm on testing stage.

cmake . -G "Unix Makefiles" -DBUILD_SHARED_LIBS=ON -DBUILD_DEMOS=OFF

after that i can compile all what i need..

Now i test DOP and have some troubles. But this is for another thread :)

Thanks Erik_JE !

No problem, good that you got it working. It will be great with the native bullet solver in H12.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...