Game Development Community

Unable to compile Torque 1.3.0 on Fedora Core 4

by Andrew · in Torque Game Engine · 10/10/2005 (5:04 am) · 22 replies

I'm getting this whenever I try to run make in my Torque directory:

[dangel@cm243 Torque]$ make
--> Compiling audio/audio.cc
'-mcpu=' is deprecated. Use '-mtune=' or '-march=' instead.
./core/resManager.h: In member function 'void Resource::unlock()':
./core/resManager.h:255: error: invalid use of undefined type 'struct ResManager'
./core/resManager.h:38: error: forward declaration of 'struct ResManager'
./core/resManager.h: In member function 'void Resource::purge()':
./core/resManager.h:263: error: invalid use of undefined type 'struct ResManager'
./core/resManager.h:38: error: forward declaration of 'struct ResManager'
./core/resManager.h:265: error: invalid use of undefined type 'struct ResManager'
./core/resManager.h:38: error: forward declaration of 'struct ResManager'
./core/resManager.h: In member function 'void Resource::_unlock()':
./core/resManager.h:278: error: invalid use of undefined type 'struct ResManager'
./core/resManager.h:38: error: forward declaration of 'struct ResManager'
./platform/event.h: At global scope:
./platform/event.h:137: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./platform/event.h:137: error: '->' cannot appear in a constant-expression
./platform/event.h:137: error: '&' cannot appear in a constant-expression
./platform/event.h:140: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./platform/event.h:140: error: '->' cannot appear in a constant-expression
./platform/event.h:140: error: '&' cannot appear in a constant-expression
./platform/event.h:143: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./platform/event.h:143: error: '->' cannot appear in a constant-expression
./platform/event.h:143: error: '&' cannot appear in a constant-expression
audio/audio.cc: In function 'int loopingImageSort(const void*, const void*)':
audio/audio.cc:161: warning: converting to 'int' from 'float'
audio/audio.cc: In function 'int streamingSourceSort(const void*, const void*)':audio/audio.cc:193: warning: converting to 'int' from 'float'
audio/audio.cc: In function 'AUDIOHANDLE alxCreateSource(const Audio::Description*, const char*, const MatrixF*, AudioSampleEnvironment*)':
audio/audio.cc:707: warning: converting to non-pointer type 'ALuint' from NULL
audio/audio.cc: In function 'ALuint alxGetWaveLen(ALuint)':
audio/audio.cc:2092: warning: converting to 'ALuint' from 'F64'
make[1]: *** [out.GCC3.DEBUG/audio/audio.obj] Error 1
make: *** [default] Error 2

I've read some of the other posts but don't understand the answers. Hope someone can explain to me how I can start to solve these errors simply. All my experience so far with Torque has been with the 3D Game Programming All In One pre-built binaries so I'm really lost with the source code.
Page «Previous 1 2
#1
10/10/2005 (12:25 pm)
I've made a walk-thru on how to compile T2D on fc4. It will also work with torque, just skip the t2d specific steps.
Torque 2d Linux HOWTO
#2
10/10/2005 (6:40 pm)
Thanks man! That walkthrough was great. Solved all my earlier problems. However got a new one which didn't appear earlier:

[dangel@cm111 Torque]$ make
--> Compiling game/fx/particleEngine.cc
game/fx/particleEngine.cc:1537:2: warning: no newline at end of file
game/fx/particleEngine.cc:31: error: expected constructor, destructor, or type conversion before '*' token
game/fx/particleEngine.cc: In member function 'virtual void ParticleEmitter::onRemove()':
game/fx/particleEngine.cc:771: 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:1154: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc:1157: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc:1196: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc:1199: 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:1304: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc: In member function 'virtual void ParticleEmitter::advanceTime(F32)':
game/fx/particleEngine.cc:1367: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc:1377: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc: In function 'void ParticleEngine::init()':
game/fx/particleEngine.cc:1390: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc:1392: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc: In function 'void ParticleEngine::destroy()':
game/fx/particleEngine.cc:1397: error: 'sgParticleEngine' was not declared in this scope
game/fx/particleEngine.cc:1399: error: 'sgParticleEngine' was not declared in this scope
make[1]: *** [out.GCC3.DEBUG/game/fx/particleEngine.obj] Error 1
make: *** [default] Error 2
[dangel@cm111 Torque]$
#3
10/11/2005 (6:49 am)
In particleEngine.cc:
Move:
namespace {

PEngine* sgParticleEngine = NULL;
MRandomLCG sgRandom(0x1);

} // namespace {}


Below:
struct Particle;
class PEngine
{
// Interface for emitters.
static const U32 csmBlockSize;
Vector mAllocatedBlocks;
Particle* mFreeList;

public:
void updateParticles(Particle* particles, ParticleEmitter &emitter, const U32 ms);
void updateSingleParticle(Particle* particle, ParticleEmitter &emitter, const U32 ms);

Particle* allocateParticle(ParticleEmitter*);
void releaseParticle(Particle*);

public:
PEngine();
~PEngine();
};


That should do it..
#4
10/11/2005 (7:43 pm)
Thanks! That did it. I also solved a segmentation fault problem with help from your how-to. I've got YET another problem, it just never seems to end=( The torqueDemo starts up okay. When I start the mission, everything seems to load okay and then it crashes. I get this in the console:

[dangel@cm79 example]$ ./torqueDemo_DEBUG.bin
X Error of failed request: GLXBadContext
Major opcode of failed request: 145 (GLX)
Minor opcode of failed request: 5 (X_GLXMakeCurrent)
Serial number of failed request: 9160
Current serial number in output stream: 9160
X Error of failed request: GLXBadContext
Major opcode of failed request: 145 (GLX)
Minor opcode of failed request: 5 (X_GLXMakeCurrent)
Serial number of failed request: 9162
Current serial number in output stream: 9162
Segmentation fault
#5
10/12/2005 (8:18 am)
Looks like your opengl libraries/driver isn't quite right. I'm assuming you have a nvidia card ,so I'd reinstall the nvidia drivers, do a make clean, then another make.
#6
10/12/2005 (7:23 pm)
I reinstalled the 7676 drivers and did a make clean and make. The problem is still there. Should I try other driver versions?
#7
10/13/2005 (9:49 am)
You shouldn't have to use an eariler version. What card do you have anyways?
#8
10/13/2005 (6:09 pm)
I'm using the GeForce 5500 256MB. So what can I do to get rid of this problem?
#9
10/18/2005 (2:45 pm)
You shouldn't be having problems with a card like that. I'd take a hard look at your dev environment. Since the binary from the demo runs fine, but your compiled version doesn't, you're linking in the wrong opengl libs somewhere.
#10
11/26/2005 (5:12 pm)
As a new Torque owner and a user of Fedora 4, I just wanted to thank you for all your assitance, David.

I seem to have gotten a little further, so I thought I might add a "what's happening now".

It seems as though one of the xorg-x11-Mesa-libGL* packages had interfered w/ my nvidia driver (perhaps more still are). Mental note: Reinstall the nvidia driver after system updates that concern xorg.

After updating my system, reinstalling the nvidia driver (splash screen on X entry and everything), doing a make clean and make, here I am.

./runtorque.sh does just fine. Game loads, orcs die.

./torqueDemo.bin opens a black window, then closes with a seg fault.

./torqueDemo_DEBUG.bin seg faults instantly without even opening a window.

Am I still stuck in the same "linking wrong opengl libs somewhere" boat, or is this a slightly different situation?
#11
11/26/2005 (7:14 pm)
>It seems as though one of the xorg-x11-Mesa-libGL* packages had interfered w/ my nvidia driver (perhaps more still are). Mental note: Reinstall the nvidia driver after system updates that concern xorg.

Not only will xorg/x11 updates mess up your gl libs, you'll generally lose your hardware acceleration. When in doubt, run the nvidia installer again.

>./runtorque.sh does just fine. Game loads, orcs die.
Yay.. Always run this file to launch the engine, and use the -console switch to get useful debug information.

>./torqueDemo.bin opens a black window, then closes with a seg fault.
To keep torque working across new,old,different distros, it comes with it's own lib directory. Inside are needed things with the gcc libs they were compiled against. WIthout log file output, I'd guess the openal lib is giving you the trouble. Use -console and look at the last line.

./torqueDemo_DEBUG.bin seg faults instantly without even opening a window.
Not sure here, is this a fresh compile with your fixed gl libs?
#12
11/26/2005 (8:10 pm)
>>./torqueDemo.bin opens a black window, then closes with a seg fault.
>To keep torque working across new,old,different distros, it comes with it's own lib directory. Inside are needed >things with the gcc libs they were compiled against. WIthout log file output, I'd guess the openal lib is giving you >the trouble. Use -console and look at the last line.

OpenAL Driver Init:
OpenAL
Loading OpenAL: /home/bren/apps/Torque/example/lib/libopenal.so

Just for kicks, I tried symlinking my /usr/lib/libopenal.so to ~/apps/Torque/example/libs with same result.

My openal package version is 0.0-0.4.20040726 (stock from Fedora). I would have tried the openal package (http://www.garagegames.com/downloads/openal-linux-3-29-02.tar.gz) suggested in the README (http://www.garagegames.com/docs/tge/general/apbs04.php), but it's no longer available.

edit: I don't like my version (0.0) vs. the GG version (3.29)... Off to see if there's something better available

>>./torqueDemo_DEBUG.bin seg faults instantly without even opening a window.
>Not sure here, is this a fresh compile with your fixed gl libs?

I believe so... I mean it IS a fresh compile. Whether or not it picked up my nvidia gl libs, I'm not sure. How would I check that?
#13
11/26/2005 (9:17 pm)
>edit: I don't like my version (0.0) vs. the GG version (3.29)... Off to see if there's something better available
Your version is 4.20040726...

This is why you use runtorque.sh to launch the engine. You shouldn't try to make it use your libs as other people won't have your glib nor openal package. Just use the one in the lib directory.
#14
11/26/2005 (10:04 pm)
So I'm good?

As long as I know I'm good, I'll take a breathe and start figuring the rest of this out :)

edit: I sorta get it now.... I suppose I should get used to opening stuff up and looking around. runtorque.sh says it all, pretty much, even with my limited #!bash ability.

I certainly appreciate your patience and asistance. By reading this, I wouldn't be able to tell I've been using Linux for seven years... But then again I'm mostly server-focused, trying to fight the good fight (like you) against Goliath.

Ok. Back to lurking, unless otherwise notified ;)
#15
11/27/2005 (7:37 am)
Yeah, you're good.
#16
12/17/2005 (2:01 pm)
When I attempt to compile TGE I'm getting the following errror "out.GCC3.DEBUG/audio/audio.obj".

Configuration:
OS: Fedora core 4
GCC: gcc-4.0.2.8

Also, I applyed the patch to x86UNIXCPUInfo.cc as suggested by Benoit Tochette and Daavid Bunt's Torque 2D HowTo" site is down. Is there any other sites or information the addresses this problem.

Brian
#17
12/18/2005 (4:05 am)
I have applied all the patches provided for Torque 1.3 yet I am still receiving these error messages when I do a make:

Creating library out.GCC2.RELEASE/lungif.a
--> Compiling audio/audio.cc
'-mcpu=' is deprecated. Use '-mtune=' or '-march=' instead.
./core/resManager.h: In member function 'void Resource::unlock()':
./core/resManager.h:255: error: invalid use of undefined type 'struct ResManager'
./core/resManager.h:38: error: forward declaration of 'struct ResManager'
./core/resManager.h: In member function 'void Resource::purge()':
./core/resManager.h:263: error: invalid use of undefined type 'struct ResManager'
./core/resManager.h:38: error: forward declaration of 'struct ResManager'
./core/resManager.h:265: error: invalid use of undefined type 'struct ResManager'
./core/resManager.h:38: error: forward declaration of 'struct ResManager'
./core/resManager.h: In member function 'void Resource::_unlock()':
./core/resManager.h:278: error: invalid use of undefined type 'struct ResManager'
./core/resManager.h:38: error: forward declaration of 'struct ResManager'
./platform/event.h: At global scope:
./platform/event.h:137: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./platform/event.h:137: error: '->' cannot appear in a constant-expression
./platform/event.h:137: error: '&' cannot appear in a constant-expression
./platform/event.h:140: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./platform/event.h:140: error: '->' cannot appear in a constant-expression
./platform/event.h:140: error: '&' cannot appear in a constant-expression
./platform/event.h:143: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./platform/event.h:143: error: '->' cannot appear in a constant-expression
./platform/event.h:143: error: '&' cannot appear in a constant-expression
audio/audio.cc: In function 'int loopingImageSort(const void*, const void*)':
audio/audio.cc:161: warning: converting to 'int' from 'float'
audio/audio.cc: In function 'int streamingSourceSort(const void*, const void*)':
audio/audio.cc:193: warning: converting to 'int' from 'float'
audio/audio.cc: In function 'const char* cgetOpenAlDevices(SimObject*, S32, const char**)':
audio/audio.cc:367: error: 'alcGetString' was not declared in this scope
audio/audio.cc: In function 'AUDIOHANDLE alxCreateSource(const Audio::Description*, const char*, const MatrixF*, AudioSampleEnvironment*)':
audio/audio.cc:727: warning: converting to non-pointer type 'ALuint' from NULL
audio/audio.cc: At global scope:
audio/audio.cc:1532: error: redefinition of 'ConsoleConstructor ggetOpenAlDevicesobj'
audio/audio.cc:361: error: 'ConsoleConstructor ggetOpenAlDevicesobj' previously declared here
audio/audio.cc: In function 'const char* cgetOpenAlDevices(SimObject*, S32, const char**)':
audio/audio.cc:1532: error: redefinition of 'const char* cgetOpenAlDevices(SimObject*, S32, const char**)'
audio/audio.cc:361: error: 'const char* cgetOpenAlDevices(SimObject*, S32, const char**)' previously defined here
audio/audio.cc:1538: error: 'alcGetString' was not declared in this scope
audio/audio.cc: At global scope:
audio/audio.cc:1604: error: redefinition of 'ConsoleConstructor ggetOpenAlDevicesobj'
audio/audio.cc:361: error: 'ConsoleConstructor ggetOpenAlDevicesobj' previously declared here
audio/audio.cc: In function 'const char* cgetOpenAlDevices(SimObject*, S32, const char**)':
audio/audio.cc:1604: error: redefinition of 'const char* cgetOpenAlDevices(SimObject*, S32, const char**)'
audio/audio.cc:361: error: 'const char* cgetOpenAlDevices(SimObject*, S32, const char**)' previously defined here
audio/audio.cc:1610: error: 'alcGetString' was not declared in this scope
audio/audio.cc: In function 'ALuint alxGetWaveLen(ALuint)':
audio/audio.cc:2152: warning: converting to 'ALuint' from 'F64'
gmake[1]: *** [out.GCC2.RELEASE/audio/audio.obj] Error 1
gmake: *** [default] Error 2

I am using gcc (GCC) 4.0.2 20051109 (Red Hat 4.0.2-6). Thanks!
#18
12/18/2005 (11:31 am)
I'm pretty much on the T2D side of things now. If I can find some time, I'll go back and post a 1.3 tge linux howto. Is there some reason you're not using 1.4?
#19
12/19/2005 (5:18 am)
I do not know where to get the 1.4...could you point me as to where I can get it? Whenever I go back to see my license I can see the 1.4 for Windows XP but not for Linux. Thanks!

-- Dexter
#20
12/19/2005 (11:26 am)
Not out yet for Linux. The community is working on finishing the Linux side - getting it to run on more distros & the like.
Page «Previous 1 2