Topic: Compiling 0.5.2 Fedora 13

Trilby on September 08, 2010, 08:56:17 PM

Trilby

  • Full Member
  • ***
  • Posts: 119
  • Karma: +0/-0
    • View Profile
Hello again. I'd switched my focus towards Fedora hoping to take advantage of the Nouveau experimental drivers to play Sumwars with. Unfortunately I'm having trouble getting the 0.5.2 release to start once compiled. So I'm wondering if any kind or experienced person could help.

The OS more specifically is Fedora 13 x86_64

I've used both ./configure and cmake to compile the source, both lead to the same result. Upon starting the executable through the terminal.

Ogre log:
Code: [Select]
20:19:27: Creating resource group General
20:19:27: Creating resource group Internal
20:19:27: Creating resource group Autodetect
20:19:27: SceneManagerFactory for type 'DefaultSceneManager' registered.
20:19:27: Registering ResourceManager for type Material
20:19:27: Registering ResourceManager for type Mesh
20:19:27: Registering ResourceManager for type Skeleton
20:19:27: MovableObjectFactory for type 'ParticleSystem' registered.
20:19:27: OverlayElementFactory for type Panel registered.
20:19:27: OverlayElementFactory for type BorderPanel registered.
20:19:27: OverlayElementFactory for type TextArea registered.
20:19:27: Registering ResourceManager for type Font
20:19:27: ArchiveFactory for archive type FileSystem registered.
20:19:27: ArchiveFactory for archive type Zip registered.
20:19:27: FreeImage version: 3.10.0
20:19:27: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
20:19:27: 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,sgi,exr,j2k,j2c,jp2
20:19:27: DDS codec registering
20:19:27: Registering ResourceManager for type HighLevelGpuProgram
20:19:27: Registering ResourceManager for type Compositor
20:19:27: MovableObjectFactory for type 'Entity' registered.
20:19:27: MovableObjectFactory for type 'Light' registered.
20:19:27: MovableObjectFactory for type 'BillboardSet' registered.
20:19:27: MovableObjectFactory for type 'ManualObject' registered.
20:19:27: MovableObjectFactory for type 'BillboardChain' registered.
20:19:27: MovableObjectFactory for type 'RibbonTrail' registered.
20:19:27: Loading library /usr/lib/OGRE/RenderSystem_GL.so
20:19:27: OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library /usr/lib/OGRE/RenderSystem_GL.so.  System Error: /usr/lib/OGRE/RenderSystem_GL.so: cannot open shared object file: No such file or directory in DynLib::load at OgreDynLib.cpp (line 81)

I've placed symlinks of all listed OGRE plugins amongst the other libs i.e /usr/lib64. this includes the RenderSystem_GL.so. I suppose these could be in the wrong place, as it does seem to want to look in /usr/lib/OGRE and not /usr/lib64/OGRE -- the latter is where the plugin lib is.

Being a general idiot at these matters, I wasn't sure if specifying the path between /usr/lib and usr/lib64 mattered?

Of course it could be something else entirely. Thanks in advance.
« Last Edit: September 08, 2010, 09:35:51 PM by Trilby »
Logged
  • Read 2059 times
  • Category General
Comments: 4

gnemo on September 09, 2010, 05:48:33 AM
Reply #1

gnemo

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
All you need to do is place some hardlinks (symlinks for a specific file compared to a whole directory) into the /usr/lib/OGRE folder from the /usr/lib64/OGRE folder or where ever the lib files might be.  This will trick ogre into thinking that the proper .so files exist where it thinks they should.  I do this all the time with the data files for the nightly builds of OpenTTD.  This saves creating multiple copies of the same stuff for each of my half dozen versions.

Don't forget to double check that they are named correctly.  You don't want a link called "Link to RenderSystem_GL.so" so just remove the "Link to " part and all will be well.
« Last Edit: September 09, 2010, 05:50:10 AM by gnemo »
Logged

Trilby on September 09, 2010, 10:15:05 AM
Reply #2

Trilby

  • Full Member
  • ***
  • Posts: 119
  • Karma: +0/-0
    • View Profile
Thank you. That worked. So I wasn't far wrong in my speculation. It is the difference between lib and lib64.

I think it may well be worth putting a note in the INSTALL text file for this.

Anyway on first boot up of Sumwars, after character creation, the graphics were extremely glitchy with great wedges of the texture files coming off Tolec and his friend. However after loading up the same saved character on a second session, the graphics appeared correctly and without any problems. At this stage I don't know whether this glitch will be an occasional thing or not.

Note on resolving dependencies: I edited this out from my original post while I went back and tested, but with Fedora's enet package I had to create my own enet.pc within /usr/lib64/pkgconfig -- this only seemed to matter for the ./configure. Cmake didn't seem to have any bother without it and would compile normally.

Thanks again Gnemo! :)
Logged

hal9000 on September 09, 2010, 01:33:46 PM
Reply #3

hal9000

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +0/-0
    • View Profile
Quote from: 'Trilby'

I think it may well be worth putting a note in the INSTALL text file for this.


Trillby just list here the sequence of commands/operations, (included those that Gnemo suggested you), you used to get it work in Fedora..so also the dependencies you installed..

Also make sure that they can function on a virgin Fedora Distro..

thank you
Logged

Trilby on September 09, 2010, 03:56:11 PM
Reply #4

Trilby

  • Full Member
  • ***
  • Posts: 119
  • Karma: +0/-0
    • View Profile
At the risk revealing my ignorance, under the eyes of serious Fedora power users; I present Trilby's guide to compiling Sumwars on Fedora. If something breaks I have no-one to blame but myself, and you have me to blame... :s

My Fedora 13 install is quite new i.e last Saturday. Before then I had never even used Fedora, so don't let me show you up. With a standard non-64bit Fedora system, things may go a little easier, the symlinks to the Ogre libraries shouldn't be necessary, as they will be in the standard path.

Quote
Update the Fedora system using Yum :

Code: [Select]
# yum check-update
# yum update


Note for users with Nvidia cards: If you also keep a Wacom tablet plugged during boot, the Nouveau drivers seem to be broken after the most recent kernel updates. So make sure you pick a kernel you know will work.

I installed the documented package to get the Nouveau drivers to run accelerated graphics.

Code: [Select]
# yum install mesa-dri-drivers-experimental

First install the latest gcc, I also added the package for additional C++ support. This is so you can compile the game with './configure' later. Install cmake while you're at it, if you prefer to use 'cmake .' later.

Install the dependencies for Sumwars including the -devel packages for each. Everything that is needed for Sumwars is in Fedora's repository. Either Yum or PackageKit will locate any further required libs/dependencies. For this stage I used PackageKit's Add/Remove Software, for ease of finding package names.

ogre
ogre-devel
ois
ois-devel
cegui
cegui-devel
enet
enet-devel
freealut
freealut-devel
openal-soft
openal-soft-devel
lua
lua-devel
libogg
libogg-devel
libvorbis
libvorbis-devel

Next, for enet I had to create the file enet.pc in my /usr/lib64/pkgconfig directory. This allows Pkg-config to locate the enet.so lib when compiling the game.

su - to root
Code: [Select]
# mousepad /usr/lib64/pkgconfig/enet.pc

Use mousepad or nano, or whichever text editor you prefer to use.

Enter the following into the empty text file:

Code: [Select]
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib64
includedir=/usr/include

Name: enet
Description: ENet is a relatively thin, simple and robust network communication layer on top of UDP
Version: 1.2.1
Libs: -L${libdir} -lenet
Cflags: -I${includedir}


Save the file. The version number is just what I have, I think this could be left out. Use /usr/lib64 if on a 64bit version or just /usr/lib if not.

Next, beacuse of the way Fedora has packaged Ogre for their 64bit release. I had to create the symlinks for the plugins normally found in /usr/lib64/OGRE in /usr/lib/OGRE --Thanks Gnemo.

su - to root
Code: [Select]
# cd /usr/lib
# ln -s /usr/lib64/OGRE/


This links the contents of the whole OGRE directory to /usr/lib so Ogre can find it's plugins when starting the game.

Download the Sumwars source and extract it your /home directory, or wherever.

Open terminal and su - to root. cd to the extracted sumwars_0-5-2_src directory. Follow the INSTALL file's instructions for either ./configure or cmake (but not both).
Logged