Can't compile OgreBullet on Ubuntu 8.04

tudhalyas

04-09-2008 21:43:17

Hi guys!
I want to try OgreBullet on Linux, so I've downloaded all sources from SVN and tried to compile them.
I managed to make autogen.sh work by using dos2unix, and I can execute ./configure successfully, but the compilation fails with this error:


g++ -DHAVE_CONFIG_H -I. -I../.. -DOGRE_GUI_gtk -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include -I/usr/local/include/OGRE -I/usr/local/include/bullet -I../include -g -O2 -MT OgreBulletCollisionsTrimeshShape.lo -MD -MP -MF .deps/OgreBulletCollisionsTrimeshShape.Tpo -c Shapes/OgreBulletCollisionsTrimeshShape.cpp -fPIC -DPIC -o .libs/OgreBulletCollisionsTrimeshShape.o
In file included from Shapes/OgreBulletCollisionsTrimeshShape.cpp:31:
../include/Utils/OgreBulletConverter.h:71:49: warning: no newline at end of file
g++ -DHAVE_CONFIG_H -I. -I../.. -DOGRE_GUI_gtk -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include -I/usr/local/include/OGRE -I/usr/local/include/bullet -I../include -g -O2 -MT OgreBulletCollisionsTrimeshShape.lo -MD -MP -MF .deps/OgreBulletCollisionsTrimeshShape.Tpo -c Shapes/OgreBulletCollisionsTrimeshShape.cpp -o OgreBulletCollisionsTrimeshShape.o >/dev/null 2>&1
mv -f .deps/OgreBulletCollisionsTrimeshShape.Tpo .deps/OgreBulletCollisionsTrimeshShape.Plo
/bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -DOGRE_GUI_gtk -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include -I/usr/local/include/OGRE -I/usr/local/include/bullet -I../include -g -O2 -MT OgreBulletCollisionsMeshToShapeConverter.lo -MD -MP -MF .deps/OgreBulletCollisionsMeshToShapeConverter.Tpo -c -o OgreBulletCollisionsMeshToShapeConverter.lo `test -f 'Utils/OgreBulletCollisionsMeshToShapeConverter.cpp' || echo './'`Utils/OgreBulletCollisionsMeshToShapeConverter.cpp
g++ -DHAVE_CONFIG_H -I. -I../.. -DOGRE_GUI_gtk -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include -I/usr/local/include/OGRE -I/usr/local/include/bullet -I../include -g -O2 -MT OgreBulletCollisionsMeshToShapeConverter.lo -MD -MP -MF .deps/OgreBulletCollisionsMeshToShapeConverter.Tpo -c Utils/OgreBulletCollisionsMeshToShapeConverter.cpp -fPIC -DPIC -o .libs/OgreBulletCollisionsMeshToShapeConverter.o
Utils/OgreBulletCollisionsMeshToShapeConverter.cpp:782:2: warning: no newline at end of file
g++ -DHAVE_CONFIG_H -I. -I../.. -DOGRE_GUI_gtk -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include -I/usr/local/include/OGRE -I/usr/local/include/bullet -I../include -g -O2 -MT OgreBulletCollisionsMeshToShapeConverter.lo -MD -MP -MF .deps/OgreBulletCollisionsMeshToShapeConverter.Tpo -c Utils/OgreBulletCollisionsMeshToShapeConverter.cpp -o OgreBulletCollisionsMeshToShapeConverter.o >/dev/null 2>&1
mv -f .deps/OgreBulletCollisionsMeshToShapeConverter.Tpo .deps/OgreBulletCollisionsMeshToShapeConverter.Plo
/bin/bash ../../libtool --tag=CXX --mode=link g++ -g -O2 -o libOgreBulletCol.la -rpath /usr/local/lib OgreBulletCollisionsObject.lo OgreBulletCollisionsObjectState.lo OgreBulletCollisionsPrecompiled.lo OgreBulletCollisionsRay.lo OgreBulletCollisionsShape.lo OgreBulletCollisionsWorld.lo OgreBulletCollisionsDebugContact.lo OgreBulletCollisionsDebugDrawer.lo OgreBulletCollisionsDebugLines.lo OgreBulletCollisionsDebugShape.lo OgreBulletCollisionsBoxShape.lo OgreBulletCollisionsCapsuleShape.lo OgreBulletCollisionsCompoundShape.lo OgreBulletCollisionsConeShape.lo OgreBulletCollisionsConvexHullShape.lo OgreBulletCollisionsCylinderShape.lo OgreBulletCollisionsGImpactShape.lo OgreBulletCollisionsMinkowskiSumShape.lo OgreBulletCollisionsMultiSphereShape.lo OgreBulletCollisionsSphereShape.lo OgreBulletCollisionsStaticPlaneShape.lo OgreBulletCollisionsTriangleShape.lo OgreBulletCollisionsTrimeshShape.lo OgreBulletCollisionsMeshToShapeConverter.lo -L/usr/local/lib -lOgreMain -L/usr/local/lib -lbulletdynamics -lbulletcollision -lbulletmath
g++ -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.2.3/crtbeginS.o .libs/OgreBulletCollisionsObject.o .libs/OgreBulletCollisionsObjectState.o .libs/OgreBulletCollisionsPrecompiled.o .libs/OgreBulletCollisionsRay.o .libs/OgreBulletCollisionsShape.o .libs/OgreBulletCollisionsWorld.o .libs/OgreBulletCollisionsDebugContact.o .libs/OgreBulletCollisionsDebugDrawer.o .libs/OgreBulletCollisionsDebugLines.o .libs/OgreBulletCollisionsDebugShape.o .libs/OgreBulletCollisionsBoxShape.o .libs/OgreBulletCollisionsCapsuleShape.o .libs/OgreBulletCollisionsCompoundShape.o .libs/OgreBulletCollisionsConeShape.o .libs/OgreBulletCollisionsConvexHullShape.o .libs/OgreBulletCollisionsCylinderShape.o .libs/OgreBulletCollisionsGImpactShape.o .libs/OgreBulletCollisionsMinkowskiSumShape.o .libs/OgreBulletCollisionsMultiSphereShape.o .libs/OgreBulletCollisionsSphereShape.o .libs/OgreBulletCollisionsStaticPlaneShape.o .libs/OgreBulletCollisionsTriangleShape.o .libs/OgreBulletCollisionsTrimeshShape.o .libs/OgreBulletCollisionsMeshToShapeConverter.o -L/usr/local/lib /usr/local/lib/libOgreMain.so -lbulletdynamics -lbulletcollision -lbulletmath -L/usr/lib/gcc/x86_64-linux-gnu/4.2.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.2.3/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib/crtn.o -Wl,-soname -Wl,libOgreBulletCol.so.0 -o .libs/libOgreBulletCol.so.0.0.0
(cd .libs && rm -f libOgreBulletCol.so.0 && ln -s libOgreBulletCol.so.0.0.0 libOgreBulletCol.so.0)
(cd .libs && rm -f libOgreBulletCol.so && ln -s libOgreBulletCol.so.0.0.0 libOgreBulletCol.so)
ar cru .libs/libOgreBulletCol.a OgreBulletCollisionsObject.o OgreBulletCollisionsObjectState.o OgreBulletCollisionsPrecompiled.o OgreBulletCollisionsRay.o OgreBulletCollisionsShape.o OgreBulletCollisionsWorld.o OgreBulletCollisionsDebugContact.o OgreBulletCollisionsDebugDrawer.o OgreBulletCollisionsDebugLines.o OgreBulletCollisionsDebugShape.o OgreBulletCollisionsBoxShape.o OgreBulletCollisionsCapsuleShape.o OgreBulletCollisionsCompoundShape.o OgreBulletCollisionsConeShape.o OgreBulletCollisionsConvexHullShape.o OgreBulletCollisionsCylinderShape.o OgreBulletCollisionsGImpactShape.o OgreBulletCollisionsMinkowskiSumShape.o OgreBulletCollisionsMultiSphereShape.o OgreBulletCollisionsSphereShape.o OgreBulletCollisionsStaticPlaneShape.o OgreBulletCollisionsTriangleShape.o OgreBulletCollisionsTrimeshShape.o OgreBulletCollisionsMeshToShapeConverter.o
ranlib .libs/libOgreBulletCol.a
creating libOgreBulletCol.la
(cd .libs && rm -f libOgreBulletCol.la && ln -s ../libOgreBulletCol.la libOgreBulletCol.la)
make[3]: Leaving directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet/Collisions/src'
make[3]: Entering directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet/Collisions'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet/Collisions'
make[2]: Leaving directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet/Collisions'
Making all in Dynamics
make[2]: Entering directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet/Dynamics'
Making all in include
make[3]: Entering directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet/Dynamics/include'
Making all in Constraints
make[4]: Entering directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet/Dynamics/include/Constraints'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet/Dynamics/include/Constraints'
Making all in Prefab
make[4]: Entering directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet/Dynamics/include/Prefab'
make[4]: *** No rule to make target `all'. Stop.
make[4]: Leaving directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet/Dynamics/include/Prefab'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet/Dynamics/include'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet/Dynamics'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tudhalyas/sorgenti/ogre_addons/ogrebullet'
make: *** [all] Error 2


It seems that a Makefile is missing in ogrebullet/Dynamics/include/Prefab... can someone help me out here?

Thanks a lot!

calsmurf2904

20-09-2008 17:43:59

Maybe this will help you :
http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=6798

ppClarity

03-10-2008 15:07:50

AFAICT, the changes in that thread are all in SVN now. To get around this problem you need to add the following line configure.ac:

AC_CONFIG_FILES([Makefile
Collisions/Makefile
Collisions/src/Makefile
Collisions/include/Makefile
Collisions/include/Debug/Makefile
Collisions/include/Shapes/Makefile
Collisions/include/Utils/Makefile
Dynamics/Makefile
Dynamics/src/Makefile
Dynamics/include/Makefile
Dynamics/include/Constraints/Makefile
+ Dynamics/include/Prefab/Makefile
OgreBullet.pc
])


The next problem:
Collisions/include/OgreBulletCollisionsRay.h has declared both getRayStartPoint() and getRayStartPoint() as inline but their implementations are still in Collisions/src/OgreBulletCollisionsRay.cpp so you'll need to move the functions from the .cpp to the .h.

The other issue I ran into was that the bullet (2.7.1) installation didn't install the GIMPACT libs (and others). They were compiled but never copied to /usr/local/lib.

davek20

14-10-2008 20:21:07

I'm having some problems with compiling OgreBullet on Ubuntu 8.04. I got it from svn, ran the dos2unix on all the files, ran autogen.sh, and configure.

Then when I run make I get this error:

g++ -shared -nostdlib /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.2.3/crtbeginS.o .libs/OgreBulletCollisionsObject.o .libs/OgreBulletCollisionsObjectState.o .libs/OgreBulletCollisionsPrecompiled.o .libs/OgreBulletCollisionsRay.o .libs/OgreBulletCollisionsShape.o .libs/OgreBulletCollisionsWorld.o .libs/OgreBulletCollisionsDebugContact.o .libs/OgreBulletCollisionsDebugDrawer.o .libs/OgreBulletCollisionsDebugLines.o .libs/OgreBulletCollisionsDebugShape.o .libs/OgreBulletCollisionsBoxShape.o .libs/OgreBulletCollisionsCapsuleShape.o .libs/OgreBulletCollisionsCompoundShape.o .libs/OgreBulletCollisionsConeShape.o .libs/OgreBulletCollisionsConvexHullShape.o .libs/OgreBulletCollisionsCylinderShape.o .libs/OgreBulletCollisionsGImpactShape.o .libs/OgreBulletCollisionsMinkowskiSumShape.o .libs/OgreBulletCollisionsMultiSphereShape.o .libs/OgreBulletCollisionsSphereShape.o .libs/OgreBulletCollisionsStaticPlaneShape.o .libs/OgreBulletCollisionsTriangleShape.o .libs/OgreBulletCollisionsTrimeshShape.o .libs/OgreBulletCollisionsMeshToShapeConverter.o -L/usr/local/lib /usr/local/lib/libOgreMain.so -lbulletdynamics -lbulletcollision -lbulletmath -L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i486-linux-gnu/4.2.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crtn.o -Wl,-soname -Wl,libOgreBulletCol.so.0 -o .libs/libOgreBulletCol.so.0.0.0
/usr/bin/ld: .libs/OgreBulletCollisionsObject.o: bad reloc symbol index (0x230000 >= 0x194) for offset 0x100000a in section `.debug_info'
.libs/OgreBulletCollisionsObject.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [libOgreBulletCol.la] Error 1
make[3]: Leaving directory `/home/dave/Desktop/ogre/ogrebullet/Collisions/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/dave/Desktop/ogre/ogrebullet/Collisions'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dave/Desktop/ogre/ogrebullet'
make: *** [all] Error 2



I'm using Bullet 2.7.1 and Ogre 1.4.9.

Any ideas?

EDIT!!!!

Ok it compiles now just fine. I had to change the configure.ac to what was posted above (I assumed the SVN version had that change in there, I guess not).

tuan kuranes

23-10-2008 15:41:23

Can you provide a patch file (best is to post on ogreaddons sourceforge tracker)