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
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
#162
The dedicated build is currently broke, got a report from Gregory McLean indicating the issue.
Here is his bug report
12/15/2005 (7:36 am)
@Dreamer,The dedicated build is currently broke, got a report from Gregory McLean indicating the issue.
Here is his bug report
That will get it to compile, it don't work though :( $ ./torqueDemod_DEBUG.bin -game starter.fps -dedicated -mission starter.fps/data/missions/stronghold.mis --- Executing starter.fps/data/missions/stronghold.mis. onNeedRelight: Unknown command. [ about a page of these ] *** Mission loaded % --------- Initializing: Torque Creator --------- Loading compiled script creator/editor/editor.cs. Loading compiled script creator/editor/particleEditor.cs. Loading compiled script creator/scripts/scriptDoc.cs. Loading compiled script creator/ui/creatorProfiles.cs. Loading compiled script creator/ui/InspectDlg.gui. Warning: (gui/core/guiTypes.cc @ 347) GuiControlProfile: requested gui profile (GuiDialogProfile) does not exist. Fatal: (gui/core/guiTypes.cc @ 351) GuiControlProfile: unable to find specified profile (GuiDialogProfile) and GuiDefaultProfile does not exist! Alert: Fatal: (gui/core/guiTypes.cc @ 351) GuiControlProfile: unable to find specified profile (GuiDialogProfile) and GuiDefaultProfile does not exist! Nonzero exit code: 1, triggering SIGSEGV for core dump % Segmentation fault ---- Looks like the creator is hard coded in to run, dedicated or not from the main.cs.
#163
I'll work with GG to properly fix this sot hat dedicated builds do not include the creator edit
-Ron
12/15/2005 (7:45 am)
Example/main.cs needs to be fixed, its current state is// Run the Torque Creator mod by default, it's needed for editors. $modcount = 2; $userMods = "creator;" @ $defaultGame;
I'll work with GG to properly fix this sot hat dedicated builds do not include the creator edit
-Ron
#164
12/15/2005 (8:03 am)
Funny I always thought the switch was --dedicated
#165
-dedicated was used
The issue is in main.cs, there are 2 sections of code that stuffs the 'creator' mod into $usermods
the first is at the top of the args section and the other is when the user passes in the -game argument.
main.cs needs to resolved in order for dedicated builds to work
12/15/2005 (8:08 am)
@Dreamer:-dedicated was used
$ ./torqueDemod_DEBUG.bin -game starter.fps [b]-dedicated[/b] -mission starter.fps/data/missions/stronghold.mis
The issue is in main.cs, there are 2 sections of code that stuffs the 'creator' mod into $usermods
the first is at the top of the args section and the other is when the user passes in the -game argument.
main.cs needs to resolved in order for dedicated builds to work
#166
12/15/2005 (8:20 am)
Ron@ This morning i just edited main.cs so that $gameDefault was set to starter.fps and did ./torqueDemod_DEBUG.bin -dedicated and that seemed to work. Maybe i just halucinated that it worked, it was before my morning coffee. I never did set that from the command line.
#167
--> Linking out.GCC3.4.RELEASE/torqueDemo.bin
/usr/bin/ld: cannot find -lGLU
collect2: ld returned 1 exit status
make[1]: *** [out.GCC3.4.RELEASE/torqueDemo.bin] Error 1
make: *** [default] Error 2
The reason this occurs is because libGLU.a does not exist on my system. The reason it doesn't is because ATI doesn't provide it with their proprietary drivers. I'm not sure what everyone else is using (all nVidia cards???), but the way around this (and I've had to do this since 1.2.X) is to take out the "static" stuff in mk/conf.UNIX.mk. Here's the modified version of the relevant section:
I submitted this in another bug thread and someone said they'd be verifying that it's okay to run with the shared libGLU.so (and that the comment might be old/suspect) but I guess it was never done.
Anyway, I'm not sure if this is a fix "for everyone"... but certainly anyone running proprietary ATI drivers on Linux are going to run into this. Can you guys try running *without* statically linking GLU and see if it's okay - then we can update mk/conf.UNIX.mk and lay this nuisance to rest...???
I'll continue my report after I get a change to build the DEBUG build, and run both builds to try them out. Very exciting! Good work guys!
Thanks,
Ed
12/15/2005 (8:26 am)
Okay, I did a checkout of CVS this morning and the build succeeded (finally!) on Mandrake 10.1 with gcc-3.4.4... except for one minor detail...--> Linking out.GCC3.4.RELEASE/torqueDemo.bin
/usr/bin/ld: cannot find -lGLU
collect2: ld returned 1 exit status
make[1]: *** [out.GCC3.4.RELEASE/torqueDemo.bin] Error 1
make: *** [default] Error 2
The reason this occurs is because libGLU.a does not exist on my system. The reason it doesn't is because ATI doesn't provide it with their proprietary drivers. I'm not sure what everyone else is using (all nVidia cards???), but the way around this (and I've had to do this since 1.2.X) is to take out the "static" stuff in mk/conf.UNIX.mk. Here's the modified version of the relevant section:
# GLU must be statically linked, otherwise torque will crash. # JMQNOTE: aside from gluProject/unProject, GLU doesn't work. # calling a GLU function that calls a GL function will cause a # crash. let me know if you have a fix :) LINK.LIBS.GENERAL = $(LINK.LIBS.VORBIS) -lGLU -L/usr/X11R6/lib -lSDL -lpthread -ldl # -lefence LINK.LIBS.TOOLS = $(LINK.LIBS.VORBIS) -lGLU -L/usr/X11R6/lib -lSDL -lpthread -ldl # -lefence
I submitted this in another bug thread and someone said they'd be verifying that it's okay to run with the shared libGLU.so (and that the comment might be old/suspect) but I guess it was never done.
Anyway, I'm not sure if this is a fix "for everyone"... but certainly anyone running proprietary ATI drivers on Linux are going to run into this. Can you guys try running *without* statically linking GLU and see if it's okay - then we can update mk/conf.UNIX.mk and lay this nuisance to rest...???
I'll continue my report after I get a change to build the DEBUG build, and run both builds to try them out. Very exciting! Good work guys!
Thanks,
Ed
#168
Might be a coffee thing ;)
give this a whirl
WARNING
please keep in mind that this is code done on the fly without any system to test/validate against. I am looking at SVN via the web portal and making this change in notepad. Please backup your copy of main.cs before attempting this fix.
if all goes well, I'll unit test it this evening and ask if GG would accept this change adn push to CVS
-Ron
12/15/2005 (8:30 am)
@Bonoit:Might be a coffee thing ;)
give this a whirl
[b]after:[/b]
//------------------------------------------------------------------------------
// Process command line arguments
[b]add:[/b]
$hasDedicated = strpos($Game::argv, "-dedicated") > -1;
[b]replace:[/b]
$modcount = 2;
$userMods = "creator;" @ $defaultGame;
[b]with:[/b]
if( $hasDedicated )
{
$modcount = 1;
$userMods = $defaultGame;
}
else
{
$modcount = 2;
$userMods = "creator;" @ $defaultGame;
}
[b]change the -game case to:[/b]
//--------------------
case "-game":
$argUsed[$i]++;
if ($hasNextArg)
{
// Set the selected mod and creator for editor stuff.
if( $hasDedicated )
$userMods = $nextArg;
else
$userMods = "creator;" @ $nextArg;
$argUsed[$i+1]++;
$i++;
$modcount = 2;
}
else
error("Error: Missing Command Line argument. Usage: -game <game_name>");WARNING
please keep in mind that this is code done on the fly without any system to test/validate against. I am looking at SVN via the web portal and making this change in notepad. Please backup your copy of main.cs before attempting this fix.
if all goes well, I'll unit test it this evening and ask if GG would accept this change adn push to CVS
-Ron
#169
is not segfaulting after seeing ron's fix, I just commented all lines in creator's main.cs and it seems to work - I don't have a client ready yet.
Had to do the Benoit fix for ifndef dedicated and the add to LFLAGS.GENERAL
l
12/15/2005 (8:59 am)
./torqueDemod_DEBUG.bin -dedicated -game starter.fps -mission starter.fps/data/missions/stronghold.misis not segfaulting after seeing ron's fix, I just commented all lines in creator's main.cs and it seems to work - I don't have a client ready yet.
Had to do the Benoit fix for ifndef dedicated and the add to LFLAGS.GENERAL
l
#170
--------- Initializing: Torque Creator ---------
Engine initialized...
Sending heartbeat to master server [IP:216.116.32.49:28002]
Received info request from a master server [IP:216.116.32.49:28002].
%
Received info request from a master server [IP:216.116.32.49:28002].
Sending heartbeat to master server [IP:216.116.32.49:28002]
Received info request from a master server [IP:216.116.32.49:28002].
Received info request from a master server [IP:216.116.32.49:28002].
Got Connect challenge Request from IP:83.36.216.237:1373
Got Connect Request
Connect request from: IP:83.36.216.237:1373
CADD: 1141 IP:83.36.216.237:1373
*** Sending mission load to client: starter.fps/data/missions/stronghold.mis
Mapping string: MissionStartPhase1Ack to index: 0
No such file 'starter.fps/data/sound/takeme.wav'.
No such file 'starter.fps/data/sound/takeme.ogg'.
No such file 'starter.fps/data/sound/replaceme.wav'.
No such file 'starter.fps/data/sound/replaceme.ogg'.
No such file 'starter.fps/data/sound/replaceme.wav'.
........
**** whole bunch of no such file - maybe I ran the dedicated server command wrong?
12/15/2005 (9:02 am)
Someone tried to connect...--------- Initializing: Torque Creator ---------
Engine initialized...
Sending heartbeat to master server [IP:216.116.32.49:28002]
Received info request from a master server [IP:216.116.32.49:28002].
%
Received info request from a master server [IP:216.116.32.49:28002].
Sending heartbeat to master server [IP:216.116.32.49:28002]
Received info request from a master server [IP:216.116.32.49:28002].
Received info request from a master server [IP:216.116.32.49:28002].
Got Connect challenge Request from IP:83.36.216.237:1373
Got Connect Request
Connect request from: IP:83.36.216.237:1373
CADD: 1141 IP:83.36.216.237:1373
*** Sending mission load to client: starter.fps/data/missions/stronghold.mis
Mapping string: MissionStartPhase1Ack to index: 0
No such file 'starter.fps/data/sound/takeme.wav'.
No such file 'starter.fps/data/sound/takeme.ogg'.
No such file 'starter.fps/data/sound/replaceme.wav'.
No such file 'starter.fps/data/sound/replaceme.ogg'.
No such file 'starter.fps/data/sound/replaceme.wav'.
........
**** whole bunch of no such file - maybe I ran the dedicated server command wrong?
#171
The following line in mk/conf.UNIX.mk is destined to fail to do anything but produce an EXE that won't run:
It might be better to change it to:
... and either let the user install the proper packages on the system (picking them up in /usr/lib), or put the .a files in the respective lib/blah directories. A similar issue needs to be addressed for the headers if it is decided to use system-installed headers/libs.
The OpenAL lib: I had to put my own copy of libopenal.so (a recent CVS version right before the official 1.1 Windows release, with a modification to fix a minor problem with the doppler effect which we need for our game) into the example folder, since the one that is part of Mandrake 10.1 in /usr/lib/libopenal.so has "problems". No biggie... but we probably want to build the latest OpenAL and put it in the example folder so that users can skip this step. OpenAL doesn't change that often so it should be a big issue. The platformX86UNIX code is designed to dynamically load a local copy in the same folder as the EXE (or a sub-folder - forgot the name), so it makes sense to put one there and developers can replace it if needed.
12/15/2005 (9:13 am)
A couple of issues with actually running my first RELEASE build from CVS on my system (some already noted):The following line in mk/conf.UNIX.mk is destined to fail to do anything but produce an EXE that won't run:
LINK.LIBS.VORBIS = ../lib/xiph/linux/libogg.so.0 ../lib/xiph/linux/libvorbis.so.0 ../lib/xiph/linux/libtheora.so.0
It might be better to change it to:
LINK.LIBS.VORBIS = -logg -lvorbis -ltheora
... and either let the user install the proper packages on the system (picking them up in /usr/lib), or put the .a files in the respective lib/blah directories. A similar issue needs to be addressed for the headers if it is decided to use system-installed headers/libs.
The OpenAL lib: I had to put my own copy of libopenal.so (a recent CVS version right before the official 1.1 Windows release, with a modification to fix a minor problem with the doppler effect which we need for our game) into the example folder, since the one that is part of Mandrake 10.1 in /usr/lib/libopenal.so has "problems". No biggie... but we probably want to build the latest OpenAL and put it in the example folder so that users can skip this step. OpenAL doesn't change that often so it should be a big issue. The platformX86UNIX code is designed to dynamically load a local copy in the same folder as the EXE (or a sub-folder - forgot the name), so it makes sense to put one there and developers can replace it if needed.
#172
12/15/2005 (9:44 am)
It might be nice if we could get a little extra CVS bandwidth while were getting all this sorted out. I did one checkout today and it won't let me do anything else... even a "cvs diff mk/conf.UNIX.mk" balks.
#173
12/15/2005 (9:53 am)
Amen to that!
#174
Several of us use the exact unmodified conf.UNIX.mk file with no issues, I can build it on my ubuntu and linspire box and run a debug and release build with no issues. I am able to play all the theor videos with sound, all the demo features etc..
I do agree that the names of the files should be changed from .so.0 to .so, but not seeing the reason for the usage of a .a lib
-Ron
12/15/2005 (10:05 am)
@EddieRayQuote:
The following line in mk/conf.UNIX.mk is destined to fail to do anything but produce an EXE that won't run:
Several of us use the exact unmodified conf.UNIX.mk file with no issues, I can build it on my ubuntu and linspire box and run a debug and release build with no issues. I am able to play all the theor videos with sound, all the demo features etc..
I do agree that the names of the files should be changed from .so.0 to .so, but not seeing the reason for the usage of a .a lib
-Ron
#175
12/15/2005 (10:06 am)
I'll check, but I don't think this is a trivial change, and probably isn't going to happen...our web guys are extremely busy at the moment!
#176
-Jeff Tunnell, GG
12/15/2005 (10:14 am)
Hey guys. Rick just upped the bandwidth allocation. It is kind of a band aid solution, so please be careful with usage.-Jeff Tunnell, GG
#177
12/15/2005 (10:20 am)
Thanx!
#178
12/15/2005 (10:21 am)
Rocking, thanks Jeff!
#179
EddieRay@ GLU is never provided with the drivers from any of the video card manufacturers that i know of. It should be provided with your distro but most of the time these days it isn't. You can get one created by getting the latest Mesa package (www.mesa3d.org) or remove the -static option from conf.UNIX.mk so it uses the dynamic version (used to segfault the seems to work locally for the last year though) or find a very old version of your distro and look into the glu packages (for mandrake i beleive 9 was the last version to include a static glu, ditto for RH).
12/15/2005 (10:31 am)
Jeff@ Thanks Jeff.EddieRay@ GLU is never provided with the drivers from any of the video card manufacturers that i know of. It should be provided with your distro but most of the time these days it isn't. You can get one created by getting the latest Mesa package (www.mesa3d.org) or remove the -static option from conf.UNIX.mk so it uses the dynamic version (used to segfault the seems to work locally for the last year though) or find a very old version of your distro and look into the glu packages (for mandrake i beleive 9 was the last version to include a static glu, ditto for RH).
#180
Thanks for chiming in!
I am sure the community appreciates how closely GG is watching this thread and the linux platform progression
-Ron
12/15/2005 (10:31 am)
Stephen / Jeff:Thanks for chiming in!
I am sure the community appreciates how closely GG is watching this thread and the linux platform progression
-Ron
Associate Ron Yacketta
post 1
post 2
post 3
Looks like JQ tried to fix it by putting it into the includes dir back in 2003, this did not work seeing that the file is generated
when one builds the ogg/vorbis dev libs. I could push a new copy to the includes dir again, but
have a feelign that it will not fix the issue. I would suggest that you get ahold of the dev libs for ogg/vorbis
build and install. I'll send JQ an e-mail to see if has any ideas etc..
-Ron