areay
01-07-2010 09:41:59
Hi everyone, I've had a bit of a nightmare trying to install OgreBullet on Linux but I've finally got it all working correctly so I thought I'd share.
I've been over this a bunch of times and my build environment may be a little dirty, if you have any problems with this it's likely that I've left out a step or something. Please post any errors and I'll try and help out.
Cheers
Al
Preface
I'm using Fedora 10 32-bit (3 releases old at time of writing)
having built ogre-1.71 from source
using bullet from subversion, revision #2109
using ogrebullet from subversion, revision #2928
all operations done as a standard user
I have the svn (Subversion) utilities installed
All commands run as an unprivileged user unless otherwise stated
Overview
1. get bullet from SVN
2. a) attempt to configure bullet
b) satisfy dependencies
3. a) attempt to compile bullet
b) fix-up source files
4. Install bullet
5. Run Demo
6. Install Extras and Extra's headers
7. Fix-up pkgconfig file
8. Get OgreBullet from SVN
9. Configure
10. Install
11. Setup Eclipse
12. Setup resources.cfg
13. Run the OgreBullet tutorials. yay.
Bullet
* Get bullet sources
# cd ~
# svn checkout -r HEAD http://bullet.googlecode.com/svn/trunk/ ./bullet-svn
# cd bullet-svn
# ./autogen.sh
# ccmake .
press 'c' to configure
press 't' to goto expert mode
change CMAKE_INSTALL_PATH to =/usr
change INCLUDE_INSTALL_DIR to = /usr/lib/bullet
change LIB_DESTINATION to = /usr/lib
change PKGCONFIG_INSTALL_PREFIX = /usr/lib/pkgconfig/
change INCLUDE_INSTALL_DIR = /usr/include/bullet
change BUILD_DEMOS to = YES
change BUILD_MINICL_OPENCL_DEMOS to = NO
try to satisfy all the dependencies if possible, this may mean you have to install heaps of development header files ie. (as user root)
# yum install freeglut freeglut-devel glew-devel glew libXcursor libXcursor-devel libXcomposite libXcomposite-devel libXcursor libXcursor-devel libXdamage-devel libXdamage libXfixes libXfixes-devel libXinerama-devel libXinerama libXft libXft-devel libXxf86misc-devel libXxf86misc libXv libXv-devel clthreads-devel pth pth-devel
Many of these are probably not neccessary so don't stress too much
the way to tell if the library dependency is satisfied look for lines that include "_LIB-NOTFOUND" or "_INCLUDE_PATH-NOTFOUND". I recommend opening an additional shell terminal tab and installing the packages so you can quickly tab back and forth to the ccmake screen to verify that the dependency is satisfied (using the 'c' key and making sure the afflicted line has a proper link in it after running)
press 'c' to configure
press 'g' to generate and quit
# make
* there seems to be a bug in one of the demos where they forget about linux, if you get a compilation error talking about a problem with line 59 of ./Demos/ThreadingDemo/main.cpp then you need to open that file and rip some parts out
1. remove the ifdef line from line#27
2. remove the entire section starting with "#elif defined( _WIN32)" and all lines up to and including the next "#endif"
Ugly huh.
then, as root do a
# make install
At this point you should be able to view the Bullet demos
# ./Demos/AllBulletDemos/AllBulletDemo
* extras
still as root
# cd Extras
# make all
# make install
# cd ConvexDecomposition
# cp *.h /usr/include/Bulletcollision/
* update pkgconfig file. For some reason, it's not updated by the ccmake script
# vim /usr/lib/pkgconfig/bullet.pc
change the existing "Cflaggs"-line to read like this
Cflags: -I/usr/include/BulletCollision/ -I/usr/include/BulletDynamics/ -I/usr/include/BulletSoftBody/
OgreBullet
go back to using the normal user account
* get OgreBullet from SVN
# cd ~
# svn checkout https://ogreaddons.svn.sourceforge.net/ ... grebullet/ ./ogrebullet-svn
# cd ./ogrebullet-svn
# chmod +x ./autogen.sh
# ./autogen.sh
# ./configure --prefix=/usr
# make
# make install
Eclipse
add the following dirs to your include path
/usr/include/OgreBullet/Collisions
/usr/include/OgreBullet/Dynamics
add the following libs
BulletDynamics
BulletCollision
OgreBulletDyn
OgreBulletCol
ConvexDecomposition
Resources.cfg
the 'DebugDrawer' class uses a resource manager group called "OgreBulletCollisions", this must be created by you in your ogre app's resources.cfg file
add this section at the bottom of the resources.cfg file
[OgreBulletCollisions]
FileSystem= ~/ogrebullet-svn/ogrebullet/Demos/Media
* go try the tutorial
http://www.ogre3d.org/tikiwiki/OgreBull ... =Libraries
I've been over this a bunch of times and my build environment may be a little dirty, if you have any problems with this it's likely that I've left out a step or something. Please post any errors and I'll try and help out.
Cheers
Al
Preface
I'm using Fedora 10 32-bit (3 releases old at time of writing)
having built ogre-1.71 from source
using bullet from subversion, revision #2109
using ogrebullet from subversion, revision #2928
all operations done as a standard user
I have the svn (Subversion) utilities installed
All commands run as an unprivileged user unless otherwise stated
Overview
1. get bullet from SVN
2. a) attempt to configure bullet
b) satisfy dependencies
3. a) attempt to compile bullet
b) fix-up source files
4. Install bullet
5. Run Demo
6. Install Extras and Extra's headers
7. Fix-up pkgconfig file
8. Get OgreBullet from SVN
9. Configure
10. Install
11. Setup Eclipse
12. Setup resources.cfg
13. Run the OgreBullet tutorials. yay.
Bullet
* Get bullet sources
# cd ~
# svn checkout -r HEAD http://bullet.googlecode.com/svn/trunk/ ./bullet-svn
# cd bullet-svn
# ./autogen.sh
# ccmake .
press 'c' to configure
press 't' to goto expert mode
change CMAKE_INSTALL_PATH to =/usr
change INCLUDE_INSTALL_DIR to = /usr/lib/bullet
change LIB_DESTINATION to = /usr/lib
change PKGCONFIG_INSTALL_PREFIX = /usr/lib/pkgconfig/
change INCLUDE_INSTALL_DIR = /usr/include/bullet
change BUILD_DEMOS to = YES
change BUILD_MINICL_OPENCL_DEMOS to = NO
try to satisfy all the dependencies if possible, this may mean you have to install heaps of development header files ie. (as user root)
# yum install freeglut freeglut-devel glew-devel glew libXcursor libXcursor-devel libXcomposite libXcomposite-devel libXcursor libXcursor-devel libXdamage-devel libXdamage libXfixes libXfixes-devel libXinerama-devel libXinerama libXft libXft-devel libXxf86misc-devel libXxf86misc libXv libXv-devel clthreads-devel pth pth-devel
Many of these are probably not neccessary so don't stress too much
the way to tell if the library dependency is satisfied look for lines that include "_LIB-NOTFOUND" or "_INCLUDE_PATH-NOTFOUND". I recommend opening an additional shell terminal tab and installing the packages so you can quickly tab back and forth to the ccmake screen to verify that the dependency is satisfied (using the 'c' key and making sure the afflicted line has a proper link in it after running)
press 'c' to configure
press 'g' to generate and quit
# make
* there seems to be a bug in one of the demos where they forget about linux, if you get a compilation error talking about a problem with line 59 of ./Demos/ThreadingDemo/main.cpp then you need to open that file and rip some parts out
1. remove the ifdef line from line#27
2. remove the entire section starting with "#elif defined( _WIN32)" and all lines up to and including the next "#endif"
Ugly huh.
then, as root do a
# make install
At this point you should be able to view the Bullet demos
# ./Demos/AllBulletDemos/AllBulletDemo
* extras
still as root
# cd Extras
# make all
# make install
# cd ConvexDecomposition
# cp *.h /usr/include/Bulletcollision/
* update pkgconfig file. For some reason, it's not updated by the ccmake script
# vim /usr/lib/pkgconfig/bullet.pc
change the existing "Cflaggs"-line to read like this
Cflags: -I/usr/include/BulletCollision/ -I/usr/include/BulletDynamics/ -I/usr/include/BulletSoftBody/
OgreBullet
go back to using the normal user account
* get OgreBullet from SVN
# cd ~
# svn checkout https://ogreaddons.svn.sourceforge.net/ ... grebullet/ ./ogrebullet-svn
# cd ./ogrebullet-svn
# chmod +x ./autogen.sh
# ./autogen.sh
# ./configure --prefix=/usr
# make
# make install
Eclipse
add the following dirs to your include path
/usr/include/OgreBullet/Collisions
/usr/include/OgreBullet/Dynamics
add the following libs
BulletDynamics
BulletCollision
OgreBulletDyn
OgreBulletCol
ConvexDecomposition
Resources.cfg
the 'DebugDrawer' class uses a resource manager group called "OgreBulletCollisions", this must be created by you in your ogre app's resources.cfg file
add this section at the bottom of the resources.cfg file
[OgreBulletCollisions]
FileSystem= ~/ogrebullet-svn/ogrebullet/Demos/Media
* go try the tutorial
http://www.ogre3d.org/tikiwiki/OgreBull ... =Libraries