Compiling ogreode on linux?

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
Grey
Greenskin
Posts: 137
Joined: Wed Mar 09, 2005 4:28 am
Location: Ontario, Canada
Contact:

Compiling ogreode on linux?

Post by Grey »

So, Since the dump the topic regarding compiling ogreode on linux seems to have been lost, so I'll ask again:

Any tips on getting ogreode to compile on linux? I've seen a few "edit this here, change that there" posts before, (which are lost now) and there were some patches/makefiles floating around? pretty please anyone with a decent patch/makefile/source tree that will compilie without too much headache on linux, post it here, since last time the links were dead by time I got here, I'll mirror them, once on my server, once on a friends, (next week, he's getting a new mobo)

dermont
Orc Shaman
Posts: 785
Joined: Thu Dec 09, 2004 2:51 am
x 35

Post by dermont »

This is how I got it to work:
1. Download Monsters OgreOde 1.00 Final , rastaman's makefiles from:
http://www.green-eyed-monster.com/xoops ... downloads/
http://www.ceejs.com/eric/ogreode.makefiles.tgz
2. Follow the steps in $ODE_TOP/OgreOde_OGRE.txt
3. Extract OgreOde 1.00 in the same directory as ogrenew and rename to ogreode. Extract rastaman's makefile from the directory above ogreode and rename back to OgreOde
4.. Edit /ode-0.5/ode/src/dTerrainCallback.cpp and replace
//#include "windows.h"
//#include "ode\ode.h"
#include "ode/ode.h"
5. Compile ode
edit $ODE_TOP/ode-0.5/config/user-settings and set
PLATFORM=unix-gcc
cd $ODE_TOP/ode-0.5 ; make ; cp $ODE_TOP/ode-0.5/lib/libode.a /usr/local/lib ; ldconfig
6. Edit the following files:
- $ODE_TOP/prefab/src/Makeile.am and add line OgreOdeRagdoll.cpp \
- $ODE_TOP/prefab/src/OgreOdeVehicle.cpp
Quaternion wheel_rot = Quaternion(Radian(getSteer()),wheel_up);
//Quaternion wheel_rot = Quaternion(Radian(getSteer()),wheel_up);

- $ODE_TOP/ogreode/prefab/src/OgreOdeRagdoll.cpp
//Ragdoll::Ragdoll(const String& name, const String& mesh, SceneManager* creator):
// Entity(name,MeshManager::getSingleton().load(mesh,ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME),creator),
// PrefabObject(OgreOde_Prefab::ObjectType_Ragdoll)
Ragdoll::Ragdoll(const String& name, MeshPtr& ptr, SceneManager* creator):Entity(name,ptr,creator),
PrefabObject(OgreOde_Prefab::ObjectType_Ragdoll)

- $ODE_TOP/ogreode/prefab/include/OgreOdeRagdoll.h
//Ragdoll::Collapse _collapse;
Collapse _collapse;
//Ragdoll(const String& name, const String& mesh, SceneManager* creator);
Ragdoll(const String& name, MeshPtr& ptr, SceneManager* creator);

- $ODE_TOP/demos/SimpleScenes/include/SimpleScenes_Zombie.h
//_zombie_ragdoll = new OgreOde_Prefab::Ragdoll("zombie" + StringConverter::toString(_zombie_count),"zombie_small.mesh",_mgr);
MeshPtr ptr = MeshManager::getSingleton().load("zombie_small.mesh",ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
_zombie_ragdoll = new OgreOde_Prefab::Ragdoll("zombie" + StringConverter::toString(_zombie_count),ptr,_mgr);

6. From $ODE_TOP
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./bootstrap ; ./configure ; make ; make install (as root)

User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia
Contact:

Post by monster »

I've updated the download to hopefully fix these things and also add some Linux stuff (thanks Pablo) tha should make it easier to build. See the README in scripts/Linux for details.

User avatar
Grey
Greenskin
Posts: 137
Joined: Wed Mar 09, 2005 4:28 am
Location: Ontario, Canada
Contact:

Post by Grey »

I made a few updates to the ogreode.sh script, I had some problems figuring out what was happening where, so I added some lines to let the user know what's up, I also made it check for the existance of ode-0.5.tgz before continuing to delete and reinstall/patch the ode directory, finally, I changed the order of a few things in there, so it will patch Ogre, then build and install it, then build and install OgreOde, rather than patch Ogre, then try to build OgreOde before rebuilding Ogre.

I dunno if it'll help anyone, and I'd appreciate feedback, so I'll post a link here,
just download OgreOde-1.0.1 from Monster's site, and extract it all as usual, then copy ogreode.sh to ogrenew/OgreOde/scripts/Linux/ and run it from there.

you can get it here: http://grevian.org/~grey/files/ogreode.sh

Also, uhh... make a backup of the original ogreode.sh first, in case mine bombs out terribly, finally, THANK YOU PABLO, I'm assuming it was you who made those .diff files? They are awesome, and saved me a ton of headache.

the_python
Gnoblar
Posts: 10
Joined: Fri Mar 04, 2005 1:41 pm

Post by the_python »

Yes, I made the diffs, but the real automake work was from... mm I forgot!
my ogreode.sh was just a quick'n'dirty way of building ogreode (everything in order, building as root...), but yours seems much better.
thanks for sharing!
:D

gururise
Gnoblar
Posts: 13
Joined: Sat May 28, 2005 12:39 am

Post by gururise »

Following the instructions exactly and using the ogreode.sh included in the archive, it bombs out when compiling the ogreode demos (ODE seems to compile fine):

Code: Select all

g++ -g -O2 -DGCC_3_1 -DEXT_HASH -I/usr/local/include/OGRE -o .libs/SimpleScenes SimpleScenes-SimpleScenesApplication.o SimpleScenes-SimpleScenes.o SimpleScenes-tinystr.o SimpleScenes-tinyxml.o SimpleScenes-tinyxmlerror.o SimpleScenes-tinyxmlparser.o  -L/usr/local/lib -L/home/gene/Projects/ogrenew/OgreOde_1-0-1/src -L/home/gene/Projects/ogrenew/OgreOde_1-0-1/prefab/src /usr/local/lib/libOgreMain.so /home/gene/Projects/ogrenew/OgreOde_1-0-1/src/.libs/libOgreOde_Core.so /home/gene/Projects/ogrenew/OgreOde_1-0-1/prefab/src/.libs/libOgreOde_Prefab.so -Wl,--rpath -Wl,/usr/local/lib
/home/gene/Projects/ogrenew/OgreOde_1-0-1/src/.libs/libOgreOde_Core.so: undefined reference to `typeinfo for Ogre::MovableObject'
/home/gene/Projects/ogrenew/OgreOde_1-0-1/src/.libs/libOgreOde_Core.so: undefined reference to `typeinfo for Ogre::SimpleRenderable'
/home/gene/Projects/ogrenew/OgreOde_1-0-1/prefab/src/.libs/libOgreOde_Prefab.so: undefined reference to `typeinfo for Ogre::Entity'
collect2: ld returned 1 exit status
make[4]: *** [SimpleScenes] Error 1
make[4]: Leaving directory `/home/gene/Projects/ogrenew/OgreOde_1-0-1/demos/SimpleScenes/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/gene/Projects/ogrenew/OgreOde_1-0-1/demos/SimpleScenes'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/gene/Projects/ogrenew/OgreOde_1-0-1/demos'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/gene/Projects/ogrenew/OgreOde_1-0-1'
make: *** [all] Error 2
Any idea why this is happening?

Post Reply