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 );
#43
03/26/2007 (10:06 pm)
Thanks. The make got much further but now it's stuck with:... --> Compiling platformX86UNIX/x86UNIXWindow.cc --> Compiling platformX86UNIX/x86UNIXUtils.cc make[1]: execvp: ../lib/xiph/linux/checklinks.sh: Permission denied make[1]: *** [out.GCC4.RELEASE/torqueDemo.bin] Error 127 make: *** [default] Error 2This was done with root privileges. I've tried getting libfishsound1-dev, libvorbis-dev, libogg-dev, loboggflac-dev, and various other audio libraries associated with the ogg file format. Any ideas on what's going on here?
#44
Sean
03/27/2007 (12:03 am)
Do chmod on the file or files. That will fix that. Chmod 755 or 777. Try 755 first.Sean
#45
Whatever's wrong, chmod 777 won't fix it :-)
Gary (-;
03/27/2007 (10:22 am)
Or just:chmod +x lib/xiph/linux/checklinks.sh
Whatever's wrong, chmod 777 won't fix it :-)
Gary (-;
#46
03/27/2007 (9:03 pm)
Thanks, it's finally running. In retrospect both of those issues were painstakingly obvious. I suppose I've been spoiled by the ease of Synaptic. :)
#47
I'm a noob and can't fix that problem lol even after reading this.
AIM = HEX3N
E-mail hexorus@yahoo.com
03/30/2007 (4:33 am)
Can someone please send me their x86UNIXInputManager.cc I'm a noob and can't fix that problem lol even after reading this.
AIM = HEX3N
E-mail hexorus@yahoo.com
#48
03/30/2007 (9:30 am)
I'm in the process of switching to TGEA and don't have it loaded any longer. Maybe Gary might have it.
#49
It's the "fix" that just clears out calls to X11_KeyToUnicode and puts the old code back in. Which also doesn't 100% work, but at least will let you link.
Gary (-;
03/30/2007 (11:20 am)
icculus.org/~chunky/stuff/x86UNIXInputManager.ccIt's the "fix" that just clears out calls to X11_KeyToUnicode and puts the old code back in. Which also doesn't 100% work, but at least will let you link.
Gary (-;
#50
04/01/2007 (2:41 am)
Thank you Gary and Philippe
#51
I am running this under Debian Etch (unstable) and all I do is install GCC 3.4 along side GCC 4 and then modify the appropriate make file in Torque to use gcc-3.4 and g++-3.4. Everything works fine.
04/07/2007 (5:17 pm)
Are you losing functionality just to compile with GCC 4? I don't have to do anything if I use GCC 3.4. It just seems silly to lose anything. I am running 1.5 of Torque. I am running this under Debian Etch (unstable) and all I do is install GCC 3.4 along side GCC 4 and then modify the appropriate make file in Torque to use gcc-3.4 and g++-3.4. Everything works fine.
#52
and can you help me with this?
--> Compiling lpng/png.c
lpng/png.c:1: error: CPU you selected does not support x86-64 instruction set
make[1]: *** [out.GCC4.DEBUG/lpng/png.obj] Error 1
make: *** [default] Error 2
04/18/2007 (8:53 pm)
Anyone Compiling this on Suse10.2 64bit ?and can you help me with this?
--> Compiling lpng/png.c
lpng/png.c:1: error: CPU you selected does not support x86-64 instruction set
make[1]: *** [out.GCC4.DEBUG/lpng/png.obj] Error 1
make: *** [default] Error 2
#53
If I had to guess it's saying your cpu doesn't support 64 bit processing.
04/18/2007 (9:20 pm)
Error: CPU you selected does not support x86-64 instruction setIf I had to guess it's saying your cpu doesn't support 64 bit processing.
#54
If I'm not mistaken, I had to compile it with x86-32 instruction set.. but that's not for sure.. I'll try to get access to this server again to try again, may be I'll find a way out, but no promises, sorry.
04/19/2007 (5:08 am)
Richard, I had compiled Torque 1.5.0 on Suse 10.1 (64bit) some time ago.. but I don't really remember how I've fixed this issue.If I'm not mistaken, I had to compile it with x86-32 instruction set.. but that's not for sure.. I'll try to get access to this server again to try again, may be I'll find a way out, but no promises, sorry.
#55
--> Linking out.GCC4.DEBUG/torqueDemo_DEBUG.bin
root@REBORN:/home/hans/torque# cd example
root@REBORN:/home/hans/torque/example# ./torqueDemo_DEBUG.bin
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
---------------------- DirectFB v0.9.25 ---------------------
(c) 2000-2002 convergence integrated media GmbH
(c) 2002-2004 convergence GmbH
-----------------------------------------------------------
(*) DirectFB/Core: Single Application Core. (2006-12-20 21:25)
(*) Direct/Memcpy: Using MMXEXT optimized memcpy()
(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed
--> No such file or directory
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize 'system' core!
--> Initialization error!
Alert: Error Unable to initialize SDL. (Error: DirectFBCreate: Initialization error!)
Exiting
04/27/2007 (7:48 pm)
Hey all , got it all compiled on ubuntu 7.04 but when i go to run torqueDemo_DEBUG.bin i get these errors ?--> Linking out.GCC4.DEBUG/torqueDemo_DEBUG.bin
root@REBORN:/home/hans/torque# cd example
root@REBORN:/home/hans/torque/example# ./torqueDemo_DEBUG.bin
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
---------------------- DirectFB v0.9.25 ---------------------
(c) 2000-2002 convergence integrated media GmbH
(c) 2002-2004 convergence GmbH
-----------------------------------------------------------
(*) DirectFB/Core: Single Application Core. (2006-12-20 21:25)
(*) Direct/Memcpy: Using MMXEXT optimized memcpy()
(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed
--> No such file or directory
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize 'system' core!
--> Initialization error!
Alert: Error Unable to initialize SDL. (Error: DirectFBCreate: Initialization error!)
Exiting
#56
From the perspective of a Linux nublet... I would check to see if you have SDL installed. I've cleared up my own SDL errors just by installing the SDL SDK as well. You will probably get a whole new set of errors after that though.
In lue of better and wiser advice, I hope that helps some.
04/27/2007 (9:11 pm)
Well Hans, if you put an email in your profile I'd be happy to email you about it ;D But since you didn't, I'll have to bare my ignorance for the sake of a quick reply.From the perspective of a Linux nublet... I would check to see if you have SDL installed. I've cleared up my own SDL errors just by installing the SDL SDK as well. You will probably get a whole new set of errors after that though.
In lue of better and wiser advice, I hope that helps some.
#57
I'm assuming you didn't try googling at all.
First, don't run anything as root.. Just don't.
I'm also going to assume you're trying to run this locally on a linux box with a gui.
Run it as a normal user, that's what your gui is expecting. That's what you should do.
This is another example of what I keep trying to tell people - know your OS before trying to develop on your OS.
Google is your friend.
04/27/2007 (9:27 pm)
>Xlib: connection to ":0.0" refused by serverI'm assuming you didn't try googling at all.
First, don't run anything as root.. Just don't.
I'm also going to assume you're trying to run this locally on a linux box with a gui.
Run it as a normal user, that's what your gui is expecting. That's what you should do.
This is another example of what I keep trying to tell people - know your OS before trying to develop on your OS.
Google is your friend.
#58
You're running as root, but in your user's home dir. I dunno what you're doing, but I know you're doing it wrong.
Anyways. Don't run as root, yada yada. Easy answer is to open a new terminal as the user you logged into X as [presumably hans; you probably just want to open a terminal on your screen as it is] and type:
Which is bad and wrong for a wide variety of reasons. Really, really, don't run as root :-)
Gary (-;
04/27/2007 (10:18 pm)
--> Linking out.GCC4.DEBUG/torqueDemo_DEBUG.bin root@REBORN:/home/hans/torque# cd example root@REBORN:/home/hans/torque/example# ./torqueDemo_DEBUG.bin Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Xlib: connection to ":0.0" refused by server Xlib: No protocol specified
You're running as root, but in your user's home dir. I dunno what you're doing, but I know you're doing it wrong.
Anyways. Don't run as root, yada yada. Easy answer is to open a new terminal as the user you logged into X as [presumably hans; you probably just want to open a terminal on your screen as it is] and type:
xhost +
Which is bad and wrong for a wide variety of reasons. Really, really, don't run as root :-)
Gary (-;
#59
I got it running now, by the way , developing on a system you don't entirely know is the best way to learn it.
04/28/2007 (5:43 am)
Alright, thanks! I got it running now, by the way , developing on a system you don't entirely know is the best way to learn it.
#60
-------------
$ make
--> Compiling lpng/png.c
lpng/png.c:1: error: CPU you selected does not support x86-64 instruction set
make[1]: *** [build.GCC4.RELEASE/lpng/png.obj] Error 1
make: *** [default] Error 2
--------------
I got over that hurdle by adding a -m32 flag to standard flags in ./mk/conf.UNIX.mk:
--------------
42c42
< 'freetype-config --cflags' -mcpu=i686 -ffast-math -pipe -m32
---
> 'freetype-config --cflags' -mcpu=i686 -ffast-math -pipe
--------------
FWIW,
-- Todd
04/28/2007 (5:36 pm)
I'm trying to get things compiling on a new ubuntu distribution over a core 2 duo and I bumped into problems compiling right off the top:-------------
$ make
--> Compiling lpng/png.c
lpng/png.c:1: error: CPU you selected does not support x86-64 instruction set
make[1]: *** [build.GCC4.RELEASE/lpng/png.obj] Error 1
make: *** [default] Error 2
--------------
I got over that hurdle by adding a -m32 flag to standard flags in ./mk/conf.UNIX.mk:
--------------
42c42
< 'freetype-config --cflags' -mcpu=i686 -ffast-math -pipe -m32
---
> 'freetype-config --cflags' -mcpu=i686 -ffast-math -pipe
--------------
FWIW,
-- Todd
Torque Owner Washington St. Uni. CS (#0002)
... In file included from ./dgl/gNewFont.h:29, from ./dgl/gFont.h:26, from platformX86UNIX/x86UNIXFont.cc:7: ./dgl/gTexManager.h:428:26: warning: no newline at end of file In file included from platformX86UNIX/x86UNIXFont.cc:11: ./core/unicode.h:97:22: warning: no newline at end of file platformX86UNIX/x86UNIXFont.cc:20:25: error: X11/Xft/Xft.h: No such file or directory platformX86UNIX/x86UNIXFont.cc:21:61: error: X11/extensions/Xrender.h: No such file or directory platformX86UNIX/x86UNIXFont.cc:25: error: expected constructor, destructor, or type conversion before '*' token platformX86UNIX/x86UNIXFont.cc: In function 'GOldFont* createFont(const char*, dsize_t, U32)': platformX86UNIX/x86UNIXFont.cc:78: error: 'XftFont' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:78: error: 'font' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:78: error: 'loadFont' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:89: error: 'XftDraw' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:89: error: 'draw' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:92: error: 'XftDrawCreate' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:97: error: 'XftColor' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:97: error: expected ';' before 'black' platformX86UNIX/x86UNIXFont.cc:102: error: 'black' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:102: error: 'XftColorAllocName' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:108: error: 'white' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:117: error: 'XGlyphInfo' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:117: error: expected ';' before 'extent' platformX86UNIX/x86UNIXFont.cc:118: error: 'FT_UInt' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:118: error: expected ';' before 'glyph' platformX86UNIX/x86UNIXFont.cc:119: error: 'XftCharExists' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:125: error: 'glyph' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:125: error: 'XftCharIndex' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:126: error: 'extent' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:126: error: 'XftGlyphExtents' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:128: error: 'XftDrawRect' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:129: error: 'XftDrawGlyphs' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:158: error: 'XftFontClose' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:161: error: 'XftColorFree' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:164: error: 'XftDrawDestroy' was not declared in this scope platformX86UNIX/x86UNIXFont.cc: In member function 'virtual bool x86UNIXFont::create(const char*, U32, U32)': platformX86UNIX/x86UNIXFont.cc:196: error: 'XftFont' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:196: error: 'font' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:196: error: 'loadFont' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:204: error: 'XftNameUnparse' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:212: error: 'XftFontClose' was not declared in this scope platformX86UNIX/x86UNIXFont.cc: In member function 'virtual PlatformFont::CharInfo& x86UNIXFont::getCharInfo(UTF16) const': platformX86UNIX/x86UNIXFont.cc:247: error: 'XftFont' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:247: error: 'fontInfo' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:247: error: 'XftFontOpenName' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:266: error: 'XftDraw' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:266: error: 'draw' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:269: error: 'XftDrawCreate' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:274: error: 'XftColor' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:274: error: expected ';' before 'black' platformX86UNIX/x86UNIXFont.cc:279: error: 'black' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:279: error: 'XftColorAllocName' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:285: error: 'white' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:287: error: 'XGlyphInfo' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:287: error: expected ';' before 'charinfo' platformX86UNIX/x86UNIXFont.cc:288: error: 'charinfo' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:288: error: 'XftTextExtents16' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:303: error: 'XftDrawRect' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:304: error: 'XftDrawString16' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:323: error: 'XftColorFree' was not declared in this scope platformX86UNIX/x86UNIXFont.cc:326: error: 'XftDrawDestroy' was not declared in this scope make[1]: *** [out.GCC4.RELEASE/platformX86UNIX/x86UNIXFont.obj] Error 1 make: *** [default] Error 2Has anyone seen this before or have any idea where I messed up? Thanks!