EternalNewbye
19-10-2006 21:27:58
Hi,
I've been trying to get OgreODE to compile on my Gentoo Linux.
For starters, I use gcc 4.1.1, and I've already successfully installed OGRE 1.2.2 and ODE 0.7
I (hopefully) got the last version of OgreODE from http://tuan.kuranes.free.fr/OgreOde.zip.
I had to tweak some settings to get it to start compiling :
Gentoo doesn't use a central OGRE directory to put everything in, so I had to specify the sample directory by hand. And, I wanted to compile it with the ODE sources as they are installed on my system, not the ones that are in the zipfile.
(the point here is to be abble to make some patches and ebuild for gentoo, to get all that automated for other gentoo users)
Since I'm quite new to all the aclocal/configure/automake stuff, it was mostly a trial and error process trying to get a bit farther every time.
First, I changed src/Makefile.am to get it to use the installed ODE (original version is commented out) :
I also changed the last line of prefab/src/configure.am in the same way.
Then, I changed line 29 in configure.ac to have it use /usr/share/doc/ogre-1.2.2_p1/Samples as the root directory for OGRE samples, since that's where they are stored on gentoo (I know there is a command line option for that, but I since I want to make a gentoo only patch, I thought that I might as well change it in the file).
Then I want the way I thought I had to do it :
So, here is where I bumped into something that I can't solve alone ...
make stops, and tells me nicely :
So, what I can guess without my head hurting too much, is we have some linker problem somewhere ... moreover, the problem seems to be with the OGRE part and not the ODE one.
Before anyone asks the question, yes, I've already compiled stuff (the tutorial apps) against OGRE, and it seemed to work well as far as I could see.
Has anyone got an idea what to try now ?
Thanks for reading this far ...
PS : I am also wondering about the $(STLPORT_CFLAGS) ... I don't use STLport, and I think its use for OGRE is optional on linux. Is it safe to eliminate the variable ?
I've been trying to get OgreODE to compile on my Gentoo Linux.
For starters, I use gcc 4.1.1, and I've already successfully installed OGRE 1.2.2 and ODE 0.7
I (hopefully) got the last version of OgreODE from http://tuan.kuranes.free.fr/OgreOde.zip.
I had to tweak some settings to get it to start compiling :
Gentoo doesn't use a central OGRE directory to put everything in, so I had to specify the sample directory by hand. And, I wanted to compile it with the ODE sources as they are installed on my system, not the ones that are in the zipfile.
(the point here is to be abble to make some patches and ebuild for gentoo, to get all that automated for other gentoo users)
Since I'm quite new to all the aclocal/configure/automake stuff, it was mostly a trial and error process trying to get a bit farther every time.
First, I changed src/Makefile.am to get it to use the installed ODE (original version is commented out) :
INCLUDES = \
$(STLPORT_CFLAGS) \
${OGRE_CFLAGS} \
-I$(top_srcdir)/include
# -I$(top_srcdir)/ode/include
lib_LTLIBRARIES = libOgreOde_Core.la
libOgreOde_Core_la_SOURCES = \
OgreOdeBody.cpp \
OgreOdeCollision.cpp \
OgreOdeDebugObject.cpp \
OgreOdeEigenSolver.cpp \
OgreOdeEntityInformer.cpp \
OgreOdeGeometry.cpp \
OgreOdeJoint.cpp \
OgreOdeMaintainedList.cpp \
OgreOdeMass.cpp \
OgreOdeMeshInformer.cpp \
OgreOdeSpace.cpp \
OgreOdeStepper.cpp \
OgreOdeUtility.cpp \
OgreOdeWorld.cpp
libOgreOde_Core_la_LIBADD = \
$(OGRE_LIBS) \
/usr/include/libode.a #$(top_srcdir)/ode/ode/src/libode.aI also changed the last line of prefab/src/configure.am in the same way.
Then, I changed line 29 in configure.ac to have it use /usr/share/doc/ogre-1.2.2_p1/Samples as the root directory for OGRE samples, since that's where they are stored on gentoo (I know there is a command line option for that, but I since I want to make a gentoo only patch, I thought that I might as well change it in the file).
Then I want the way I thought I had to do it :
$ bash autogen.sh
You should add the contents of `/usr/share/aclocal/libtool.m4' to `aclocal.m4'.
Running aclocal
Running autoheader
Running automake
configure.ac: installing `./install-sh'
configure.ac: installing `./missing'
demos/GranTurismOgre/src/Makefile.am: installing `./depcomp'
Running autoconf
Now you are ready to run ./configure
$ ./configure
...
$ makeSo, here is where I bumped into something that I can't solve alone ...
make stops, and tells me nicely :
/bin/sh ../../../libtool --tag=CXX --mode=link g++ -g -O2 -o SimpleScenes -L../../../src -L../../../prefab/src SimpleScenes-SimpleScenesApplication.o SimpleScenes-SimpleScenes.o SimpleScenes-tinystr.o SimpleScenes-tinyxml.o SimpleScenes-tinyxmlerror.o SimpleScenes-tinyxmlparser.o -lOgreMain -lOgreOde_Core -lOgreOde_Prefab
g++ -g -O2 -o .libs/SimpleScenes SimpleScenes-SimpleScenesApplication.o SimpleScenes-SimpleScenes.o SimpleScenes-tinystr.o SimpleScenes-tinyxml.o SimpleScenes-tinyxmlerror.o SimpleScenes-tinyxmlparser.o -L/home/user/ogreode/src -L/home/user/ogreode/prefab/src -L/var/tmp/portage/devil-1.6.7-r1/work/DevIL-1.6.7/src-IL/src /home/user/ogreode/prefab/src/.libs/libOgreOde_Prefab.so /home/user/ogreode/src/.libs/libOgreOde_Core.so /usr/lib/libOgreMain.so /usr/lib/libfreetype.so /usr/lib/libzzip.so -lCg /usr/lib/libILU.so /usr/lib/libIL.so /usr/lib/libpng12.so /usr/lib/libjpeg.so -lboost_thread-mt -lpthread -lz -ldl
SimpleScenes-SimpleScenesApplication.o: In function `SimpleScenesApplication::createScene()':
/home/user/ogreode/demos/SimpleScenes/src/SimpleScenesApplication.cpp:114: undefined reference to `Ogre::Light::setDirection(float, float, float)'
/home/user/ogreode/demos/SimpleScenes/src/SimpleScenesApplication.cpp:116: undefined reference to `Ogre::Light::setSpecularColour(float, float, float)'
/home/user/ogreode/demos/SimpleScenes/src/SimpleScenesApplication.cpp:122: undefined reference to `Ogre::Camera::setPosition(float, float, float)'
/home/user/ogreode/demos/SimpleScenes/src/SimpleScenesApplication.cpp:123: undefined reference to `Ogre::Camera::lookAt(float, float, float)'
/home/user/ogreode/demos/SimpleScenes/src/SimpleScenesApplication.cpp:147: undefined reference to `Ogre::Plane::Plane(Ogre::Vector3 const&, float)'
SimpleScenes-SimpleScenesApplication.o: In function `SimpleScenesApplication::frameEnded(Ogre::FrameEvent const&, Ogre::InputReader*)':
/home/user/ogreode/demos/SimpleScenes/src/SimpleScenesApplication.cpp:280: undefined reference to `Ogre::Camera::setPosition(float, float, float)'
/home/user/ogreode/demos/SimpleScenes/src/SimpleScenesApplication.cpp:281: undefined reference to `Ogre::Camera::lookAt(float, float, float)'
SimpleScenes-SimpleScenesApplication.o: In function `SimpleScenes_Zombie::frameStarted(float, Ogre::InputReader*)':
../include/SimpleScenes_Zombie.h:201: undefined reference to `Ogre::AnimationState::addTime(float)'
SimpleScenes-SimpleScenesApplication.o: In function `SimpleScenes_Zombie::frameEnded(float, Ogre::InputReader*)':
../include/SimpleScenes_Zombie.h:244: undefined reference to `Ogre::Camera::getCameraToViewportRay(float, float) const'
../include/SimpleScenes_Zombie.h:283: undefined reference to `OgreOde_Prefab::OgreOdeDotLoader::loadRagdoll(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, OgreOde_Prefab::Ragdoll*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
SimpleScenes-SimpleScenesApplication.o: In function `ExampleFrameListener::updateStats()':
/usr/share/doc/ogre-1.2.2_p1/Samples/Common/include/ExampleFrameListener.h:71: undefined reference to `Ogre::StringConverter::toString(float, unsigned short, unsigned short, char, std::_Ios_Fmtflags)'
/usr/share/doc/ogre-1.2.2_p1/Samples/Common/include/ExampleFrameListener.h:72: undefined reference to `Ogre::StringConverter::toString(float, unsigned short, unsigned short, char, std::_Ios_Fmtflags)'
/usr/share/doc/ogre-1.2.2_p1/Samples/Common/include/ExampleFrameListener.h:74: undefined reference to `Ogre::StringConverter::toString(float, unsigned short, unsigned short, char, std::_Ios_Fmtflags)'
/usr/share/doc/ogre-1.2.2_p1/Samples/Common/include/ExampleFrameListener.h:76: undefined reference to `Ogre::StringConverter::toString(float, unsigned short, unsigned short, char, std::_Ios_Fmtflags)'
SimpleScenes-SimpleScenesApplication.o: In function `changeCar':
../include/SimpleScenes_Buggy.h:104: undefined reference to `OgreOde_Prefab::OgreOdeDotLoader::loadVehicle(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
SimpleScenes-SimpleScenesApplication.o: In function `SimpleScenes_Buggy':
../include/SimpleScenes_Buggy.h:104: undefined reference to `OgreOde_Prefab::OgreOdeDotLoader::loadVehicle(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
SimpleScenes-SimpleScenes.o: In function `SimpleScenes::createRagDoll()':
/home/user/ogreode/demos/SimpleScenes/src/SimpleScenes.cpp:151: undefined reference to `OgreOde_Prefab::OgreOdeDotLoader::loadRagdoll(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, OgreOde_Prefab::Ragdoll*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/user/ogreode/src/.libs/libOgreOde_Core.so: undefined reference to `non-virtual thunk to Ogre::SimpleRenderable::getWorldPosition() const'
/home/user/ogreode/src/.libs/libOgreOde_Core.so: undefined reference to `non-virtual thunk to Ogre::SimpleRenderable::getWorldTransforms(Ogre::Matrix4*) const'
/home/user/ogreode/src/.libs/libOgreOde_Core.so: undefined reference to `non-virtual thunk to Ogre::SimpleRenderable::getLights() const'
/home/user/ogreode/prefab/src/.libs/libOgreOde_Prefab.so: undefined reference to `Ogre::ShadowCaster::extrudeBounds(Ogre::AxisAlignedBox&, Ogre::Vector4 const&, float) const'
/home/user/ogreode/prefab/src/.libs/libOgreOde_Prefab.so: undefined reference to `Ogre::Entity::getShadowVolumeRenderableIterator(Ogre::ShadowTechnique, Ogre::Light const*, Ogre::HardwareIndexBufferSharedPtr*, bool, float, unsigned long)'
/home/user/ogreode/src/.libs/libOgreOde_Core.so: undefined reference to `non-virtual thunk to Ogre::SimpleRenderable::getRenderOperation(Ogre::RenderOperation&)'
/home/user/ogreode/src/.libs/libOgreOde_Core.so: undefined reference to `Ogre::Quaternion::Slerp(float, Ogre::Quaternion const&, Ogre::Quaternion const&, bool)'
/home/user/ogreode/src/.libs/libOgreOde_Core.so: undefined reference to `non-virtual thunk to Ogre::SimpleRenderable::getWorldOrientation() const'
/home/user/ogreode/src/.libs/libOgreOde_Core.so: undefined reference to `Ogre::Pass::setSelfIllumination(float, float, float)'
/home/user/ogreode/prefab/src/.libs/libOgreOde_Prefab.so: undefined reference to `Ogre::MovableObject::getDarkCapBounds(Ogre::Light const&, float) const'
/home/user/ogreode/src/.libs/libOgreOde_Core.so: undefined reference to `non-virtual thunk to Ogre::SimpleRenderable::getMaterial() const'
/home/user/ogreode/src/.libs/libOgreOde_Core.so: undefined reference to `Ogre::MovableObject::getShadowVolumeRenderableIterator(Ogre::ShadowTechnique, Ogre::Light const*, Ogre::HardwareIndexBufferSharedPtr*, bool, float, unsigned long)'
collect2: ld returned 1 exit status
make[4]: *** [SimpleScenes] Error 1
make[4]: Leaving directory `/home/user/ogreode/demos/SimpleScenes/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/user/ogreode/demos/SimpleScenes'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/user/ogreode/demos'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/ogreode'
make: *** [all] Error 2So, what I can guess without my head hurting too much, is we have some linker problem somewhere ... moreover, the problem seems to be with the OGRE part and not the ODE one.
Before anyone asks the question, yes, I've already compiled stuff (the tutorial apps) against OGRE, and it seemed to work well as far as I could see.
Has anyone got an idea what to try now ?
Thanks for reading this far ...
PS : I am also wondering about the $(STLPORT_CFLAGS) ... I don't use STLport, and I think its use for OGRE is optional on linux. Is it safe to eliminate the variable ?