Ubuntu 8.04 Quick-n-Dirty compile from source tutorial

Problems building or running the engine, queries about how to use features etc.
User avatar
Svenstaro
Greenskin
Posts: 115
Joined: Fri Dec 15, 2006 1:30 pm
Location: Germany
x 3
Contact:

Ubuntu 8.04 Quick-n-Dirty compile from source tutorial

Post by Svenstaro »

Ogre3D 1.4.7 and major dependencies from source on a fresh Ubuntu Hardy (8.04)

This tutorial will eventually go on the wiki, I only want to debug it before it does.

I will not do a lot of explaining here and will assume that you know what each command does or at least know how to look it up. This is a guide to get you up and running as fast as possible on Ubuntu.

* Go to some directory you have write access to.
cd ~/Desktop

* Uncomment all Ubuntu repositories in sources.list.
sudo nano /etc/sources.list

* Run apt-get update.
sudo apt-get update

* Install necessary packages.
sudo apt-get install build-essential autoconf automake libtool libzzip-dev libxt-dev libxaw-headers libxxf86vm-dev libxrandr-dev libfreeimage-dev nvidia-cg-toolkit checkinstall libfreetype6-dev libpcre3-dev libdevil-dev libxaw7-dev libopenexr-dev libtiff-dev libglade2-dev libglademm-2.4-dev

* Fetch OIS.
wget http://downloads.sourceforge.net/wgois/ois_1.2.0.tar.gz

* Extract OIS source package.
tar xzf ois_1.2.0.tar.gz

* Change dir to ois.
cd ois

* Run aclocal
aclocal

* Run ./bootstrap.
./bootstrap

* Run ./configure
./configure

* Build it.
make

* Install it.
sudo make install

* Change back dir
cd ..

* Fetch the CEGUI source package.
wget wget http://downloads.sourceforge.net/crayze ... 6.0.tar.gz

* Extract the source.
tar xzf CEGUI-0.6.0.tar.gz

* Change into extracted dir.
cd CEGUI-0.6.0

* Run aclocal.
aclocal

* Run ./bootstrap.
./bootstrap

* Run ./configure.
./configure

* Build.
make

* Install it.
sudo make install

* Change back dir.
cd ..

* Fetch the Ogre3D source package.
wget http://downloads.sourceforge.net/ogre/o ... -7.tar.bz2

* Extract the source.
tar xjf ogre-linux_osx-v1-4-7.tar.bz2

* Change into extracted dir.
cd ogrenew

* Run aclocal.
aclocal

* Run ./bootstrap.
./bootstrap

* Run ./configure.
./configure

* Build it.
make

* Install it.
sudo make install

* Run ldconfig
sudo ldconfig

If it all ran fine you now have a dirty (but quick) source-compiled installation of Ogre3D, congratulations!
The demos are located at <ogrenew>/Samples/Common/bin/

Enjoy.
Last edited by Svenstaro on Fri May 09, 2008 12:34 pm, edited 5 times in total.
User avatar
johnhpus
Platinum Sponsor
Platinum Sponsor
Posts: 1186
Joined: Sat Apr 17, 2004 2:49 am
x 3

Post by johnhpus »

Good stuff. Love the no nonsense directions.
soldans
Halfling
Posts: 53
Joined: Sat May 19, 2007 10:27 pm
x 1
Contact:

Post by soldans »

Some problems on the way:

I had some problems with autoconf/automake. Don't remember how I solved it, but i think I did.

There were some packets that had other names, like zziplib-dev and libxaw-headers that I couldn't find. :(

Then I also had to install g++ to be able to compile.

It seems to have compiled properly now, but I can't get the samples to run. Any ideas?

:?:

EDIT: I got it to work! =)

Thanks. The reward is that you'll have to test my new game that I'll make! =)
User avatar
Svenstaro
Greenskin
Posts: 115
Joined: Fri Dec 15, 2006 1:30 pm
Location: Germany
x 3
Contact:

Post by Svenstaro »

Thanks, corrected my errors. Was missing build-essential and misspelled libzzip-dev. Libxaw-headers is correct though, what was your trouble there?
cdkeito
Orc
Posts: 468
Joined: Sat Jan 27, 2007 12:06 pm
Contact:

Post by cdkeito »

libdevil?
Image
soldans
Halfling
Posts: 53
Joined: Sat May 19, 2007 10:27 pm
x 1
Contact:

Post by soldans »

Svenstaro wrote:Thanks, corrected my errors. Was missing build-essential and misspelled libzzip-dev. Libxaw-headers is correct though, what was your trouble there?
I don't remember. I can find it if I search for it now. Maybe I got confused in. :wink:

Complete newbie to ubuntu. =) So thanks again. :D
Snookle
Gnoblar
Posts: 2
Joined: Thu May 01, 2008 12:17 pm

Post by Snookle »

I got about halfway through the CEGui make, before failing due to some missing libs.

Solved it by installing libtiff-dev:

sudo apt-get install libtiff-dev
User avatar
Svenstaro
Greenskin
Posts: 115
Joined: Fri Dec 15, 2006 1:30 pm
Location: Germany
x 3
Contact:

Post by Svenstaro »

Added libtiff-dev :)
User avatar
Svenstaro
Greenskin
Posts: 115
Joined: Fri Dec 15, 2006 1:30 pm
Location: Germany
x 3
Contact:

Post by Svenstaro »

Okay about to put this into the Wiki, does anybody have any objections? Should I put more explainations in it?
Snookle
Gnoblar
Posts: 2
Joined: Thu May 01, 2008 12:17 pm

Post by Snookle »

Svenstaro wrote:Does anybody have any objections? Should I put more explainations in it?
No objections here. This got me straight up and running nicely. It was certainly a lot easier to follow than some of the other tutorials.
User avatar
Svenstaro
Greenskin
Posts: 115
Joined: Fri Dec 15, 2006 1:30 pm
Location: Germany
x 3
Contact:

Post by Svenstaro »

I've put it in the Wiki and cleaned up the old Ubuntu stuff.
andik
Gnoblar
Posts: 15
Joined: Sat May 03, 2008 12:52 pm
Location: .de

Post by andik »

Hi,

I tried to build ogre 1.4.7 from source using this tutorial, but i get the following error on sudo make install:

Code: Select all

.libs/OgreGLGpuProgram.o:(.data.rel.ro._ZTVN4Ogre15GLArbGpuProgramE[vtable for Ogre::GLArbGpuProgram]+0x50): undefined reference to `Ogre::Resource::_fireBackgroundLoadingComplete()'
.libs/OgreGLGpuProgram.o:(.data.rel.ro._ZTVN4Ogre12GLGpuProgramE[vtable for Ogre::GLGpuProgram]+0x50): undefined reference to `Ogre::Resource::_fireBackgroundLoadingComplete()'
.libs/OgreGLGpuNvparseProgram.o:(.data.rel.ro._ZTVN4Ogre19GLGpuNvparseProgramE[vtable for Ogre::GLGpuNvparseProgram]+0x50): undefined reference to `Ogre::Resource::_fireBackgroundLoadingComplete()'
.libs/OgreGLTexture.o:(.data.rel.ro._ZTVN4Ogre9GLTextureE[vtable for Ogre::GLTexture]+0x50): undefined reference to `Ogre::Resource::_fireBackgroundLoadingComplete()'
../../../RenderSystems/GL/src/GLSL/src/.libs/libGLSL.a(OgreGLSLGpuProgram.o):(.data.rel.ro._ZTVN4Ogre14GLSLGpuProgramE[vtable for Ogre::GLSLGpuProgram]+0x50): undefined reference to `Ogre::Resource::_fireBackgroundLoadingComplete()'
../../../RenderSystems/GL/src/GLSL/src/.libs/libGLSL.a(OgreGLSLProgram.o):(.data.rel.ro._ZTVN4Ogre11GLSLProgramE[vtable for Ogre::GLSLProgram]+0x50): more undefined references to `Ogre::Resource::_fireBackgroundLoadingComplete()' follow
collect2: ld returned 1 exit status
libtool: install: error: relink `RenderSystem_GL.la' with the above command before installing it
make[5]: *** [install-pkglibLTLIBRARIES] Error 1
Any ideas?

Thanks
User avatar
Svenstaro
Greenskin
Posts: 115
Joined: Fri Dec 15, 2006 1:30 pm
Location: Germany
x 3
Contact:

Post by Svenstaro »

Doesn't sound like a error from missing libs, much rather sounds like you're using strange compiler settings or your Ogre source isn't complete.
cdkeito
Orc
Posts: 468
Joined: Sat Jan 27, 2007 12:06 pm
Contact:

Post by cdkeito »

Image
User avatar
Devil N
Greenskin
Posts: 123
Joined: Sun Jun 26, 2005 4:32 pm
Location: Groningen, The Netherlands
Contact:

Post by Devil N »

andik wrote:Hi,

I tried to build ogre 1.4.7 from source using this tutorial, but i get the following error on sudo make install:

Code: Select all

<snip>
Any ideas?

Thanks
Seems like the OpenGL RenderSystem failed to link, which might be caused by the OpenGL development libraries not being present on your system. The corresponding package in Ubuntu is 'libgl1-mesa-dev'. It is not listed in Svenstaro's instructions, but he might've assumed most developers would have that package by default.

Also, when compiling Ogre I am required to install the 'libglade2-dev' and 'libglademm-2.4-dev' packages. While I'm at it, 'libdevil-dev' is not necessary anymore AFAIK, since DevIL was replaced by FreeImage, and both OIS and CEGUI can be retrieved from the Ubuntu package repositories, although those are older versions of course.
andik
Gnoblar
Posts: 15
Joined: Sat May 03, 2008 12:52 pm
Location: .de

Post by andik »

Thanks for your replies. The installation worked without further problems using cdkeito's install script.
User avatar
Svenstaro
Greenskin
Posts: 115
Joined: Fri Dec 15, 2006 1:30 pm
Location: Germany
x 3
Contact:

Post by Svenstaro »

Added the suggested packages to thead and wiki.
Amenothep
Gnoblar
Posts: 11
Joined: Wed Apr 23, 2008 11:22 am

Post by Amenothep »

Thanks that worked on my 64bit :D

I only got this warning
aclocal:acinclude.m4:352: warning: macro `AM_PATH_CPPUNIT' not found in aclocal:acinclude.m4

http://www.geekstogo.com/forum/Trouble- ... 90607.html

but it didn't lead to any troubles as in above thread.
allen
Gnoblar
Posts: 1
Joined: Fri May 09, 2008 3:54 am

Post by allen »

Also got the same warning as above:
aclocal:acinclude.m4:352: warning: macro `AM_PATH_CPPUNIT' not found in aclocal:acinclude.m4

It didn't stop me from continuing either, so I doesn't seem too important.

When I followed the wiki, there was a package listed twice: libglade2-dev.

I made a Contribution.
User avatar
Svenstaro
Greenskin
Posts: 115
Joined: Fri Dec 15, 2006 1:30 pm
Location: Germany
x 3
Contact:

Post by Svenstaro »

Fixed, also the warning can be ignored I guess. Though it might be cool if a dev could have a look at this.
FlyingIsFun1217
Gnoblar
Posts: 12
Joined: Thu Jul 19, 2007 6:30 pm

Post by FlyingIsFun1217 »

When I do the 'make install', I just get a bunch of boost-related errors:
Shadows.o: In function `boost::detail::thread::lock_ops<boost::recursive_mutex>::lock(boost::recursive_mutex&)':
/usr/include/boost/thread/detail/lock.hpp:33: undefined reference to `boost::recursive_mutex::do_lock()'
Shadows.o: In function `boost::detail::thread::lock_ops<boost::recursive_mutex>::unlock(boost::recursive_mutex&)':
/usr/include/boost/thread/detail/lock.hpp:45: undefined reference to `boost::recursive_mutex::do_unlock()'
Funny, since I've got the boost threading library installed...

Thanks!
FlyingIsFun1217
cdkeito
Orc
Posts: 468
Joined: Sat Jan 27, 2007 12:06 pm
Contact:

Post by cdkeito »

even with my script ?
Image
FlyingIsFun1217
Gnoblar
Posts: 12
Joined: Thu Jul 19, 2007 6:30 pm

Post by FlyingIsFun1217 »

Didn't try your script, but... added an .m4 package from the OGRE download, and all worked just fine.

Thanks for the nice guide!
FlyingIsFun1217
czuber
Gnoblar
Posts: 20
Joined: Thu May 15, 2008 5:27 pm
Location: Brasil

Same error

Post by czuber »

I got the same error on Debian Unstable i686:

libtool: install: error: relink `RenderSystem_GL.la' with the above command before installing it

I'll try your script tonight, but I have a question.

Do I need to uninstall the ogre1.4.7 to build 1.4.8? How could I do it?

Thanks!
cdkeito
Orc
Posts: 468
Joined: Sat Jan 27, 2007 12:06 pm
Contact:

Post by cdkeito »

just build it!
with the above procedure ogre is not "dpkg installed".
Suggestion, build it without installing it. After look into those debs to see where they'll go, the rest is up to you decide.

Please remember the script is for ubuntu, for other distros, packets might change name or availability.
Image
Post Reply