TORQUE 1.5 compilation OK on Ubuntu 6.10 and 7 after some fixes
by Philippe C · in Torque Game Engine · 10/28/2006 (3:44 pm) · 64 replies
Below the patch to apply in order to get running torque 1.5 on Ubuntu 6.10 - version Edgy Eft - October 2006.
engine/collision/optimizedPolyList.h : replace Poly::Poly by Poly
engine/game/cameraSpline.h : replace Knot::Knot with Knot
engine/game/fx/particleEngine.cc : move namespace sgParticleEngine after class declaration
engine/platformX86UNIX/x86UNIXInputManager.cc : comment KeytoUnicode fonction : workaround solution due to the new version of sdl for ubuntu ( only lower case available with this patch ...)
engine/collision/optimizedPolyList.h : replace Poly::Poly by Poly
engine/game/cameraSpline.h : replace Knot::Knot with Knot
engine/game/fx/particleEngine.cc : move namespace sgParticleEngine after class declaration
engine/platformX86UNIX/x86UNIXInputManager.cc : comment KeytoUnicode fonction : workaround solution due to the new version of sdl for ubuntu ( only lower case available with this patch ...)
diff -r old/engine/collision/optimizedPolyList.h new/engine/collision/optimizedPolyList.h
37c37
< Poly::Poly() { plane = -1; vertexCount = 0; material = -1; };
---
> Poly() { plane = -1; vertexCount = 0; material = -1; };
diff -r old/engine/game/cameraSpline.h new/engine/game/cameraSpline.h
40,42c40,42
< Knot::Knot() {};
< Knot::Knot(const Knot &k);
< Knot::Knot(const Point3F &p, const QuatF &r, F32 s, Knot::Type type = NORMAL, Knot::Path path = SPLINE);
---
> Knot() {};
> Knot(const Knot &k);
> Knot(const Point3F &p, const QuatF &r, F32 s, Knot::Type type = NORMAL, Knot::Path path = SPLINE);
diff -r old/engine/game/fx/particleEngine.cc new/engine/game/fx/particleEngine.cc
20,28d19
< //--------------------------------------------------------------------------
< //-------------------------------------- Internal global data
< //
< namespace {
<
< PEngine* sgParticleEngine = NULL;
< MRandomLCG sgRandom(0x1);
<
< } // namespace {}
54a46,56
> //--------------------------------------------------------------------------
> //-------------------------------------- Internal global data
> //
> namespace {
>
> PEngine* sgParticleEngine = NULL;
> MRandomLCG sgRandom(0x1);
>
> } // namespace {}
>
>
diff -r old/engine/platformX86UNIX/x86UNIXInputManager.cc new/engine/platformX86UNIX/x86UNIXInputManager.cc
63,64c63,65
< // lower case
< key = X11_KeyToUnicode( skey, mod );
---
> // lower case
> //key = X11_KeyToUnicode( skey, mod );
> key = skey;
68c69
< key = X11_KeyToUnicode( skey, mod );
---
> //key = X11_KeyToUnicode( skey, mod );
72c73
< key = X11_KeyToUnicode( skey, mod );
---
> //key = X11_KeyToUnicode( skey, mod );
#2
10/28/2006 (6:21 pm)
I wonder if there is a gcc flag you can pass to it to ignore extra qualifers...
#3
Now I have to see if can get the tank pack in in 1.5. If anyone has done it let me know, thanks.
10/28/2006 (10:43 pm)
Thanks Phillippe C, that helped a noob (me) a lot. I was getting stuck on the "sgParticleEngine = NULL;" part.Now I have to see if can get the tank pack in in 1.5. If anyone has done it let me know, thanks.
#5
Your work is much appreciated. I'll be upgrading to 1.5 in about two weeks and I was a bit worried about what it would take to get it working on Linux.
Thanks.
10/29/2006 (8:08 pm)
@Philippe CYour work is much appreciated. I'll be upgrading to 1.5 in about two weeks and I was a bit worried about what it would take to get it working on Linux.
Thanks.
#6
12/06/2006 (11:20 am)
Thanks, thats helped me out too!!
#7
the price, and I prefer to use the latest g++. Thanks for these fixes :)
12/07/2006 (1:41 am)
I'll probably upgrade to 1.5 this month (hopefully an early xmas present for me) now that I've seenthe price, and I prefer to use the latest g++. Thanks for these fixes :)
#8
:. libGLU.a was not found on Mandriva 2007 packages, I had to compile it myself from Mesa source code.
Many thanks.
12/23/2006 (4:19 pm)
:. The above modifications were sufficient to compile TGE 1.5 on Mandriva 2007 (32 bits), also.:. libGLU.a was not found on Mandriva 2007 packages, I had to compile it myself from Mesa source code.
Many thanks.
#9
In case anyone is having problems finding libGLU.a or wondering exactly how to go about compiling it, grab the source from http://www.mesa3d.org. I unpacked 6.5.1 and compiled. No problems, save the fact that it didn't give me libGLU.a. After reading the docs I found the static configs and tried:
make linux-x86-static
Seems obvious now, but hopefully it helps someone out. :)
01/09/2007 (1:13 am)
Thanks for your post. Had managed to sort out everything but the X11_KeyToUnicode errors, so glad I didn't have to spend more time banging my head on it. In case anyone is having problems finding libGLU.a or wondering exactly how to go about compiling it, grab the source from http://www.mesa3d.org. I unpacked 6.5.1 and compiled. No problems, save the fact that it didn't give me libGLU.a. After reading the docs I found the static configs and tried:
make linux-x86-static
Seems obvious now, but hopefully it helps someone out. :)
#10
01/15/2007 (10:59 am)
LoL, here we go again...here's what i got. :-/Quote: [ TorqueGameEngineSDK-Linux-1-5-0]$ make
--> Compiling game/fx/particleEngine.cc
In file included from ./game/gameBase.h:16,
from ./game/fx/particleEngine.h:10,
from game/fx/particleEngine.cc:6:
./dgl/gTexManager.h:428:26: warning: no newline at end of file
In file included from game/fx/particleEngine.cc:7:
./util/safeDelete.h:18:64: warning: no newline at end of file
In file included from game/fx/particleEngine.cc:14:
./dgl/gTexManager.h:428:26: warning: no newline at end of file
game/fx/particleEngine.cc:1721:2: warning: no newline at end of file
game/fx/particleEngine.cc:25: error: expected constructor, destructor, or type conversion before '*' token
game/fx/particleEngine.cc: In member function 'virtual void ParticleEmitter::onRemove()':
game/fx/particleEngine.cc:775: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc: In member function 'void ParticleEmitter::emitParticles(const Point3F&, const Point3F&, const Point3F&, const Point3F&, U32)':
game/fx/particleEngine.cc:1287: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc:1292: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc:1336: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc:1341: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc: In member function 'void ParticleEmitter::addParticle(const Point3F&, const Point3F&, const Point3F&, const Point3F&)':
game/fx/particleEngine.cc:1471: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc: In member function 'virtual void ParticleEmitter::advanceTime(F32)':
game/fx/particleEngine.cc:1543: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc:1558: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc: In function 'void ParticleEngine::init()':
game/fx/particleEngine.cc:1573: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc: In function 'void ParticleEngine::destroy()':
game/fx/particleEngine.cc:1580: error: 'sgParticleEngine' was not declared in this scope
make[1]: *** [out.GCC4.RELEASE/game/fx/particleEngine.obj] Error 1
make: *** [default] Error 2
[TorqueGameEngineSDK-Linux-1-5-0]$
#11
"engine/game/fx/particleEngine.cc : move namespace sgParticleEngine after class declaration"
is it done ?
01/16/2007 (10:44 am)
In the 1st post it is written :"engine/game/fx/particleEngine.cc : move namespace sgParticleEngine after class declaration"
is it done ?
#12
I don't remember if I did it or not, but that class PEngine; prototype before the namespace would fix your problem. I have a feeling that I did it, but it's not in my changelog.
Gary (-;
01/16/2007 (12:00 pm)
I have code that looks thus, in my particleEngine.cc file:extern bool gEditingMission;
//--------------------------------------------------------------------------
//-------------------------------------- Internal global data
//
class PEngine;
namespace {
PEngine* sgParticleEngine = NULL;
MRandomLCG sgRandom(0x1);
} // namespace {}I don't remember if I did it or not, but that class PEngine; prototype before the namespace would fix your problem. I have a feeling that I did it, but it's not in my changelog.
Gary (-;
#13
01/18/2007 (11:51 pm)
Ok, so how about this error???[DemoMMO]# make --> Assembling interior/itfdump.asm make[1]: nasm: Command not found make[1]: *** [out.GCC4.RELEASE/interior/itfdump.obj] Error 127 make: *** [default] Error 2 [DemoMMO]#
#14
Gary (-;
01/19/2007 (2:16 am)
You need to install nasm. Use your distrubtions's package manager to find and install it.Gary (-;
#15
[quote]Compiling platformX86UNIX/x86UNIXGL.cc
platformX86UNIX/x86UNIXGL.cc:13:21: error: SDL/SDL.h: No such file or directory
platformX86UNIX/x86UNIXGL.cc: In function
01/19/2007 (11:41 am)
WoW....and the list keeps going...ha ha....This is after I installed nasm.[quote]Compiling platformX86UNIX/x86UNIXGL.cc
platformX86UNIX/x86UNIXGL.cc:13:21: error: SDL/SDL.h: No such file or directory
platformX86UNIX/x86UNIXGL.cc: In function
#16
01/19/2007 (11:43 am)
It's not completing my post...it's cutting part of it out.
#17
do I need to modify this?
01/19/2007 (11:51 am)
Quote: Con::setBoolVariable("$pref::OpenGL::forcePalettedTexture", false);
do I need to modify this?
#18
You need to install your distribution's sdl-devel and sdl packages.
Gary (-;
01/19/2007 (12:03 pm)
platformX86UNIX/x86UNIXGL.cc:13:21: error: SDL/SDL.h: No such file or directory
You need to install your distribution's sdl-devel and sdl packages.
Quote:Con::setBoolVariable("$pref::OpenGL::forcePalettedTexture", false);no
do I need to modify this?
Gary (-;
#19
01/19/2007 (12:34 pm)
I am sorta of linux noob. I tried to install sdl-dev and sdl via yum and it came back with nothing. Might you have a tad bite of advise?Quote:You need to install your distribution's sdl-devel and sdl packages.I can't install them cause it's not finding them.
#20
I'm using FC6 here.
SDL-devel requires SDL... have you tried just "yum install sdl-devel"?
Gary (-;
01/19/2007 (1:16 pm)
What distribution are you actually using? Fedora?I'm using FC6 here.
yum deplist sdl-devel <snippage> package: SDL-devel.i386 1.2.10-8.fc6 dependency: libGL-devel provider: mesa-libGL-devel.i386 6.5.1-7.fc6 provider: mesa-libGL-devel.i386 6.5.1-8.fc6 dependency: libXrender-devel provider: libXrender-devel.i386 0.9.1-3.1 dependency: libX11-devel provider: libX11-devel.i386 1.0.3-4.fc6 provider: libX11-devel.i386 1.0.3-5.fc6 dependency: libXt-devel provider: libXt-devel.i386 1.0.2-3.1.fc6 dependency: alsa-lib-devel provider: alsa-lib-devel.i386 1.0.12-2.fc6 dependency: libGLU-devel provider: mesa-libGLU-devel.i386 6.5.1-7.fc6 provider: mesa-libGLU-devel.i386 6.5.1-8.fc6 dependency: SDL = 1.2.10-8.fc6 provider: SDL.i386 1.2.10-8.fc6 dependency: libSDL-1.2.so.0 provider: SDL.i386 1.2.10-6.2 provider: SDL.i386 1.2.10-8.fc6 dependency: libXrandr-devel provider: libXrandr-devel.i386 1.1.1-3.1 dependency: libXext-devel provider: libXext-devel.i386 1.0.1-2.1 dependency: /bin/sh provider: bash.i386 3.1-16.1 <snippage>
SDL-devel requires SDL... have you tried just "yum install sdl-devel"?
Gary (-;
Torque Owner Benoit Touchette