Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: draeath on April 06, 2007, 09:16:32 pm

Title: linux 3.6.9 CVS 4/6/2007
Post by: draeath on April 06, 2007, 09:16:32 pm
Here you may download a linux binary from CVS branch 3.6.9 - checked out from CVS on 4/6/2007
(For some reason the menus in game show 3.6.10...)

Note that this binary has been processed to decrease size and improve speed, and as such it will be completely useless for debugging!

Note that you need SSE support for this binary. If you have a P4 or later (AthlonXP or later for AMD) then it WILL work. Earlier than that, I suggest looking in 'cat /proc/cpuinfo'* first.

Download here: http://keleus.freeshell.org/fs2_open_3_6_9.tar.bz2 (http://keleus.freeshell.org/fs2_open_3_6_9.tar.bz2)
MD5 sum here: http://keleus.freeshell.org/fs2_open_3_6_9.tar.bz2.MD5 (http://keleus.freeshell.org/fs2_open_3_6_9.tar.bz2.MD5)




* If you open a terminal and run "cat /proc/cpuinfo" you will get a whole lot of nifty info. What we are looking for is the presence of "sse" in the "flags" line.
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: castor on April 07, 2007, 05:38:22 am
Nice :yes:
One suggestion, would you mind posting your full compiler flags too (somebody will be asking for them anyways :) ).
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: draeath on April 07, 2007, 08:09:26 am
Code: [Select]
-O3 -mtune i686 -msse -mfpmath=sse -pipe -fomit-frame-pointer
Basically I enabled better optimization, set the compiler to use SSE for floating point math instead of the old pentium I/II style.

Afterwards I used "strip -s fs2_open_r" to remove any unused libraries that got statically compiled in (16mb -> 3mb)


... I'm a former gentoo user :P (kubuntu now)
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 08, 2007, 07:28:49 am
Code: [Select]
-O3 -mtune i686 -msse -mfpmath=sse -pipe -fomit-frame-pointer
Basically I enabled better optimization, set the compiler to use SSE for floating point math instead of the old pentium I/II style.

Afterwards I used "strip -s fs2_open_r" to remove any unused libraries that got statically compiled in (16mb -> 3mb)


... I'm a former gentoo user :P (kubuntu now)

Hm link doesn't work and I can't compile it with "-mtune i686" CFLAG
Cause you are using Kubuntu: Do you have tried it with Feisty? I've massiv slowdowns when using the CVS (and I can use the same binary with Edgy without problems)
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: draeath on April 08, 2007, 09:56:18 am
Links corrected and verified! I accedently put the wrong domain name...
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: draeath on April 08, 2007, 10:01:31 am
Hm link doesn't work and I can't compile it with "-mtune i686" CFLAG
Cause you are using Kubuntu: Do you have tried it with Feisty? I've massiv slowdowns when using the CVS (and I can use the same binary with Edgy without problems)

What kind of CPU do you have? I can tailor a build more to your chip, see if that helps...
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 08, 2007, 10:15:29 am
Hm link doesn't work and I can't compile it with "-mtune i686" CFLAG
Cause you are using Kubuntu: Do you have tried it with Feisty? I've massiv slowdowns when using the CVS (and I can use the same binary with Edgy without problems)

What kind of CPU do you have? I can tailor a build more to your chip, see if that helps...

I've got AMD Athlon 64 using Kubuntu 32bit
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: draeath on April 08, 2007, 10:25:44 am
OK, try my binary and I'll work on building one for that chip
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: draeath on April 08, 2007, 10:32:42 am
Hmm there are different kinds of Athlon 64.

Can you run this in a terminal:
cat /proc/cpuinfo

If you have more than one listing, just pick one. I need the information from the sections: "Model Name" and "Stepping"
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 08, 2007, 10:35:17 am
Hmm there are different kinds of Athlon 64.

Can you run this in a terminal:
cat /proc/cpuinfo

If you have more than one listing, just pick one. I need the information from the sections: "Model Name" and "Stepping"

Here it is  ;)
Code: [Select]
model name      : AMD Athlon(tm) 64 Processor 3000+
stepping        : 0
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: draeath on April 08, 2007, 10:50:33 am
Hmm, still not narrow enough.


Grab me the 'flags' section, it will probably wrap to a second line

That should be all I need (give me an hour to build, I'm at work)
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 08, 2007, 10:58:49 am
well I give u all ;)

Code: [Select]
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 12
model name      : AMD Athlon(tm) 64 Processor 3000+
stepping        : 0
cpu MHz         : 2000.224
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow up lahf_lm ts fid vid ttp
bogomips        : 4004.11
clflush size    : 64
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: draeath on April 08, 2007, 11:07:30 am
building with CFLAGS "-march=athlon64 -mfpmath=sse -pipe -fomit-frame-pointer -mmmx -msse -msse2 -m3dnow -m32"

I'll post a link to a binary when finished
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: draeath on April 08, 2007, 11:20:01 am
Binary for athlon64 chips ONLY available here: (note I cannot test, i have an intel chip)

http://keleus.freeshell.org/fs2_open_3_6_9_athlon64.tar.bz2 (http://keleus.freeshell.org/fs2_open_3_6_9_athlon64.tar.bz2)
http://keleus.freeshell.org/fs2_open_3_6_9_athlon64.tar.bz2.MD5 (http://keleus.freeshell.org/fs2_open_3_6_9_athlon64.tar.bz2.MD5)
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 08, 2007, 11:27:37 am
Note that using -march=althlon64 is supposed to automatically imply that MMX/SSE/SSE2/3DNow/3DNow-enhanced are enabled, so you really don't have to specify them yourself.  -mfpmath=sse is also the default, and doesn't need to be specified, when building for athlon64.  And technically you are supposed to use -m64 to get a fully tuned 64-bit binary on athlon64, but that's largely impossible to do if you don't have the 64-bit stuff to link against.
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 08, 2007, 11:31:47 am
First of all:
Thank you very much for your help!
But I still got these strange slowdowns...its like playing the game in slow-motion or so...seems to be some kind of feisty-problem then, I hope it wont appear in the final  :blah:
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: draeath on April 08, 2007, 11:35:16 am
Note that using -march=althlon64 is supposed to automatically imply that MMX/SSE/SSE2/3DNow/3DNow-enhanced are enabled, so you really don't have to specify them yourself.  -mfpmath=sse is also the default, and doesn't need to be specified, when building for athlon64.  And technically you are supposed to use -m64 to get a fully tuned 64-bit binary on athlon64, but that's largely impossible to do if you don't have the 64-bit stuff to link against.

I didn't know about the implied mmx/sse settings, but I chose -m32 to build a 32-bit binary (he is running 32-bit)

Thanks, Taylor


First of all:
Thank you very much for your help!
But I still got these strange slowdowns...its like playing the game in slow-motion or so...seems to be some kind of feisty-problem then, I hope it wont appear in the final  :blah:

What kind of sound card do you have? Do other games have this issue?

I had a problem with my USB sound card doing so for all full-screen games... removing the USB sound card and using the built-in RealTek on my motherboard solved the issue.
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 08, 2007, 11:42:10 am
I also use a built-in RealTeK.
I've tried warsow in feisty and it worked without any slowdowns. Have no idea why fs2 works like a charm in edgy but not in feisty...well but feisty is still beta  ;)
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: Snail on April 08, 2007, 11:44:30 am
I have to post here after breaking your chain of posts in this thread. I am very sorry.
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 08, 2007, 11:55:37 am
I chose -m32 to build a 32-bit binary (he is running 32-bit)
Oops!  I skipped over the part where he mentioned that. :D
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: draeath on April 08, 2007, 12:02:06 pm
I also use a built-in RealTeK.
I've tried warsow in feisty and it worked without any slowdowns. Have no idea why fs2 works like a charm in edgy but not in feisty...well but feisty is still beta  ;)

If you've narrowed it down to something in Fiesty file a bug on Launchpad :D
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 08, 2007, 01:34:12 pm
Good idea  :D

btw: when will 3.6.9 Final for Linux be released?  ;)
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 08, 2007, 02:44:46 pm
btw: when will 3.6.9 Final for Linux be released?  ;)
At some point tonight.  I need to do a final test of the installer and then upload, but that's it.
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 08, 2007, 02:48:40 pm
Yeeehaaaa!  :D Thanks for your work!
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 10, 2007, 12:23:05 am
Sorry, but I still haven't had the chance to test it all properly.  I've made quite a few changes to how it works and I don't have time to get a proper setup to test all of the changes as I should.  So I'm just going to upload what I've got, someone can test it, and then let me know.  If it works ok then I'll post the link in all of the proper places.

This is a departure from how I've done it in the past, the 32-bit and 64-bit binaries are in the same installer now.  Hurts for downloaders (23meg file), but it's going to be far easier on me from now on if this works well.  It will only install the files that match your architecture, so it should be just as easy as it used to be.  Two other changes of note:  1) it will install both release and debug builds, but the debug build is optional and can be installed or uninstalled separately, and 2) I have included the xmodmap tweak from the Wiki in the startup scripts, so if you have a ~/.fs2_open/xmodmap in order to use non-US keyboards then the script will make use of it.

Oh, and the only thing that really needs testing is the 32-bit stuff.  That's the only thing that I couldn't test to make sure that it installed all of the proper files.

So, someone grab it and let me know:  http://fs2source.warpcore.org/exes/linux/fs2_open-3.6.9.run


(side-note:  I also updated the OS X build to be current, and also updated the tarball to get rid of some code errors that I didn't notice before)
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: ni1s on April 10, 2007, 03:26:04 am
-O3 -mtune i686 -msse -mfpmath=sse -pipe -fomit-frame-pointer
Why -mtune, and not -march?

Sorry, but I still haven't had the chance to test it all properly.  I've made quite a few changes to how it works and I don't have time to get a proper setup to test all of the changes as I should.  So I'm just going to upload what I've got, someone can test it, and then let me know.  If it works ok then I'll post the link in all of the proper places.

This is a departure from how I've done it in the past, the 32-bit and 64-bit binaries are in the same installer now.  Hurts for downloaders (23meg file), but it's going to be far easier on me from now on if this works well.  It will only install the files that match your architecture, so it should be just as easy as it used to be.  Two other changes of note:  1) it will install both release and debug builds, but the debug build is optional and can be installed or uninstalled separately, and 2) I have included the xmodmap tweak from the Wiki in the startup scripts, so if you have a ~/.fs2_open/xmodmap in order to use non-US keyboards then the script will make use of it.

Oh, and the only thing that really needs testing is the 32-bit stuff.  That's the only thing that I couldn't test to make sure that it installed all of the proper files.

So, someone grab it and let me know:  http://fs2source.warpcore.org/exes/linux/fs2_open-3.6.9.run


(side-note:  I also updated the OS X build to be current, and also updated the tarball to get rid of some code errors that I didn't notice before)
A quick $ chmod +x fs2_open-3.6.9.run && ./fs2_open-3.6.9.run gave me this,
Code: [Select]
Verifying archive integrity... All good.
Uncompressing FreeSpace 2 Open...
/home/ni1s/.setup12001: error while loading shared libraries: libgtk-1.2.so.0: cannot open shared object file: No such file or directory
Which is not surprising, considering I don't have GTK+1 installed. Don't most people have GTK+2 now a days?
I can of course --target foo and take what I need, but that kinda nullifies the point of the installer. So can we up the GTK+ dep. a bit?
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: ni1s on April 10, 2007, 04:14:49 am
The builds appear to work fine, the only problem I have is with the BtRL mod, where the debug build will crash on mission load with:
Code: [Select]
ERROR: "Unrecognized operator.  In sexpression: ( when     ( and        ( key-pressed "Shift-Pad +" )        ( key-pressed "Shift-Pad Enter" )     )   
( send-message        "Green 2"        "High"        "Open Comms Menu"     )    ( change-iff " at mission/missionparse.cpp:5798
I am using the x86 builds.
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 10, 2007, 04:33:52 am
The startscript doesn't work here...
Code: [Select]
Couldn't run FreeSpace 2 Open (fs2_open.bin). Is FSO_DATA_PATH set?
/usr/local/bin/fs2_open: 3: cannot open /home/chaotic/.fs2_open/xmodmap.save
FSO_MODMAP=/home/chaotic/.fs2_open/xmodmap: No such file

when I try it with ./fs2_open in my fs2 directory it works...

PS: does this final still need -jpgtga or is it just like in the cvs?
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: ni1s on April 10, 2007, 08:38:07 am
The startscript doesn't work here...
Code: [Select]
Couldn't run FreeSpace 2 Open (fs2_open.bin). Is FSO_DATA_PATH set?
/usr/local/bin/fs2_open: 3: cannot open /home/chaotic/.fs2_open/xmodmap.save
FSO_MODMAP=/home/chaotic/.fs2_open/xmodmap: No such file

when I try it with ./fs2_open in my fs2 directory it works...
Does $ export FSO_DATA_PATH="/path/to/fs2" && ./fs2_open work?
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 10, 2007, 09:42:25 am
Which is not surprising, considering I don't have GTK+1 installed. Don't most people have GTK+2 now a days?
I can of course --target foo and take what I need, but that kinda nullifies the point of the installer. So can we up the GTK+ dep. a bit?
That's just the dependency of the installer binary.  I really do need to rebuild them with GTK2 support, though I haven't ever tested that and I'm not sure how complete that support is at the moment.

PS: does this final still need -jpgtga or is it just like in the cvs?
Yeah, it still uses/needs -jpgtga.  You can just use -img2dds, which implies -jpgtga, since that option is supported by both older and current builds.
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: draeath on April 10, 2007, 10:10:33 am
-O3 -mtune i686 -msse -mfpmath=sse -pipe -fomit-frame-pointer
Why -mtune, and not -march?

Instead of trying to explain it myself, I'll quote the GCC manuals:
Quote
-mtune=cpu-type
    Tune to cpu-type everything applicable about the generated code, except for the ABI and the set of available instructions.
-march=cpu-type
    Generate instructions for the machine type cpu-type. The choices for cpu-type are the same as for -mtune. Moreover, specifying -march=cpu-type implies -mtune=cpu-type.

Basically -mtune optimizes code for a specific chip, where -march builds for it. (mtune remains compatible, march does not)
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 10, 2007, 10:43:46 am
Quote
Does $ export FSO_DATA_PATH="/path/to/fs2" && ./fs2_open work?

It works only for one session...when I restart my Computer, problem is back

Quote
Yeah, it still uses/needs -jpgtga.  You can just use -img2dds, which implies -jpgtga, since that option is supported by both older and current builds.

OK, thanks  ;)
Does fs2_open save all my settings? So one time, I've to give it all options I like to use and never again? For the cvs, I used a startscript like it is discriped in the wiki:

Quote
#!/bin/bash
cd /path/to/your/freespace/
./fs2_open_r spec -glow -mipmap -missile_lighting -dualscanlines -targetinfo -rearm_timer -ballistic_gauge -3dwarp -warp_flash -snd_preload -env -alpha_env -mod mediavps

I dont need such a script any more I think?
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 10, 2007, 11:49:35 am
It doesn't save your options, but there is no real reason to put them in a script, just use the cmdline_fso.cfg files instead.  For instance, I have generic options in ~/.fs2_open/data/cmdline_fso.cfg, things that aren't mod specific.  For things that may be mod specific, or that use separate directories anyway, I set those options in the games data/cmdline_fso.cfg file.  For stuff that's really specific, and that I may not want on all of the time, I'll specify either in a startup script or just on the command line.

When the game loads it parses the game's data/cmdline_fso.cfg first, then ~/.fs2_open/data/cmdline_fso.cfg, then the command line itself.  If you have different settings for the same option (such as -ambient_factor) specified in multiple places, it will use the setting from the last one read.  That will help you out when you tend to use most of the same options all of the time (like -spec, -glow, -img2dds, -3dwarp, -2d_poof, etc.) since you only have to specify them the once and it will always be able to use them.
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 10, 2007, 12:23:12 pm
Thanks for your help taylor!!! Really great community here  :yes:

Now only that "FSO_DATA_PATH-Bug" needs to be fixed...or is it only my problem?

Edit: hmm well, I put all the Options I want into ~/.fs2_open/data/cmdline_fso.cfg except for "-mod mediavps"

Now, when I wanna play Inferno: Alliance, I type "fs2_open -mod INFA"  -> Everything works fine

Now I try DerelictSCP with "fs2_open -mod DerelictSCP" -> mediavps aren't loaded...but in Derelict's mod.ini I got "secondrylist = mediavps;" -> It works when I type "fs2_open -mod mediavps,DerelictSCP" but where is the need for a mod.ini then?

When I put "-mod mediavps" into cmdline_fso.cfg I have no planets in the space-background
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 10, 2007, 01:38:01 pm
Yeah, I'm going to look into that FSO_DATA_PATH issue when I get time later tonight.

mod.ini files aren't used by the game though, only by the Windows launcher.  That's one of the reasons why I hate mod.ini files, they are generally useless because they have no ties to the game itself.  Hence why I'm working on a totally new system of ini files which is tied directly to the game and a newer/better launcher.  :)

For Derelict though, use -mod DerelictSCP,mediavps, since you want Derelict primary in the mod list.  Although the -mod option is stackable (individual -mod commands are added together on load) there is a load order issue when you put them in the cmdline_fso.cfg files.  I just relalized that today and have coded up a fix for it.  It's not a big deal, it just gets the priority wrong.
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 10, 2007, 01:53:11 pm
OK, thanks again  ;)
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 10, 2007, 10:49:12 pm
I've got a 64-bit version of the GTK2 installer up and running (for the first time without a constant segfault).  I need to build the 32-bit version and then I'll put up a new installer for you guys to test.  I also fixed the menu location issue, so it will go into the place that current/newer versions of GNOME use (and what freedesktop.org specifies).

I'm pretty sure that I got the FSO_DATA_PATH thing dealt with as well.  Like friggin newbie I left off a couple of quote marks in the script.  I feel like a moron. :rolleyes:


EDIT:  Installer at previous link has been updated.  Like before, the 32-bit version is completely untested.  Let me know if there are still any issues remaining.
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 11, 2007, 03:38:35 am
I tried the 32bit-Version but still:

Code: [Select]
Couldn't run FreeSpace 2 Open (fs2_open.bin). Is FSO_DATA_PATH set?
/usr/local/bin/fs2_open: 1: cannot open /home/chaotic/.fs2_open/xmodmap.save: No such file
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 11, 2007, 09:04:36 am
Damn.  Uh, does FSO_DATA_PATH/fs2_open.bin exist, and is it set as executable?  What is the /path/to/fs2 (wondering if it's failing to setup correctly for some reason)?
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 11, 2007, 12:43:35 pm
The Path is "/media/big/fs2/", the fs2_open.bin exist and is executable
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 11, 2007, 06:49:13 pm
At the top of the script change "#!/bin/sh" to have a -x on it, like "#!/bin/sh -x".  Run it from a terminal like this "fs2_open &> /tmp/test.output", and then post the contents of /tmp/test.output here.  Maybe that will give me a better clue as to what's going on.
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 12, 2007, 04:38:40 am
Here it is:

Code: [Select]
+ [  =  ]
+ FindPath /usr/local/bin/fs2_open
+ echo /usr/local/bin/fs2_open
+ grep /
+ fullpath=/usr/local/bin/fs2_open
+ [ /usr/local/bin/fs2_open =  ]
+ [ /usr/local/bin/fs2_open =  ]
+ [ -L /usr/local/bin/fs2_open ]
+ ls -l /usr/local/bin/fs2_open
+ awk {print $11}
+ fullpath=
+ dirname
+ FSO_DATA_PATH=.
+ [  =  ]
+ FSO_LIB_PATH=./lib
+ LD_LIBRARY_PATH=./lib:
+ export LD_LIBRARY_PATH
+ export FSO_DATA_PATH
+ TMP_MODMAP=/home/chaotic/.fs2_open/xmodmap.save
+ FSO_MODMAP=/home/chaotic/.fs2_open/xmodmap
+ [ -f /home/chaotic/.fs2_open/xmodmap ]
+ [ -f /home/chaotic/.fs2_open/xmodmap ]
+ trap xmodmap - < "/home/chaotic/.fs2_open/xmodmap.save" && rm "/home/chaotic/.fs2_open/xmodmap.save" 0 2 3 4 9 11 15
+ [ -x ./fs2_open.bin ]
+ echo Couldn't run FreeSpace 2 Open (fs2_open.bin). Is FSO_DATA_PATH set?
Couldn't run FreeSpace 2 Open (fs2_open.bin). Is FSO_DATA_PATH set?
+ exit 1
/usr/local/bin/fs2_open: 1: cannot open /home/chaotic/.fs2_open/xmodmap.save: No such file
+ xmodmap -
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 12, 2007, 11:19:05 am
What does the output of "ls -l /usr/local/bin/fs2_open" show?

Mine is like this:
lrwxrwxrwx 1 taylor taylor 37 Apr 11 00:11 /usr/local/bin/fs2_open -> /usr/local/games/fs2_open/fs2_open

That seems to be the problem, it's not getting the proper filename like it should.   /usr/local/bin/fs2_open appears to the script as a symlink, but it can't figure out what the symlink points to.
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 12, 2007, 01:01:15 pm
"ls -l /usr/local/bin/fs2_open" says:
Code: [Select]
lrwxrwxrwx 1 root root 23 2007-04-11 10:29 /usr/local/bin/fs2_open -> /media/big/fs2/fs2_open
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 12, 2007, 06:12:47 pm
Ahh, ok, that makes sense with something that someone else said about the BtRL release too.  Your date display is different, leading to a locale issue that the awk command doesn't take into account.  Modifying the command to always use the same date format should fix it though.

I've attached a modified script, so grab it and give it a try.  If it works let me know and I'll go ahead and update the installer with the changes and post the link everywhere. :)

[attachment deleted by admin]
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 13, 2007, 04:42:13 am
I'm sorry but...
Code: [Select]
./fs2_open
Couldn't run FreeSpace 2 Open (fs2_open.bin). Is FSO_DATA_PATH set?
"ls -l fs2_open" says
Code: [Select]
-rwxr-xr-x 1 chaotic chaotic 1787 2007-04-13 11:33 fs2_open
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 13, 2007, 07:59:58 am
Did you replace your current fs2_open script in the game directory?  And the fix in question doesn't apply when you run the script from within the game directory itself, only when it's a generic call (ie, not "./fs2_open" but "fs2_open").
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 13, 2007, 12:17:33 pm
Now I replaced the script in the game directory and in /usr/local/bin with the new one but same error  :(
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 13, 2007, 01:56:29 pm
Hehe, the one is /usr/local/bin is supposed to just be a symlink to the on the in game directory.  Assuming that it is in fact a symlink then all you should have to do is put the script in the game directory with the updated one.

See, it's this part that shows the problem:
Code: [Select]
+ [ -L /usr/local/bin/fs2_open ]
+ ls -l /usr/local/bin/fs2_open
+ awk {print $11}
+ fullpath=
+ dirname
It tests positive for a symlink, then tries to local the real file location.  It does this with the "ls -l" line, since that will show the original file, plus what it's symlinked to.  But in your case the "awk {print $11}" line is doing the wrong thing, since for you it should use "$10" instead.  The change to the script that I made should make "$10" work for everyone, including you, since the "ls" call was changed to use an exact date format ("ls -l --time-style=iso") rather than what your locale uses.

But, that part of the script doesn't execute if the file your are calling isn't a symlink. :)
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 13, 2007, 02:12:12 pm
Hm but what does that mean for me?  :D Did I make anything wrong?
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 13, 2007, 03:03:14 pm
Not sure exactly.  But based on the debug output you posted earlier, the changes I made should have worked perfectly.  Try doing the -x thing again and see what it shows.  It could be something that I simply missed, or something is a little funky with your install.  Either is just as valid at the moment.  :D
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 13, 2007, 03:14:18 pm
Code: [Select]
+ [  =  ]
+ FindPath /usr/local/bin/fs2_open
+ echo /usr/local/bin/fs2_open
+ grep /
+ fullpath=/usr/local/bin/fs2_open
+ [ /usr/local/bin/fs2_open =  ]
+ [ /usr/local/bin/fs2_open =  ]
+ [ -L /usr/local/bin/fs2_open ]
+ dirname /usr/local/bin/fs2_open
+ FSO_DATA_PATH=/usr/local/bin
+ [  =  ]
+ FSO_LIB_PATH=/usr/local/bin/lib
+ LD_LIBRARY_PATH=/usr/local/bin/lib:
+ export LD_LIBRARY_PATH
+ export FSO_DATA_PATH
+ TMP_MODMAP=/home/chaotic/.fs2_open/xmodmap.save
+ FSO_MODMAP=/home/chaotic/.fs2_open/xmodmap
+ [ -f /home/chaotic/.fs2_open/xmodmap ]
+ [ -f /home/chaotic/.fs2_open/xmodmap ]
+ trap [ -f "/home/chaotic/.fs2_open/xmodmap" ] && xmodmap - < "/home/chaotic/.fs2_open/xmodmap.save" && rm "/home/chaotic/.fs2_open/xmodmap.save" 0 2 3 4 9 11 15
+ [ -x /usr/local/bin/fs2_open.bin ]
+ echo Couldn't run FreeSpace 2 Open (fs2_open.bin). Is FSO_DATA_PATH set?
Couldn't run FreeSpace 2 Open (fs2_open.bin). Is FSO_DATA_PATH set?
+ exit 1
+ [ -f /home/chaotic/.fs2_open/xmodmap ]

Is it just me or are these code-boxes hard to read?  :D
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 13, 2007, 03:56:53 pm
Yep, it's not a symlink.  The script is in /usr/local/bin, and it's not a symlink.  Since that is what the script is using as the base location for the game directory, it's trying to run the game from inside of /usr/local/bin rather then the proper directory, /media/big/fs2.  Make sure that you have the upgraded script in /media/big/fs2, then change directories to /usr/local/bin, remove the fs2_open script from there, and recreate the symlink with "ln -s /media/bin/fs2/fs2_open".  With any luck that will work. :)


Is it just me or are these code-boxes hard to read?  :D
Content wise, or just in general?  In general they are pretty difficult to read, for me at least, since the content doesn't stand out all that clearly due to coloring.  If it's the same for you, then you aren't alone. :)
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: chaotic on April 13, 2007, 04:46:50 pm
Doing "ln -s /media/bin/fs2/fs2_open" in /usr/local/bin did not work (dunno why) so I just reinstalled everything and put the fixed binary in my fs2-directory.....

AND IT WORKS! :D :D :D :D

Thank you very much for your help and your work taylor  :)

Quote
Content wise, or just in general?

In general ;)

Quote
In general they are pretty difficult to read, for me at least, since the content doesn't stand out all that clearly due to coloring.  If it's the same for you, then you aren't alone.

Good to hear that  :D

When its officially released I will rework my german linux guide and post it here, maybe it will help some german linux-users  ;)

Just one last question came up about the "-mod"-option:

How important is the order in which I load my mods?
I know I should load the campain I want to play firstly...for example when I want to play Blaise Russel's "Shivans" -> needs Fs1 Port and mediavps
So I do "-mod shivans,Fs1_Port_3,mediavps" or "-mod shivans,mediavps,Fs1_Port_3"? Or doesn't matter?
Title: Re: linux 3.6.9 CVS 4/6/2007
Post by: taylor on April 13, 2007, 05:24:07 pm
So I do "-mod shivans,Fs1_Port_3,mediavps" or "-mod shivans,mediavps,Fs1_Port_3"? Or doesn't matter?
It really just depends on the mod really.  You want to play "shivans", but if it depends on "Fs1_Port_3" then that should come next.  Generally you would always put the MediaVPs last if they are actually required, since that should be considered at a base level only above the retail VPs themselves.  Getting the first one right is the most important, and I suspect that much of the time the remaining mod order isn't going to matter all that much.


Good to hear that it's all finally working though. :D  I'll upload the final installer later tonight and update the links in the relevant threads.