You are not logged in.
Pages: 1
Here I am to seek help in yet another problem.
I'm working on a game engine that uses the Box2D library for physics simulation. As such, I searched the AUR and found a package there. Neat! Tried to install it but it only had the i686 tag on it so it wouldn't run. I then tried again, this time adding the x86_64 tag and it managed to grab the sources from svn. However, while compiling, it throws this error and doesn't install:
Gen/float/./Dynamics/b2Body.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
Gen/float/./Dynamics/b2Body.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [Gen/float/libbox2d.so] Error 1
make[1]: *** [all] Error 2
I then tried manually compiling the sources by downloading them from the Box2D site and running make. However, this time, a new error came up, saying that memcpy was not declared. That file includes memory.h which in turn includes string.h where there's a memcpy external declaration so I cannot see what's the problem.
Can you guys help me?
Thank you in advance
Offline
you need to compile all objext files that will be part of the shared library with -fPIC
See in the build system if there any way to do this, otherwise you need to do manually.
Offline
Ok I managed to compile Box2D by using this repository created to fix some Linux-specific make problems.
http://www.box2d.org/forum/viewtopic.php?f=7&t=2375
I had to add the -fPIC flag to the CXXFlags in Build/gnumake/config.mk for it to work on 64 bits though.
Thanks
Offline
Pages: 1