Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
jonathan_blacknight
Kobold
Posts: 32
Joined: Sun Mar 21, 2010 8:42 am
Location: Brazil
x 2

Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by jonathan_blacknight »

After a lost time trying install ogre in linux I'm finally done, and I made a very simple and quick guide.

This is a tutorial step by step to how develop Ogre 1.7.1 in linux Ubuntu 10.04.

Tutorial All made in ubuntu 10.04, and with Ogre 1.7.1 source

Notes: 1 - When you see "username", change for your linux user name.
2 - Sorry for any English mistake.

I - Install Compiler and Configuration tools
sudo apt-get install build-essential automake libtool cmake-gui

II - Install Ogre Dependencies
sudo apt-get install libois-dev libfreeimage-dev libfreetype6-dev libzzip-dev libxaw7-dev libglew1.5-dev libxrandr-dev

III - Install other Ogre Packages (optional)
sudo apt-get install doxygen graphviz nvidia-cg-toolkit libboost-dev libcppunit-dev

IV - Install Cegui Dependencies (optional)
sudo apt-get install libpcre++-dev libwxgtk2.8-dev libjpeg62-dev
sudo apt-get install libpng3-dev

V - Cegui other Packages (optional)
sudo apt-get install doxygen graphviz

VI - Create Folder structure, like this:
Create a folder in /home/username/dev
Create a folder in /home/username/dev/ogre
Create a folder in /home/username/dev/ogre_build

VII - Download Ogre source

http://www.ogre3d.org/download/source
(OGRE 1.7.1 Source for Linux / OSX)

extract files into /home/username/dev/ogre

VIII - Compiling Ogre

Open cmake-gui.

where is the source code: /home/username/dev/ogre
where to build the binaries: /home/username/dev/ogre_build

Once you have selected the folder click configure. In the new window that appears leave the setting at default. It should look like this:

unix makefiles
use default native compilers

Once you are done with that window just click finish. Check all lines, except ogre_static.

Once you're done click configure again then on generate. Now you can close the window. Go back to the terminal and enter this:

cd /home/username/dev/ogre_build

make
this will take a while.

sudo make install
sudo ldconfig

IX - Install Ode (optional)
Get the latest source from http://sourceforge.net/projects/opende/files/. Extract it to "dev" folder so it look like this:

/home/username/dev/ode-0.11.1

Now open a terminal and go to that source folder like so:

cd /home/username/dev/ode-0.11.1
./configure
make
sudo make install


X - Instal Silly (optional)
Dependences needed by the editors. Get the latest source from http://www.cegui.org.uk/wiki/index.php/ ... oads_0.1.0. Extract it to "dev" folder so it look like this:

/home/username/dev/SILLY-0.1.0

Now open a terminal and do:

cd /home/username/dev/SILLY-0.1.0
./configure
make
sudo make install

XI - Install Cegui (optional)
Get the latest source http://www.cegui.org.uk/wiki/index.php/ ... oads_0.7.1. Extract it to the "dev" folder so it look like this:

/home/username/dev/CEGUI-0.7.1

Now open a terminal and do:

cd /home/username/dev/CEGUI-0.7.1
./bootstrap
./configure
make
sudo make install
sudo ldconfig

note: if you installed doxygen and graphviz you can make html to generate html documentation.


XII - Install Celayereditor (optional)
Get the latest source from http://www.cegui.org.uk/wiki/index.php/ ... oads_0.7.1. Extract it to the "dev" folder so it look like this:

/home/username/dev/CELayoutEditor-0.7.1

Now open a terminal and do:

cd /home/username/dev/CELayoutEditor-0.7.1
./configure
make
sudo make install

Now you have to select the datafiles folder from the source folder when the editor start for the first time.

/home/username/dev/CELayoutEditor-0.7.1/datafiles

Now you will need to copy to file to datafiles/fonts folder from the datafiles/font folder of cegui source. you need to copy this two file:

/home/username/dev/CEGUI-0.7.1/datafiles/fonts/dejavusans.ttf
/home/username/dev/CEGUI-0.7.1/datafiles/fonts/dejavusans-10.font

to

/home/username/dev/CELayoutEditor-0.7.1/datafiles/fonts


XIII - Install Ceimageeditor (optional)
Get the latest source from http://www.cegui.org.uk/wiki/index.php/ ... oads_0.7.1. Extract it to "dev" folder so it look like this:

/home/username/dev/CEImagesetEditor-0.7.1

Now open a terminal and do:

cd /home/username/dev/CEImagesetEditor-0.7.1
./configure
make
sudo make install

XIV - Donwnload and Install Code::blocks

sudo apt-get install codeblocks

Start code::blocks and make a new console or ogre project. Now go to Project > Build options and make sure you select the you project name. In Compiler setting > Other options you should have something like this:

`pkg-config --cflags OGRE`
`pkg-config --cflags CEGUI`
`pkg-config --cflags OIS`
`pkg-config --cflags ode`
`pkg-config --cflags CEGUI-OGRE`
-fexceptions

In linker settings > link libraries you should have:

GL

ind debug:
OgreMain_d
OIS_d

in releasse:
OgreMain
OIS

In linker settings > Other linker options you should have:

`pkg-config --libs OGRE`
`pkg-config --libs CEGUI`
`pkg-config --libs OIS`
`pkg-config --libs ode`
`pkg-config --libs CEGUI-OGRE`

In Search directories > Compiler you should have:

/usr/local/share/OGRE/samples/Common/include
/usr/local/include/CEGUI/RendererModules/Ogre

make this to debug and release

Finally the installation is done!

Click in Save All

In your project folder you need create two files:

project_path/plugins.cfg
project_path/resources.cfg

In plugins.cfg:

# Defines plugins to load

# Define plugin folder
PluginFolder=/home/username/dev/ogre_build/lib

# Define D3D rendering implementation plugin
Plugin=RenderSystem_GL.so
Plugin=Plugin_ParticleFX.so
Plugin=Plugin_BSPSceneManager.so
Plugin=Plugin_OctreeSceneManager.so
Plugin=Plugin_CgProgramManager.so

In resources.cfg:


# Resources required by the sample browser and most samples.
[Essential]
Zip=/home/username/dev/ogre/Samples/Media/packs/SdkTrays.zip
FileSystem=/home/username/dev/ogre/Samples/Media/thumbnails

# Common sample resources needed by many of the samples.
# Rarely used resources should be separately loaded by the
# samples which require them.
[Popular]
FileSystem=/home/username/dev/ogre/Samples/Media/fonts
FileSystem=/home/username/dev/ogre/Samples/Media/materials/programs
FileSystem=/home/username/dev/ogre/Samples/Media/materials/scripts
FileSystem=/home/username/dev/ogre/Samples/Media/materials/textures
FileSystem=/home/username/dev/ogre/Samples/Media/materials/textures/nvidia
FileSystem=/home/username/dev/ogre/Samples/Media/models
FileSystem=/home/username/dev/ogre/Samples/Media/particle
FileSystem=/home/username/dev/ogre/Samples/Media/DeferredShadingMedia
FileSystem=/home/username/dev/ogre/Samples/Media/PCZAppMedia
FileSystem=/home/username/dev/ogre/Samples/Media/RTShaderLib
Zip=/home/username/dev/ogre/Samples/Media/packs/cubemap.zip
Zip=/home/username/dev/ogre/Samples/Media/packs/cubemapsJS.zip
Zip=/home/username/dev/ogre/Samples/Media/packs/dragon.zip
Zip=/home/username/dev/ogre/Samples/Media/packs/fresneldemo.zip
Zip=/home/username/dev/ogre/Samples/Media/packs/ogretestmap.zip
Zip=/home/username/dev/ogre/Samples/Media/packs/ogredance.zip
Zip=/home/username/dev/ogre/Samples/Media/packs/Sinbad.zip
Zip=/home/username/dev/ogre/Samples/Media/packs/skybox.zip

[General]
FileSystem=/home/username/dev/ogre/Samples/Media

To test try this simple example from ogre wiki:

Code: Select all

#include "ExampleApplication.h"

class TutorialApplication : public ExampleApplication
{
protected:
public:
    TutorialApplication()
    {
    }

    ~TutorialApplication()
    {
    }
protected:
    void createScene(void)
    {
    }
};

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"

INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main(int argc, char **argv)
#endif
{
    // Create application object
    TutorialApplication app;

    try {
        app.go();
    } catch( Exception& e ) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
         MessageBoxA( NULL, e.what(), "An exception has occured!", MB_OK |   MB_ICONERROR  | MB_TASKMODAL);zx'x
#else
        fprintf(stderr, "An exception has occurred: %s\n",
                e.what());
#endif
    }

    return 0;
}
Run in debug and release mode

XV - Possible Exceptions

In IX...
If you get an error like :
"/home/username/dev/ogre/Samples/Browser/src/FileSystemLayerImpl_Unix.cpp: In member function ‘void OgreBites::FileSystemLayerImpl::prepareUserHome(const Ogre::String&)’:
/home/username/dev/ogre/Samples/Browser/src/FileSystemLayerImpl_Unix.cpp:127: error: ‘errno’ was not declared in this scope"

Edit /home/username/dev/ogre/Samples/Browser/src/FileSystemLayerImpl_Unix.cpp
One line down of "#include <pwd.h>" (line 33 or so) add this:
#include <errno.h>'

run make again

IN XIV...
if you get an error like:
Installing plugin: GL RenderSystem
OpenGl Rendering Sybsystem created.
Segmantation fault (core dumped)

try to update your video card driver, or get the propietary driver

If you have problem with .so's files like in libOIS_d try to make a copy of release file just like:

Code: Select all

cp -P /usr/lib/libOIS.so /usr/lib/libOIS_d.so
XVI - All credits and thanks to:
http://poleonlinux.blogspot.com/2010/02 ... 1-ode.html
Last edited by jonathan_blacknight on Sat Dec 04, 2010 11:20 pm, edited 4 times in total.
Brazilian blog about game programming
http://www.pontov.com.br/

My develop blog:
http://shydsgames.com/
User avatar
Excizted
Halfling
Posts: 77
Joined: Mon Nov 02, 2009 6:45 pm
Location: Fyn, Denmark

Re: Ogre 1.7 Cthugha Ubuntu 10.04 instalation tutorial

Post by Excizted »

Nice of you making a guide :)
It would be nice with some formatting.

Also, I usually build OGRE prior to CEGUI, I thought CEGUI required the OGRE libraries to build the OGRE renderer?
jonathan_blacknight
Kobold
Posts: 32
Joined: Sun Mar 21, 2010 8:42 am
Location: Brazil
x 2

Re: Ogre 1.7 Cthugha Ubuntu 10.04 instalation tutorial

Post by jonathan_blacknight »

Thanks...
i think since lastest releases of cegui, ogre are optional, but i don't know much more to tell you, if you have tried like i said and have problems tell me and i change the installation order
Brazilian blog about game programming
http://www.pontov.com.br/

My develop blog:
http://shydsgames.com/
mukik182
Halfling
Posts: 68
Joined: Mon Nov 09, 2009 10:30 pm
Location: Barcelona, Spain
x 1

Re: Ogre 1.7 Cthugha Ubuntu 10.04 instalation tutorial

Post by mukik182 »

For CEGUIOgreRenderer to be built for ogre you need ogre to be previously installed. Also, you don't need to install neither cegui for working with ogre 1.7+ nor ode.
inconnu259
Gnoblar
Posts: 9
Joined: Sat Apr 17, 2010 1:05 am

Re: Ogre 1.7 Cthugha Ubuntu 10.04 instalation tutorial

Post by inconnu259 »

Hey, I try it, but I have some mistake...
Can you help me ?

Codeblocks told me :


-------------- Build: Debug in Test ---------------

Compiling: main.cpp
Linking console executable: ./Test
g++: pkg-config: Aucun fichier ou dossier de ce type
g++: OGREpkg-config: Aucun fichier ou dossier de ce type
g++: CEGUIpkg-config: Aucun fichier ou dossier de ce type
g++: OISpkg-config: Aucun fichier ou dossier de ce type => No file or directory of this type
g++: odepkg-config: Aucun fichier ou dossier de ce type
g++: CEGUI-OGRE: Aucun fichier ou dossier de ce type
Process terminated with status 1 (0 minutes, 4 seconds)
0 errors, 0 warnings

I think I have to configure codeblocks for that but I don't know how...
If you can help me, please
jonathan_blacknight
Kobold
Posts: 32
Joined: Sun Mar 21, 2010 8:42 am
Location: Brazil
x 2

Re: Ogre 1.7 Cthugha Ubuntu 10.04 instalation tutorial

Post by jonathan_blacknight »

Can u post here the code u're trying run?

You did the step XIV?
Brazilian blog about game programming
http://www.pontov.com.br/

My develop blog:
http://shydsgames.com/
User avatar
allfoxwy
Gnoblar
Posts: 2
Joined: Sat Apr 17, 2010 1:22 pm

Re: Ogre 1.7 Cthugha Ubuntu 10.04 instalation tutorial

Post by allfoxwy »

Great work! I had just done it with my ubuntu lucid.
However, I need to add an "sudo apt-get install libpng3-dev" to the steps.
pechan98
Gnoblar
Posts: 1
Joined: Sun Jun 20, 2010 1:09 am

Re: Ogre 1.7 Cthugha Ubuntu 10.04 instalation tutorial

Post by pechan98 »

I have a problem with ogre installation, when I do a make, this show this error

[ 43%] Built target OgreMain
[ 46%] Built target Plugin_OctreeSceneManager
[ 49%] Built target Plugin_BSPSceneManager
make[2]: *** No rule to make target `/usr/lib/libGL.so', needed by `lib/RenderSystem_GL.so'. Stop.
make[1]: *** [RenderSystems/GL/CMakeFiles/RenderSystem_GL.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 50%] Built target Plugin_CgProgramManager
make: *** [all] Error 2

I have configured my ogre with this:

CMAKE_BUILD_TYPE RelWithDebInfo
CMAKE_INSTALL_PREFIX /usr/local
OGRE_BUILD_COMPONENT_PAGING ON
OGRE_BUILD_COMPONENT_PROPERTY ON
OGRE_BUILD_COMPONENT_RTSHADERS ON
OGRE_BUILD_COMPONENT_TERRAIN ON
OGRE_BUILD_PLUGIN_BSP ON
OGRE_BUILD_PLUGIN_CG ON
OGRE_BUILD_PLUGIN_OCTREE ON
OGRE_BUILD_PLUGIN_PCZ ON
OGRE_BUILD_PLUGIN_PFX ON
OGRE_BUILD_RENDERSYSTEM_GL ON
OGRE_BUILD_SAMPLES ON
OGRE_BUILD_TESTS OFF
OGRE_BUILD_TOOLS ON
OGRE_CONFIG_THREADS 2
OGRE_CONFIG_THREAD_PROVIDER boost
OGRE_DEPENDENCIES_DIR
OGRE_INSTALL_DOCS ON
OGRE_INSTALL_SAMPLES ON
OGRE_INSTALL_TOOLS ON
OGRE_STATIC OFF

***************
When I change this part:
OGRE_BUILD_RENDERSYSTEM_GL OFF

my installation can finish but when I run Sample Browser application it shows:

Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
MovableObjectFactory for type 'ParticleSystem' registered.
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
DDS codec registering
FreeImage version: 3.10.0
This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2
Registering ResourceManager for type HighLevelGpuProgram
Registering ResourceManager for type Compositor
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
Loading library /home/pechan/.cg-development/ogre/build/lib/Plugin_ParticleFX
Installing plugin: ParticleFX
Particle Emitter Type 'Point' registered
Particle Emitter Type 'Box' registered
Particle Emitter Type 'Ellipsoid' registered
Particle Emitter Type 'Cylinder' registered
Particle Emitter Type 'Ring' registered
Particle Emitter Type 'HollowEllipsoid' registered
Particle Affector Type 'LinearForce' registered
Particle Affector Type 'ColourFader' registered
Particle Affector Type 'ColourFader2' registered
Particle Affector Type 'ColourImage' registered
Particle Affector Type 'ColourInterpolator' registered
Particle Affector Type 'Scaler' registered
Particle Affector Type 'Rotator' registered
Particle Affector Type 'DirectionRandomiser' registered
Particle Affector Type 'DeflectorPlane' registered
Plugin successfully installed
Loading library /home/pechan/.cg-development/ogre/build/lib/Plugin_BSPSceneManager
Installing plugin: BSP Scene Manager
Plugin successfully installed
Loading library /home/pechan/.cg-development/ogre/build/lib/Plugin_CgProgramManager
Installing plugin: Cg Program Manager
Plugin successfully installed
Loading library /home/pechan/.cg-development/ogre/build/lib/Plugin_PCZSceneManager
Installing plugin: Portal Connected Zone Scene Manager
PCZone Factory Type 'ZoneType_Default' registered
Plugin successfully installed
Loading library /home/pechan/.cg-development/ogre/build/lib/Plugin_OctreeZone
Installing plugin: Octree Zone Factory
Plugin successfully installed
Loading library /home/pechan/.cg-development/ogre/build/lib/Plugin_OctreeSceneManager
Installing plugin: Octree & Terrain Scene Manager
Plugin successfully installed
*-*-* OGRE Initialising
*-*-* Version 1.7.1 (Cthugha)
Error: Shell widget menu has zero width and/or height


Thanks for any help, I am a newbie in this. Sorry my bad English
jonathan_blacknight
Kobold
Posts: 32
Joined: Sun Mar 21, 2010 8:42 am
Location: Brazil
x 2

Re: Ogre 1.7 Cthugha Ubuntu 10.04 instalation tutorial

Post by jonathan_blacknight »

Firstly, in what step you have the problem?

what your OS and version?

verify if the folder OGRE exists in /usr/local/share/, and if the folder CEGUI exists in /usr/local/include/

try to do again the step II, III and IV

post the results
Brazilian blog about game programming
http://www.pontov.com.br/

My develop blog:
http://shydsgames.com/
User avatar
Adaon
Gnoblar
Posts: 9
Joined: Thu Jan 14, 2010 11:37 am
Location: Yekaterinburg, Russia
Contact:

Re: Ogre 1.7 Cthugha Ubuntu 10.04 instalation tutorial

Post by Adaon »

Have the same problem in Ubuntu Lucid. Make produces the following output:

Code: Select all

[ 47%] Built target Plugin_OctreeSceneManager
make[2]: *** No rule to make target `/usr/lib/libGL.so', needed by `lib/RenderSystem_GL.so'.  Stop.
make[1]: *** [RenderSystems/GL/CMakeFiles/RenderSystem_GL.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 49%] Built target Plugin_BSPSceneManager
make: *** [all] Error 2
User avatar
SomeFusion
Gremlin
Posts: 191
Joined: Sun Dec 01, 2002 12:38 am
x 3

Re: Ogre 1.7 Cthugha Ubuntu 10.04 instalation tutorial

Post by SomeFusion »

For those that don't want to compile from source, you can also use the repository from Adrew Fenn located on launchpad. You can get the ppa here: https://launchpad.net/~andrewfenn/+archive/ogredev
Summoning Wars is an open source role-playing game, featuring both a single-player and a multiplayer mode for about 2 to 8 players.
http://www.sumwars.org
jonathan_blacknight
Kobold
Posts: 32
Joined: Sun Mar 21, 2010 8:42 am
Location: Brazil
x 2

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by jonathan_blacknight »

I updated this little guide, and i test again with new ogre 1.7.1
Brazilian blog about game programming
http://www.pontov.com.br/

My develop blog:
http://shydsgames.com/
Silchas
Gnoblar
Posts: 8
Joined: Sun Aug 15, 2010 10:30 pm

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by Silchas »

I'm using Ubuntu 10.04 LTS (Lucid Lynx), and I'm trying to build Ogre 1.7.1 (Cthugha).

I'm getting this error when trying to make it:

Code: Select all

[ 41%] Built target OgreMain
make[2]: *** No rule to make target `/usr/lib/libGL.so', needed by `lib/RenderSystem_GL.so'.  Stop.
make[1]: *** [RenderSystems/GL/CMakeFiles/RenderSystem_GL.dir/all] Error 2
make: *** [all] Error 2
This occurs in step VIII, when I run make.
Any help would be greatly appreciated.
jonathan_blacknight
Kobold
Posts: 32
Joined: Sun Mar 21, 2010 8:42 am
Location: Brazil
x 2

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by jonathan_blacknight »

Post here what checkboxes is marked as enabled, and what checkboxes is marked as disabled
Brazilian blog about game programming
http://www.pontov.com.br/

My develop blog:
http://shydsgames.com/
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by jacmoe »

Just make sure you've the prerequisites down:
http://www.ogre3d.org/tikiwiki/Prerequi ... sion=Linux
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Silchas
Gnoblar
Posts: 8
Joined: Sun Aug 15, 2010 10:30 pm

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by Silchas »

@jonathan_blacknight: Everything except ogre_static is on. I can copy and post the exact list when I get home if you'd like.
EDIT: Cmake GUI is showing something like this: ('ON' is ticked, 'OFF' is unticked, '-' is empty...)

Code: Select all

CMAKE_BUILD_TYPE RelWithDebInfo
CMAKE_INSTALL_PREFIX /usr/local
OGRE_BUILD_COMPONENT_PAGING ON
OGRE_BUILD_COMPONENT_PROPERTY ON
OGRE_BUILD_COMPONENT_RTSHADERSYSTEM ON
OGRE_BUILD_COMPONENT_TERRAIN ON
OGRE_BUILD_PLUGIN_BSP ON
OGRE_BUILD_PLUGIN_OCTREE ON
OGRE_BUILD_PLUGIN_PCZ ON
OGRE_BUILD_PLUGIN_PFX ON
OGRE_BUILD_RENDERSYSTEM_GL ON
OGRE_BUILD_SAMPLES ON
OGRE_BUILD_TESTS ON
OGRE_BUILD_TOOLS ON
OGRE_CONFIG_THREADS 2
OGRE_CONFIG_THREAD_PROVIDER boost
OGRE_DEPENDENCIES_DIR -
OGRE_INSTALL_DOCS ON
OGRE_INSTALL_SAMPLES ON
OGRE_INSTALL_TOOLS ON
OGRE_STATIC OFF 
@jacmoe: I thought I had the prereqs down, but I'll double check ASAP and get back to you.
EDIT: Yes, I have all the prerequisites listed in that link you posted, compulsory, optional, or otherwise.
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by CABAListic »

It seems your /usr/lib/libGL.so either doesn't exist or is a broken symlink. I would assume the latter because otherwise CMake shouldn't have picked it up in the first place. Check that it's valid.
Silchas
Gnoblar
Posts: 8
Joined: Sun Aug 15, 2010 10:30 pm

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by Silchas »

Well, I already knew it existed (one of the first things I did was check...), but it never occurred to me to check whether it was a broken link or not... which was rather foolish on my part, it seems...
file /usr/lib/libGL.so tells me that it is in fact a broken link to (/usr/lib/)mesa/libGL.so, which is in turn a broken symbolic link to (/usr/lib/)libGL.so.1, which is a valid symbolic link to /usr/lib/libGL.so.1.2!!!!

This would appear to be the problem.
I've fixed it using:

Code: Select all

sudo rm /usr/lib/libGL.so
sudo ln -s /usr/lib/libGL.so.1 /usr/lib/libGL.so
Build successful - now on to the next stage!

(I also replaced the link in /usr/lib/mesa, just in case I do something else that ends up needing it.)
Many thanks for your help!!! Out of curiosity (I'm relatively new to linux), what would cause such a thing to happen???

Also, when I built, I got two warnings:

Code: Select all

/home/[username]/dev/ogre_src_v1-7-1/Tools/MeshUpgrader/src/main.cpp: In function ‘int main(int, char**)’:
/home/[username]/dev/ogre_src_v1-7-1/Tools/MeshUpgrader/src/main.cpp:955: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result

Code: Select all

In file included from /home/[username]/dev/ogre_src_v1-7-1/Samples/OceanDemo/src/OceanDemo.cpp:16:
/home/[username]/dev/ogre_src_v1-7-1/Samples/OceanDemo/include/OceanDemo.h: In member function ‘void Sample_Ocean::changePage(int)’:
/home/[username]/dev/ogre_src_v1-7-1/Samples/OceanDemo/include/OceanDemo.h:327: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘size_t’
The latter one looks safe to ignore, but can someone please confirm whether the same can be said of the former one?
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by CABAListic »

Yes, both are fine. Well, technically for the first you would have to check the return value to ensure that no error occured, so in fact the MeshUpgrader does not handle read errors. But read errors at that point should be very rare since the file was opened successfully, and even if they occur, you will end up with incomplete data, so the conversion will probably fail safely. And if it doesn't, incorrect data is written to a new file, so the worst outcome should still be relatively safe ;)
Silchas
Gnoblar
Posts: 8
Joined: Sun Aug 15, 2010 10:30 pm

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by Silchas »

Excellent. Thanks a million.
Silchas
Gnoblar
Posts: 8
Joined: Sun Aug 15, 2010 10:30 pm

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by Silchas »

Firstly, please excuse the double post.

Everything went fine, up to the point where I actually tried to build the code this guide suggests we test, just to make sure everything's working fine.

I'm getting:

Code: Select all

/usr/bin/ld: cannot find -lOgreMain_d
What'd I miss???
Last edited by Silchas on Tue Aug 17, 2010 2:00 pm, edited 1 time in total.
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by CABAListic »

Unless you explicitly set CMAKE_BUILD_TYPE to "Debug" when running CMake, you haven't built debug libraries, therefore OgreMain_d does not exist. Link with OgreMain instead.
Silchas
Gnoblar
Posts: 8
Joined: Sun Aug 15, 2010 10:30 pm

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by Silchas »

Right, got it. Thanks.

I can compile now, but I'm getting this when I try to run an app:

Code: Select all

Loading library /home/[username]/dev/ogre_build_v1-7-1/lib/Plugin_CgProgramManager.so
An exception has occurred(etc etc exception stuff): Could not load dynamic library /home/[username]/dev/ogre_build_v1-7-1/lib/Plugin_CgProgramManager.so
System Error: /home/[username]/dev/ogre_build_v1-7-1/lib/Plugin_CgProgramManager.so: cannot ope shared object file: No such file or directory in DynLib::load at /home/[username]/dev/ogre_src_v1-7-1/src/OgreDynLib.cpp
I've verified that the file doesn't exist. What am I doing wrong this time?
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by CABAListic »

Either your plugins.cfg contains an incorrect path to the plugins (although it appears correct from the little I can gather), or you didn't build the Cg plugin. Check the CMake output if the Cg package was found; if not you'll have to install it.
Silchas
Gnoblar
Posts: 8
Joined: Sun Aug 15, 2010 10:30 pm

Re: Ogre 1.7.1 Cthugha Ubuntu 10.04 instalation tutorial

Post by Silchas »

The path to plugins in plugins.cfg is correct. Cmake apparently can't find the Cg package. I was pretty sure I had it installed, but looks like it failed and I didn't notice =/ I'm rebuilding now - hopefully everything'll be sorted then. Thanks very much for your help.

EDIT: Yes, all is well. I'm finally good to go. Thanks again.
Post Reply