Game Development Community

Linux Collaboration

by Ben Garney · in Torque Game Engine · 11/24/2005 (1:18 am) · 490 replies

Hey guys,

Based on the discussion happening at Jeff's .plan, I'm starting a thread here in the private forums so that Linux Torque developers who are interested in seeing stronger Linux support can get more involved in the development process.

This is also a chance to help get more Torque projects onto Linux. There's a bit of a shortage of reliable Linux-enabled developers that are willing to do builds, help port, etc.

So if you want to see across-the-board Linux support happen, you're a good dev, and you're willing to donate a little time to the cause, consider volunteering. :)

(And don't think this is a thankless job, either - of the four Linux guys I've worked with, one now works at GG doing XBox 360 development, one does builds for many games, one is able to make money doing contract work, and another is working on a kick ass RTS with a now-GG-employee... This is a great opportunity to get more involved in professional game dev, get some nice perks, or just earn the respect & adulation of your peers.)

Having a list of people who are interested in this sort of thing will be a big boost to anyone trying to get their product on Linux, including things like GG getting future Torque releases out. :) Instead of scouring the web, people can just check here. Fast, quick, easy.

Thanks for taking the time to get involved!
Ben
#241
12/18/2005 (9:33 pm)
@Ron: That's weird... I can't see any of your commit logs (although I can see other people's "code" blocks)... and there is a big grey box covering up a string of posts near the middle of the thread...
#242
12/21/2005 (8:39 am)
Okay... as of today after doing a "cvs update", the only issues I have are:

1) the problem with the forced static linking of GLU

2) the "invalid offsetof" warnings during compile

Other than that, the fonts are a bit big in the world editor menubar, but I'm not sure if that's Linux-specific... at least I can *see* the menubar items in the world editor now (was there a fix for this problem?). The alignment of the text of various GUI things gets messed up because of this "big font" problem I think. I can post screens if you like...

One nitpick item: runtorque.sh is using "sh -x", so it prints a bunch of stuff for debugging - not really needed in the final Linux 1.4.

Cheers,

Ed
#243
12/21/2005 (8:47 am)
Regarding the display problems with this thread in Firefox - it seems to work fine in Firefox 1.0.2 on Mandrake 10.1. I don't see the strange problems with the SVN logs or the big grey box covering some of the posts.
#244
12/21/2005 (2:09 pm)
Okay... I got the font issue worked out on my system... had to do some "voodoo" to get the M$ fonts to *actually* be available on my Xserver (they were working in Gnome and other TT-aware things like Firefox, but not really showing up as X fonts). This page was extremely handy for getting all the details worked out:

www.paulandlesley.org/linux/xfree4_tt.html

It would be nice, however, to alter the font loading code in platformX86UNIX to use some better font substitutions so that we could get "close" to the same look on Linux (compared to the look on Windows) without actually using the M$ fonts (really, it is a pain to set up the M$ fonts by hand after all). There is already some substitution going on here and there in x86UNIXFont.cc, but we might "optimize" it a bit to choose better substitues and try more possibilities in the cases where the originally requested font fails to load. Personally, I don't think Helvetic looks anywhere near as good as Arial - it's very "chunky" and "pixel-y" looking, and it's getting substituted at a size that ends up being bigger on-screen than Arial.
#245
12/21/2005 (3:13 pm)
On line 96 of x86UNIXFont.cc, the following line:

slant = "o";

is problematic for the M$ fonts which use slant = "i" to indicate italics. We should probably try "i" if "o" fails to yield a font, or change "o" to "i" for any M$ font that is being loaded on Linux.

Any thoughts?
#246
12/21/2005 (8:05 pm)
All,

Just got word from MattF that CVS was synced with SVN this evening, if you have the time please pull a clean copy of CVS and give it a whirl. Please report all issues here as well as distros that compile clean without modifications (include distro (with version) and gcc (with version))


Thanxs Matt!!
-Ron
#247
12/22/2005 (1:13 am)
I think CVS may be smoking crack.

This is from the CVS pull onto my gentoo box.
make -f mk/configure.mk OS=LINUX COMPILER=GCC3 BUILD=RELEASE
In file included from ../lib/xiph/include/ogg/ogg.h:24,
                 from ../lib/xiph/include/vorbis/codec.h:26,
                 from audio/vorbisStream.h:25,
                 from audio/audioBuffer.h:21,
                 from audio/audioDataBlock.h:13,
                 from audio/audio.h:13,
                 from audio/audio.cc:6:
../lib/xiph/include/ogg/os_types.h:123:32: ogg/config_types.h: No such file or directory

GCC info
Quote:
sparky torque # gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/specs
Configured with: /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3.6 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6/info --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include/g++-v3 --host=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)

Now on my ubuntu box, which was my first pull from CVS, there are the usual butt load of no new line warnings and a couple of type conversion warnings. But it compiles fine
make -f mk/configure.mk OS=LINUX COMPILER=GCC4 BUILD=RELEASE
Quote:
steve@mybox:~/Projects/torque$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --with-gxx-include-dir=/usr/include/c++/4.0.2 --enable-shared --with-system-zlib --libexecdir=/usr/lib --enable-nls --without-included-gettext --enable-threads=posix --program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)

These are both completely clean CVS pulls, using the exact SAME instructions.
cvs -z3 -d :pserver:my-name@cvs.garagegames.com:/cvs/torque checkout -r HEAD torque

The fact that the compile errors appear on the gentoo box to be exactly the same as they were before the latest CVS sync, would at least on the surface indicate that CVS gave me 2 different versions!

Thoughts?
#248
12/22/2005 (1:15 am)
Almost forgot Ubuntu breezy compiles OK.
Gentoo (does gentoo have versions?) does not.
#249
12/22/2005 (6:12 am)
I should be getting the internet back on tonight, will be testing again within the next day or so.
#250
12/22/2005 (8:09 am)
@EddieRay,

how is the font on the join server screen?

On mine, the text is too big and gets clipped on the right - but other than this screen I
can live with the helvetica.
#251
12/22/2005 (8:11 am)
Gentoo w/ gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8) compiles OK
#252
12/22/2005 (8:58 am)
@Ron
cvs pulled today and I see a bunch of:

warning: no newline at end of file



it still compiles though.
#253
12/22/2005 (9:35 am)
@Dreamer: Do a "diff -r" on your two trees and find out for sure if CVS gave you two different downloads...?

@Charles: Once I ensured that the fonts being requested are *actually* being loaded successfully, things look pretty nice with the world editor and the F1 help and most of the dialogs, etc., but I see what you mean about the "Join Server" dialog.

copland.udel.edu/~ed/tge/server-screen14.jpg
Edit: I verified on the above image that the requested fonts are getting found correctly and at the right size (I undid the size-2 change in mapSize() for this as well to get the actual requested size fonts to be used).

Problems occur when the platformX86UNIX/x86UNIXFont.cc code in loadFont() requests a particular font and doesn't actually get what it asked for and gets something that is supposedly "close" instead. Also, mapSize() is being used to change font sizes > 12 to "size - 2"... so that adds confusion, i.e., the app want's "Arial Bold 20" and the one that actually gets requested by the code is size 18... the user thinks "I have Arial Bold 20 configured and working on my system - but it's not finding it so it uses Helvetica Bold 18... what in the world...?".

@All:

At minimum, we should probably have some kind of logging in loadFont() and/or x86UNIXFont::create() so that developers/users can see what is going on. When the requested font is not found, there should be a console message and there should be an indication of exactly which font was chosen as a substitute.

Also, we might want to make up a README to help TGE developers get the fonts set up for end-users of their games. As part of the install process, it might be possible for the end-users to run a shell script to grab the M$ fonts and set up a font directory for their X server. Then the runtorque.sh script could run the X commands needed to make their X server use the fonts before starting the game.

@Ron:

CVS checked out this morning looks good on Mandrake 10.1 using gcc-3.4.4. I still have the GLU issue (so I have to edit mk/conf.UNIX.mk to remove the forced static linking of GLU). The compiler switch -Wno-invalid-offsetof appears to be working today - no barrage of those error messages. I get lots of the "warning: no newline at end of file" messages during a "make" but no errors that stop the build. Is it possible to get this fixed?

Nitpick: runtorque.sh is not executable so we have to either use "sh runtorque.sh" or do a "chmod 755 runtorque.sh" to allow "./runtorque.sh" to work. I realize that UNIX file modes might be difficult to get preserved in SVN/CVS so the first solution might be "the way to do it".

New bug:

When I try to run a demo with runtorque.sh I get:

./torqueDemo.bin: error while loading shared libraries: libtheora.so.0: cannot open shared object file: No such file or directory

Looks like the ".0" got dropped off of the name of the shared library file (now it's called lib/xiph/linux/libtheora.so) but other things didn't get changed to match...?

Thanks,

Ed
#254
12/22/2005 (9:37 am)
@Ron:

I already posted this as a bug but nobody seems to care that a demo that will probably be seen by every eye that might purchase the engine has bad spelling or grammer. If I was buying the engine, that brings questions to my mind - like if they can't even spell and they don't qa their demo then how much more problems will i find later?

I know windos and muc users can't spell anyways but Linux users will notice,
can you fix the svn source?

Both problems are in ./example/demo/data/missions/features.mis


0)
Backbacks is spelled wrong...

description = "Shapes and images can be mounted on other shapes, weapons, backbacks, armor, players on vehicles or animals, etc.";

change backbacks to backpacks



1) A sentence has a grammer problem:

This town and its surroundings will be used to illustrate some the Torque Game Engine\'s features.

"some"
should be:
"some of"
#255
12/22/2005 (9:46 am)
@EddieRay,

So far I found 2 situations when the font is clipping...

click join server:

"No servers fo"

At the join server screen - click query lan:

"One server fo"
#256
12/22/2005 (9:58 am)
@Ron

mandrake 9.2 with gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)

make - works
make dedicated - works

make tools - no:

--> Compiling platformX86UNIX/x86UNIXInput.cc
In file included from /usr/X11R6/include/X11/Xlib.h:55,
from platformX86UNIX/x86UNIXInput.cc:17:
/usr/X11R6/include/X11/X.h:101: error: redeclaration of C++ built-in type 'int'
In file included from platformX86UNIX/x86UNIXInput.cc:17:
/usr/X11R6/include/X11/Xlib.h:295: error: semicolon missing after struct declaration
/usr/X11R6/include/X11/Xlib.h:295: error: abstract declarator '' used as declaration
/usr/X11R6/include/X11/Xlib.h:295: error: namespace-scope anonymous aggregates must be static
/usr/X11R6/include/X11/Xlib.h:295: error: redeclaration of C++ built-in type 'int'
/usr/X11R6/include/X11/Xlib.h:506: error: redeclaration of C++ built-in type 'int'
make[2]: *** [out.GCC3.DEBUG/platformX86UNIX/x86UNIXInput.obj] Error 1
make[1]: *** [engine_DEBUG.a] Error 2
make: *** [tools] Error 2
#257
12/22/2005 (10:18 am)
@Charles:

I ran into that same problem several days ago. The problem is the build order. You need to do a normal make prior to doing a "make tools".

So now, when I'm doing a complete build I do:

make clean
make -f mk/configure.mk blah, blah, blah
make dedicated
make clean
make
make tools

Works for me anyway.

@All:

If you want a quick way to fix the "no newline" error, at the expense of touch'ing all of the files, i.e. updating the date, in the top level directory do:
for i in 'find . -iname "*.c" -o -iname "*.cc" -o -iname "*.h" -o -iname "*.cpp"'
do
echo $i
echo wq | ed $i > /dev/null 2>&1
done

This only modifies the contents of the files that don't have terminating newlines, however the modification times on all the .c, .cc, .h and .cpp files will be updated. Something like this could be added to the top level Makefile so people could do this periodically prior to committing.
#258
12/22/2005 (10:22 am)
After doing "make" (Mandrake 10.1, gcc-3.4.4) and having it succeed to build the executable, if I try to do "make dedicated" I get:

--> Compiling platformX86UNIX/x86UNIXDedicatedStub.cc
--> Linking out.GCC3.4.RELEASE/torqueDemod.bin
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0x792): In function 'ProcessMessages()':
: undefined reference to 'NotifySelectionEvent(_XEvent&)'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0x9a8): In function 'Platform::AlertOK(char const*, char const*)':
: undefined reference to 'XMessageBox::XMessageBox(_XDisplay*)'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0x9b8): In function 'Platform::AlertOK(char const*, char const*)':
: undefined reference to 'XMessageBox::alertOK(char const*, char const*)'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0xa0a): In function 'Platform::AlertOK(char const*, char const*)':
: undefined reference to 'XMessageBox::~XMessageBox()'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0xa18): In function 'Platform::AlertOK(char const*, char const*)':
: undefined reference to 'XMessageBox::~XMessageBox()'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0xc6a): In function 'Platform::AlertOKCancel(char const*, char const*)':
: undefined reference to 'XMessageBox::XMessageBox(_XDisplay*)'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0xc7a): In function 'Platform::AlertOKCancel(char const*, char const*)':
: undefined reference to 'XMessageBox::alertOKCancel(char const*, char const*)'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0xcd5): In function 'Platform::AlertOKCancel(char const*, char const*)':
: undefined reference to 'XMessageBox::~XMessageBox()'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0xd39): In function 'Platform::AlertOKCancel(char const*, char const*)':
: undefined reference to 'XMessageBox::~XMessageBox()'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0xf4a): In function 'Platform::AlertRetry(char const*, char const*)':
: undefined reference to 'XMessageBox::XMessageBox(_XDisplay*)'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0xf5a): In function 'Platform::AlertRetry(char const*, char const*)':
: undefined reference to 'XMessageBox::alertRetryCancel(char const*, char const*)'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0xfb5): In function 'Platform::AlertRetry(char const*, char const*)':
: undefined reference to 'XMessageBox::~XMessageBox()'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0x1019): In function 'Platform::AlertRetry(char const*, char const*)':
: undefined reference to 'XMessageBox::~XMessageBox()'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0x1129): In function 'Platform::setWindowLocked(bool)':
: undefined reference to 'typeinfo for UInputManager'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0x115f): In function 'Platform::setWindowLocked(bool)':
: undefined reference to 'UInputManager::setWindowLocked(bool)'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0x1310): In function 'Platform::process()':
: undefined reference to 'PollRedbookDevices()'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0x158e): In function 'Platform::init()':
: undefined reference to 'OpenGLInit'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0x1627): In function 'Platform::init()':
: undefined reference to 'OpenGLDevice::create()'
out.GCC3.4.RELEASE/platformX86UNIX/x86UNIXWindow.obj(.text+0x1798): In function 'Platform::initWindow(Point2I const&, char const*)':
: undefined reference to 'InitOpenGL()'
collect2: ld returned 1 exit status
make[1]: *** [out.GCC3.4.RELEASE/torqueDemod.bin] Error 1
make: *** [dedicated] Error 2
#259
12/22/2005 (10:26 am)
@EddieRay:

Try a "make clean" before you try the "make dedicated".
#260
12/22/2005 (10:28 am)
Okay, if I do a "make clean" followed by a "make dedicated", the build succeeds. The executable has the same problem with the missing "libtheora.so.0" library tho', so it doesn't run.