[Help] Compiling PLSM2

nightwing

01-11-2009 10:37:22

Hi to all.

I'm in trouble compiling PLSM2 (from svn trunk) with ogre (v1.6.4).
I do the following steps:

0. I 'svn co' PLSM2 sources, unpack it and call ./bootstrap
1. ./bootstrap can't find libtool 1.4 or above (when I have libtool 2.2.6 propely installed). So I change the bootstrap script as follows:

if test 140 -gt "`libtool --version 2>&1|head -n 1|egrep '1.[4-5]'`"; then
echo "Libtool 1.4 or above is required. Aborting build...";
exit 1;
fi


It solves this problem.

2. When I run make g++ tells me that it can't find OctreeSceneManager.h, so I manually copy all from Plugins/OctreeSceneManager/include to $OGRE_HOME/include. It solves this problem.

3. I run make again and libtool (on link stage) tells me that it can't find OctreeSceneManager library (undefined references to Ogre::OctreeSceneManager:: ...). So I change Makefile as follows:


/bin/sh ../../../libtool --tag=CXX --mode=link g++ -g -O2 -module -L/home/username/pkg/ogre/sdk/lib -L/home/username/pkg/ogre/sdk/lib/OGRE -lOgreMain -l:Plugin_OctreeSceneManager.a ...


4. I run make again and libtool tells me (on the same stage):


/home/username/pkg/ogre/sdk/lib/OGRE/Plugin_OctreeSceneManager.a(OgreOctreeSceneManager.o): In function `Ogre::intersect(Ogre::AxisAlignedBox const&, Ogre::AxisAlignedBox const&)':
/home/username/pkg/ogre/src/ogre/PlugIns/OctreeSceneManager/src/../../../OgreMain/include/OgreException.h:152: multiple definition of `Ogre::intersect(Ogre::AxisAlignedBox const&, Ogre::AxisAlignedBox const&)'
.libs/Plugin_PagingLandScape2_la-OgrePagingLandScapeOctreeSceneManager.o:/home/username/pkg/ogre/src/plsm/PlugIns/PagingLandScape2/src/OgrePagingLandScapeOctreeSceneManager.cpp:339: first defined here
/home/username/pkg/ogre/sdk/lib/OGRE/Plugin_OctreeSceneManager.a(OgreOctreeSceneManager.o): In function `findNodesInBox':
/home/username/pkg/ogre/src/ogre/PlugIns/OctreeSceneManager/src/OgreOctreeSceneManager.cpp:53: multiple definition of `findNodesInBox'
.libs/Plugin_PagingLandScape2_la-OgrePagingLandScapeOctreeSceneManager.o:/home/username/pkg/ogre/src/plsm/PlugIns/PagingLandScape2/src/OgrePagingLandScapeOctreeSceneManager.cpp:74: first defined here
/home/username/pkg/ogre/sdk/lib/OGRE/Plugin_OctreeSceneManager.a(OgreOctreeSceneManager.o): In function `Ogre::intersect(Ogre::PlaneBoundedVolume const&, Ogre::AxisAlignedBox const&)':
/home/username/pkg/ogre/src/ogre/PlugIns/OctreeSceneManager/src/OgreOctreeSceneManager.cpp:147: multiple definition of `Ogre::intersect(Ogre::PlaneBoundedVolume const&, Ogre::AxisAlignedBox const&)'
.libs/Plugin_PagingLandScape2_la-OgrePagingLandScapeOctreeSceneManager.o:/home/username/pkg/ogre/src/plsm/PlugIns/PagingLandScape2/src/OgrePagingLandScapeOctreeSceneManager.cpp:292: first defined here
/home/username/pkg/ogre/sdk/lib/OGRE/Plugin_OctreeSceneManager.a(OgreOctreeSceneManager.o): In function `Ogre::intersect(Ogre::Ray const&, Ogre::AxisAlignedBox const&)':
/home/username/pkg/ogre/src/ogre/PlugIns/OctreeSceneManager/src/OgreOctreeSceneManager.cpp:76: multiple definition of `Ogre::intersect(Ogre::Ray const&, Ogre::AxisAlignedBox const&)'
.libs/Plugin_PagingLandScape2_la-OgrePagingLandScapeOctreeSceneManager.o:/home/username/pkg/ogre/sdk//include/OGRE/OgreException.h:152: first defined here
/home/username/pkg/ogre/sdk/lib/OGRE/Plugin_OctreeSceneManager.a(OgreOctreeSceneManager.o): In function `Ogre::intersect(Ogre::Sphere const&, Ogre::AxisAlignedBox const&)':
/home/username/pkg/ogre/src/ogre/PlugIns/OctreeSceneManager/src/OgreOctreeSceneManager.cpp:229: multiple definition of `Ogre::intersect(Ogre::Sphere const&, Ogre::AxisAlignedBox const&)'
.libs/Plugin_PagingLandScape2_la-OgrePagingLandScapeOctreeSceneManager.o:/home/username/pkg/ogre/src/plsm/PlugIns/PagingLandScape2/src/OgrePagingLandScapeOctreeSceneManager.cpp:380: first defined here
/home/username/pkg/ogre/sdk/lib/OGRE/Plugin_OctreeSceneManager.a(OgreOctreeSceneManager.o): In function `findNodesInSphere':
/home/username/pkg/ogre/src/ogre/PlugIns/OctreeSceneManager/src/OgreOctreeSceneManager.cpp:60: multiple definition of `findNodesInSphere'
.libs/Plugin_PagingLandScape2_la-OgrePagingLandScapeOctreeSceneManager.o:/home/username/pkg/ogre/src/plsm/PlugIns/PagingLandScape2/src/OgrePagingLandScapeOctreeSceneManager.cpp:81: first defined here
collect2: ld returned 1 exit status


looks like the same functions defined in OctreeSceneManager and PagingLandscapeSceneManager.
I'm stuck on this. Please, if anyone knows the way to solve the problem, let he will tell me. Thanks