OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username:
Password:
CapsLock is on.
Remember me (for 1 year)
Log in
Home
Tutorials
Tutorials Home
Basic Tutorials
Intermediate Tutorials
Mad Marx Tutorials
In Depth Tutorials
Older Tutorials
External Tutorials
Cookbook
Cookbook Home
CodeBank
Snippets
Experiences
Ogre Articles
Libraries
Libraries Home
Alternative Languages
Assembling A Toolset
Development Tools
OGRE Libraries
List of Libraries
Tools
Tools Home
DCC Tools
DCC Tutorials
DCC Articles
DCC Resources
Assembling a production pipeline
Development
Development Home
Roadmap
Building Ogre
Installing the Ogre SDK
Setting Up An Application
Ogre Wiki Tutorial Framework
Frequently Asked Questions
Google Summer Of Code
Help Requested
Ogre Core Articles
Community
Community Home
Projects Using Ogre
Recommended Reading
Contractors
Wiki
Immediate Wiki Tasklist
Wiki Ideas
Wiki Guidelines
Article Writing Guidelines
Wiki Styles
Wiki Page Tracker
Ogre Wiki Help
Ogre Wiki Help Overview
Help - Basic Syntax
Help - Images
Help - Pages and Structures
Help - Wiki Plugins
Toolbox
Freetags
Categories
List Pages
Structures
Trackers
Statistics
Rankings
List Galleries
Ogre Lexicon
Comments
History: FromSourceUbuntu
View page
Source of version: 3
(current)
%prevogre% {maketoc} !!HOWTO Ubuntu 7.10 On Ubuntu, you can compile OGRE from the Debian source package, the official tar.bz2 archive or from CVS. Compiling from the Debian source package will allow better integration with your system compared to the standard source compilation. Using CVS gives you the latest bugfixes, but is less guaranted to work than stable versions. !!!Using the Debian source package At the place where you can find [http://nrg.joroinen.fi/ubuntu504_ogre3d/|OGRE 1.0.3 packages] for Ubuntu 5.0.4, there is a [http://nrg.joroinen.fi/ubuntu504_ogre3d/recompile_readme.txt|recompile_readme.txt] file which describes how to recompile Debian OGRE and CEGUI packages for Ubuntu 5.0.4 (Hoary Hedgehog). The version of Ogre in the Ubuntu repositories is very outdated so you might as well download the latest from [http://www.ogre3d.org/index.php?option=com_remository&Itemid=74&func=fileinfo&filecatid=44&parent=category|ogre3d.org] instead. Instructions for compiling and installing the latest version can be found here. On the Ubuntu forums you can find information about how to rebuild the Debian packages for Ubuntu on amd64 in [http://www.ubuntuforums.org/showthread.php?t=27566|this thread]. The author of the post says that he's only done it on amd64 but that it should work in the same way for other architectures. !!!Using the tar.bz2 archive This install documentation will work on a fresh install of __Ubuntu 7.10 (gutsy gibbon)__ The official tar.bz2 source to compile OGRE from is located [http://ogre3d.org/index.php?option=com_remository&Itemid=57&func=fileinfo&filecatid=7&parent=category|here] Since Ubuntu was originally based on Debian and uses the same package management system, the same install process works for Debian with only slight changes to package names. ''Note: The only changes you may be required to make are the versions of the packages that are installed with apt-get.'' The rest of Ogre3D should install on either after the required packages are installed. With it being so difficult to keep up with the changes of package versions, this is something you may have to change yourself but really it just requires a little bit of research into what package versions your current version of Debian or Ubuntu have. Anyway, let us begin. ''Note: Since this is also written for Debian, I haven't included "sudo" at the start of each command so if you're using Ubuntu, put a sudo at the start of each of them or it will blow out with permission errors when you run the command.'' Enable all apt-get sources in Ubuntu's __/etc/apt/sources.list__ file. (Get rid of the hash in from of the "deb" parts) You may also want to enable contrib and non-free for future use since it simply expands the possible selection of packages available to you. Apt-get install the following packages using: {CODE(wrap="1", colors="bash")}apt-get install libfreeimage-dev libfreeimage3 pkg-config build-essential libtool make automake g++ gcc cpp make automake1.9 libtool libsdl1.2-dev libdevil-dev libfreetype6-dev libgtkmm2.0-dev libcegui* libpng12-dev libmng-dev libtiff4-dev liblcms1-dev libpng3 libjpeg62-dev libglade* libzzip-dev libxaw7-dev libopenexr-dev libopenexr2c2a nvidia-cg-toolkit checkinstall libcppunit-1.12-0 libcppunit-dev libcppunit-doc libxxf86vm-dev libtiff4-dev and libmng-dev libois1 libois-dev{CODE} Download the ogre source package for compilation. At the time of writing the most current source was: [http://downloads.sourceforge.net/ogre/ogre-linux_osx-v1-4-6.tar.bz2] Extract with: {CODE(wrap="1", colors="bash")} tar -xvjf ogre-linux_osx-v1-4-6.tar.bz2{CODE} Enter the extracted source directory (ogrenew) with: {CODE(wrap="1", colors="bash")}cd ogrenew{CODE} Run aclocal with: {CODE(wrap="1", colors="bash")}aclocal{CODE} Run the bootstrapping program to create the initial files required for compiling. {CODE(wrap="1", colors="bash")}./bootstrap{CODE} Configure the package for your distribution and exact configuration. {CODE(wrap="1", colors="bash")}./configure{CODE} Make the source files {CODE(wrap="1", colors="bash")}make{CODE} Install the made files into their respective locations (which will also create a .deb package for future use should you need to reinstall). {CODE(wrap="1", colors="bash")}checkinstall{CODE} After the install, there is one more thing you need to do: Tell Ubuntu where to find the libraries. Do this with by adding the following line to the bottom of __/etc/ld.so.conf__: {CODE(wrap="1", colors="bash")} include /usr/local/lib {CODE} You should be able to use the tutorials for [http://www.ogre3d.org/wiki/index.php/SettingUpAnApplication|Setting Up An Application] for Ogre3D and voila, all done! If the sample applications are not working in /Samples/Common/bin, check ogre.log. If the log says something like, {CODE(wrap="1", colors="bash")} OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library <RenderSystem_GL.so>. System Error: libOgreMain.so.14: cannot open shared object file: No such file or directory in DynLib::load at OgreDynLib.cpp (line 80) {CODE} You may need to build from the CVS if this problem persist. Ubuntu installations will typically have gcc 4.1+.(from build-essential pkg) gcc 4.0+ can cause trouble at runtime with dynamic link libraries. You can test for this by using the absolute path of the libraries in loadLibrary. Additionally, or if you get stuck anywhere along the way, you might want to have a look at some of the other tutorials for previous versions of Ubuntu. Installation guide for Ubuntu 7.04 [http://www.ogre3d.org/phpBB2/viewtopic.php?t=32549|Tutorial] Installation guide for Ubuntu 5.04 [http://web.media.mit.edu/~phaeton/ogre/OgreUbuntuInstallNotes.html|Tutorial] !!!Using CVS Use the ''vanilla'' GCC/make guide: ((Building From Source - Linux - Shoggoth|#GCC & Make)) If you run into linker problems, try issuing the command -+export CC=g+++- before running -+./configure+-. See the [http://ogre3d.org/index.php?option=com_content&task=blogcategory&id=74&Itemid=87|Developers] page if you want to get OGRE from CVS. !!!Using a semi-automated script (Ubuntu 6.10) This method is probably not best suited to be up to date (at least concerning the 3rd party libraries like Cg) but it has been put together to set up OGRE (CVS version) on all the development platforms of our team. You can download and read more about this at the [http://qbic.sourceforge.net/node/6|QBIC project]. It downloads, compiles and installs OGRE and all required 3rd party libraries (including some deb-packages). !!!HowTo I (madmark), a Windows guy, have documented my process getting Ogre installed from a fresh Kubuntu 5.10 (Breezy-Badger) install ((Kubuntu Install)). !!!Using Checkinstall instead of "make install" By using ((Checkinstall)), you can automatically create a custom .deb package. This is the recommended way for building from source on ubuntu/kubuntu/debian systems. Ubuntu 7.04 and ogre v-1.4.1 and v-1.4.2 fail after successful running make, when doing a checkinstall or make install at the point relinking RenderSystem_GL libs. I only found this workaround to build a debian package and install: copy the main-lib [http://libOgreMain-1.4.2.so|libOgreMain-1.4.2.so] (or 1.4.1 for 1.4.1) to the directory where the install would put it - thats normaly /usr/local/lib - and create there too the link-entry libOgreMain.so (ln -s [http://libOgreMain-1.4.2.so|libOgreMain-1.4.2.so] libOgreMain.s). Run ldconfig to update the lib-tables and do the checkinstall again. It will now find the dependencies to relink RenderSystem_GL.so with the main-lib from this place. After this you can delete the previous copy+link. Some packages create replacements for files in /lib, /bin - i dont know why - to avoid them: checkinstall --exclude /lib,/bin,/usr/share excludes those files (ld, strip, ..). To install/use both release versions together is normaly not possible, because only the main-libs have different filenames. The libs like RenderSystem_GL have the same filename and you have to put those in different directorys and manually enter their locations into the plugins.cfg of the programs using them. All samples did run, except the hdr and those using the missing quake-pk3. I do not know if the fail of the relink is normal, i could not find any differences between the working relink of the Cg_Plugins lib and the RenderSystem libs, the first error message (of a lot) is: {MONO()}.libs/OgreGLEngineDll.o: In function `dllStopPlugin': /mybuild/src/ogre/ogrenew/RenderSystems/GL/src/OgreGLEngineDll.cpp:47: undefined reference to `Ogre::Root::uninstallPlugin(Ogre::Plugin*)'{MONO} !!HOWTO : Compile and Install Ogre 1.4.x from source on Ubuntu 7.04 Here is the original post : [http://www.ogre3d.org/phpBB2/viewtopic.php?t=32549] !!!STEP 1 : Install Dependencies {CODE(wrap="1", colors="bash")} sudo apt-get install alien automake1.9 build-essential libcppunit-1.12-0 libcppunit-dev libmng-dev libsdl1.2-dev libtool libxaw-header libxaw7-dev libfreetype6 libfreetype6-dev libpcre3 libpcre3-dev libzzip-dev libxrandr-dev libxxf86vm-dev freeglut3-dev {CODE} Here is the list of the package for those who want to use synaptic : {CODE(wrap="1")}alien automake1.9 build-essential libcppunit-1.12-0 libcppunit-dev libmng-dev libsdl1.2-dev libtool libxaw-header libxaw7-dev libfreetype6 libfreetype6-dev libpcre3 libpcre3-dev libzzip-dev libxrandr-dev libxxf86vm-dev freeglut3-dev{CODE} !!!STEP 2 : Build other dependancies * OIS 1.0 : [http://www.sourceforge.net/projects/wgois] * FreeImage 3.9 : [http://freeimage.sourceforge.net] * CEGUI 5.0b : [http://www.cegui.org.uk/wiki/index.php/CEGUI_Downloads_0.5.0] * Cg Toolkit 1.5 : download the lastest Cg toolkit here (the RPM file) : [http://developer.nvidia.com/object/cg_toolkit.html] And use alien to create au .deb : {CODE(wrap="1", colors="bash")} sudo alien Cg-1.5.i386.rpm{CODE} Then install it : {CODE(wrap="1", colors="bash")} sudo dpkg -i cg_1.5.0-15_i386.deb {CODE} Or download the .tar.gz file and merge /usr directory, go in the /usr directory unpacked and type : {CODE(wrap="1", colors="bash")} sudo cp ./* /usr/ -R {CODE} Or take this .deb which apperently work fine with Ubuntu : [http://http.us.debian.org/debian/pool/contrib/n/nvidia-cg-toolkit/nvidia-cg-toolkit_1.5.0.0019-1_i386.deb] !!!STEP 3 : Download Ogre3D Sources from here: [http://www.ogre3d.org/index.php?option=com_content&task=view&id=412&Itemid=132] !!!STEP 4 : Install Ogre3D Unpack the folder and go with the terminal in the ogrenew folder and type : {CODE(wrap="1", colors="bash")}aclocal ./bootstrap ./configure make sudo make install (or checkinstall){CODE} And then everything should be fine!! !!!STEP 5 : Launch an example In order to verify if Ogre is well installed, go in the /ogrenew/Sample/Common/bin directory and type the name of the demo like that : {CODE(wrap="1", colors="bash")} ./DemoName (example : ./Water) {CODE} !!!STEP 6 : Finilize Installation Edit the ld.so.conf file : {CODE(wrap="1", colors="bash")} sudo gedit /etc/ld.so.conf {CODE} And add this : {CODE(wrap="1", colors="bash")} /usr/local/lib {CODE} !!HOWTO: Compile and Install the Latest Ogre3D from Source on Ubuntu (Out of Date) __(Problems seem to have been fixed in final release of Edgy)__ The version of Ogre in the Ubuntu repositories is quite old and will not work with recent Ogre3d based applications, hence the need to compile the latest versions from source. There is an alternative HOWTO [http://web.media.mit.edu/~phaeton/ogre/OgreUbuntuInstallNotes.html|here] ''This guide is based on Ubuntu __Edgy__. Other releases may vary.'' !!!!STEP 1: Download Source download the latest Ogre3D Linux source from [http://www.ogre3d.org/index.php?option=com_remository&Itemid=74&func=fileinfo&filecatid=44&parent=category|here] and extract somewhere in your home directory. You'll get a folder called 'ogrenew'. For a quick reference, the steps to install are as follows, but you'll need to install some packages before you can do this. {CODE(wrap="1", colors="bash")} ./bootstrap ./configure make sudo checkinstall {CODE} More info on ((Checkinstall)) !!!!STEP 2: Install Dependencies Install the required packages using either apt-get in the console or some other GUI package management tool like Synaptic or Adept. This is the command line to install all the packages you need: {CODE(wrap="1", colors="bash")}sudo apt-get install build-essential automake1.7 alien libtool xlibs-static-dev libdevil-dev libsdl1.2-dev libcppunit-dev libmng-dev checkinstall libxxf86vm-dev libzzip-dev libxaw-headers libxrandr-dev libtiff-dev libpng-dev sudo apt-get build-dep libogre-dev{CODE} It may be a good idea to run the command ''aclocal'' at this point. If you get warnings you might be missing some required libraries. __Note:__ Automake1.9 gave me errors about CPPUNIT so make sure you install automake1.7. If you change versions after you do ./bootstrap you'll have to re-run ./bootstrap and ./configure. __Note:__ The version of DevIL in dapper has a bug in it that will cause the default render settings window it malfunction. The bug is fixed with the version in Edgy, but if you're still using dapper, don't install the later package because it could break things due to dependency conflicts. Dapper users can try downloading and compiling the latest DevIL package from source. __Note:__ On Feisty Fawn, I had to use libpng12-dev instead of libpng-dev. You'll have to install nVidia's Cg libraries manually because Ubuntu isn't allowed to redistribute them. Go [http://developer.nvidia.com/object/cg_toolkit.html|here] and download the Redhat Linux RPM either x86 or x86_64 if you have amd64. Run this command to convert the redhat rpm into a .deb file. You may have to change the RPM filename if you downloaded a different version {CODE(wrap="1", colors="bash")}sudo alien Cg-1.5.i386.rpm{CODE} It will take a minute to finish. Then install the new .deb file by running this command (change filename as needed) {CODE(wrap="1", colors="bash")}sudo dpkg -i cg_1.5.0-15_i386.deb{CODE} !!!!STEP 3: Compile and install Now you should have everything you need and you should be able to run the following commands in succession. {CODE(wrap="1", colors="bash")} aclocal ./bootstrap ./configure make sudo checkinstall // sudo make install <- use this instead sudo ldconfig{CODE} If you get any missing library errors they will probably be in the ./bootstrap or ./configure process. Just install the library its asking for and try again. Please also update this wiki with any additional packages you needed to install. The make process could take up to 20 minutes. Read some of the ((Ogre Tutorials|tutorials)) on this wiki while you wait. During the checkinstall process it detects the version as 1.2.4 repeated for around 10 lines. I like to change that to just one line. You should be all set! Ask in the forums or IRC if you need help. Good luck.
Search by Tags
Search Wiki by Freetags
Latest Changes
Minimal Ogre Collision
Artifex Terra
OpenMB
Advanced Mogre Framework
MogreSocks
Critter AI
Mogre Add-ons
MOGRE
Mogre MyGUI wrapper
MOGRE Editable Terrain Manager
...more
Search
Find
Advanced
Search Help
Online Users
35 online users