Author Topic: FS2_Open Linux Mini Howto  (Read 28500 times)

0 Members and 1 Guest are viewing this topic.

Offline theswede

  • 22
  • Posts: 4
As a long time FS/FS2 fan and a Linux user, I was very happy to see the FS2 Open project running on Linux systems. Very nice, kudos for the hard work!

I do have a problem though. The Iccus version of FS2 works very well for me, and requires me to calibrate my USB joystick (I use jscal, and it works fine). The Open version, fs2_open-20040704.tar.bz2, accepts the joystick but resets the calibration. No matter what I try, the joystick behaves as if I hadn't calibrated it when I start a mission.

Any idea how I can fix this? Is there a newer FS2 Open that works in Linux that I should use?

Thanks in advance.

 

Offline Inquisitor

Taylor's the man to answer that one.
No signature.

 

Offline theswede

  • 22
  • Posts: 4
So it seems. Taylor told me a new version is in the works, but not ready to release yet, so I'll be holding my breath until it comes out. Or until I faint, whichever comes first. ;)

I'm trying to take notes on what all I've done to make things work, and was thinking of maybe trying to add a Linux page to the Freespace 2 wiki. Of course, that requires actually formatting it as something useful ...

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
  • Posts: 5,095
    • http://www.icculus.org/~taylor
Quote
Originally posted by theswede
The Open version, fs2_open-20040704.tar.bz2, accepts the joystick but resets the calibration. No matter what I try, the joystick behaves as if I hadn't calibrated it when I start a mission.

I'm going over the js code now, I assume it's something in the initialization.  What USB joystick do you have?  Is it the only joystick on your system?

 

Offline theswede

  • 22
  • Posts: 4
I have a USB Saitek Cyborg 3D Gold, the only joystick on the system. The machine is a Dell 8600c laptop with USB2 and a Radeon Mobility 9600 (M10). Everything else works fine, and the joystick works as expected in the icculus.org latest release binary.

The behaviour in FS2_Open is identical to the behaviour in icculus.org fs2 when I haven't calibrated the joystick. The difference is, when I calibrate it using jscal, the icculus.org version starts working properly, but the FS2_Open version still treats the joystick as uncalibrated.

  

Offline theswede

  • 22
  • Posts: 4
Okay, solved the USB joystick problem. The reason it worked was that the binary libSDL that came with the icculus.org binary was compiled without input-events (--disable-input-events), or is a version predating that system. The culprit was the new joystick event system (evdev.ko) which right now can't be calibrated at all.

The solution was to recompile my SDL library with --disable-input-events. I could also have removed the evdev module, but I need that for my ALPS touchpad, so that wasn't really an option. Now it works just dandy!

According to the SDL people, the SDL layer shouls autocalibrate the joystick. They do not, which is what causes the problem. Disabling input events makes SDL use joydev and thus jscal works again.

 

Offline castor

  • 29
  • Posts: 749
    • http://www.ffighters.co.uk./home/
In the mean time, a couple of questions regarding the linux port:
 
- is the network code in, i.e. does it play with FS2NetD?
- controls.. how many mouse buttons can I configure?

Cheers!

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
  • Posts: 5,095
    • http://www.icculus.org/~taylor
Quote
Originally posted by castor
- is the network code in, i.e. does it play with FS2NetD?
- controls.. how many mouse buttons can I configure?

a) no clue, the code is there (but slightly out of date) though I never actually tested it
b) 3 for now but I am working to fix that, it only ever supported three so that's not Linux specific

For those that are curious I'm still trying to find enough time to get the Linux tree stablized for 3.6.5.  My tree is so different at this point that all of the changes have to be copied over by hand to avoid messing something else up.  I'm still on track for the middle of next week for an official 3.6.5 Linux version though.

If you are wondering what's taking so long, a diff gives me a 1.9meg 64,925 line patch. :)

 

Offline castor

  • 29
  • Posts: 749
    • http://www.ffighters.co.uk./home/
Ok, thanks taylor.

Got the mouse somewhat working now (and found out xmodmap really isn't one of my favourite tools :eek: )

As for multi, X seems to freeze at the "validating tables" step.
Anyone else tried this, got it working?

Btw, I was positively surprised by the gfx performance with the dri driver (radeon). Also the sfx appear to cause less trouble (jerkiness) than on the win version.

So far so good, need to test some more..

Cheers!

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
  • Posts: 5,095
    • http://www.icculus.org/~taylor
Just to give everyone an update since I've been so quiet.  The Linux code is going in CVS now.  I started last weekend and will be finished in the next few days.  When done I'll put start puttings builds (only source tarball at first) in the Recent Builds forum so be sure and check there this weekend.

What you will need to build from the source:
 - good OpenGL libs, up-to-date MesaGL or NVIDIA drivers
 - SDL, at least 1.2.6
 - OGG Vorbis devel packages (can be compiled statically)
 - libjpeg-6b devel packages (can be compiled statically)

Working x86 and x86_64 Linux support will be done initally and Linux/PPC and OSX support should be ready the first half of next week.  Online play has not been tested so I can't say whether or not FS2netD will work but it should.  If not it will be fixed pretty quickly.

I'm not going to release binary packages yet since I want to few good reports from people first about the code.  I'll maintain x86 and x86_64 packages but as I use x86_64 it will get updated faster.

Notes:
 - text-to-speech isn't 100% last time I tried it but will require speechd to work
 - no environment mapping but specular maps work
 - multisample support is not yet complete but may be done by this weekend or next week
 - still no movies or streaming audio (music, breifing voices) but there will finally be time to work on that
 - ALT-ENTER will switch between fullscreen and windowed modes (Linux only) but the CTRL-Z and CTRL-G combos have been removed since it's not uncommon to use those during game play.

All other SCP features should function as expected.

 

Offline Christoph_Berg

  • 25
  • Posts: 49
    • http://www.kpm-sport.de/
Sounds really nice, taylor.

I really hope that finishing streaming audio won't take to much time, because this is the only thing, I use my windows version (and perhaps Fred). ;7

Would it be possible to make Fred running natively under Linux?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
  • Posts: 5,095
    • http://www.icculus.org/~taylor
Quote
Originally posted by Christoph_Berg
Would it be possible to make Fred running natively under Linux?

There is talk of converting the current FRED2 to wxWidgets and dumping MFC.  MFC is the only thing keeping us from a port.  I'm not sure if it's actually being worked on or not.  I have said before that I want to rewrite it from scratch but it's going to be a long way off before that happens.

I've got a few things that need work now but streaming audio is near the top of the list.  I'll work on it some more this next week and see where I get.  I did have it almost playing before but about half of the audiostr_* functions are still empty.  As long as I can get it to play in all cases though the rest will be pretty easy to do.  The problem before was that it would play sometimes, not play sometimes and sometimes just play a little and then never work again.  I'll strip the code down some more and clean it up then figure out the problem.

 

Offline Mr_Maniac

  • 28
  • Posts: 349
    • http://mr-maniac.de.vu
Oh yes... FRED needs some fixes ;)
I'm glad that the SCP gets ported to Linux!
I'm a Linux-user, too (Well.. I use Windoze and Linux (Gentoo) ).
And some games are running better on Linux than on Windows (the UT ports for Example... They run much smoother on Linux than on Windoze).

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
  • Posts: 5,095
    • http://www.icculus.org/~taylor

 

Offline Mr_Maniac

  • 28
  • Posts: 349
    • http://mr-maniac.de.vu
Hello!
Here's a little report with little "problems" that I have.
First of all:
I use CVS to get the latest version of the source.
Last synced: 02-28-2005

I only have very small problems.
First Problem: My Joystick works great under Linux.
In FS2_Open I can assign my Rudder- and Throttle-Axis to the right funktions. But in-game they're not used...

Second: I don't know if it's in CVS already, but the new "F3 menu in mainhall" doesn't work under Linux.
Some keys just don't work... The default Secondary-Weapons-key "-" and the default brake to zero key "#" just don't work!
Oh... I have the german keyboard layout... So don't wonder...

And now I have a little question:
Is there any solution in sight to make animated glowmaps work in FS2_Open_Linux? (Right now it crashes when a ship uses them)

And please forgive my bad english...

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
  • Posts: 5,095
    • http://www.icculus.org/~taylor
Quote
Originally posted by Mr_Maniac
I only have very small problems.
First Problem: My Joystick works great under Linux.
In FS2_Open I can assign my Rudder- and Throttle-Axis to the right funktions. But in-game they're not used...

Hmm, if it's working fine in controlconfig but not in-game then I'm not sure what the issue is.  I'll have a look and see if I can find anything.

Quote
Second: I don't know if it's in CVS already, but the new "F3 menu in mainhall" doesn't work under Linux.

That feature isn't in CVS yet so only that particular Windows build has it for now.

Quote
Some keys just don't work... The default Secondary-Weapons-key "-" and the default brake to zero key "#" just don't work!
Oh... I have the german keyboard layout... So don't wonder...

I must have missed something in the code for the German keyboard layout then.  It is supposed to work so I'll have to figure out what didn't get added to CVS.

Quote
And now I have a little question:
Is there any solution in sight to make animated glowmaps work in FS2_Open_Linux? (Right now it crashes when a ship uses them)

Actually they should work fine.  What vid card and drivers do you have?  What cmdline options are you using (and the contents of ~/.fs2_open/data/cmdline.cfg if it exists)?  Run it in gdb and post the backtrace.

 

Offline Mr_Maniac

  • 28
  • Posts: 349
    • http://mr-maniac.de.vu
My System:
CPU: AMD Athlon Thunderbird 1.333 MHz
Motherboard: ASUS A7V-133
RAM: 512 MB Infineon (133 MHz non-DDR cl-2)
Graphic: GeForce 3 64 MB DDR-RAM (Creative)
Sound: Creative Sound Blaster Live! 5.1 Player
Joystick: Saitek Cyborg 3D Rumble Stick ;)

OS: Gentoo Linux (Kernel: 2.6.10)
Vid driver: nVidia Linux Display Driver 1.0-6629

C(PP/XX)FLAGS: -march=athlon-tbird -pipe -O2 -fomit-frame-pointer

cmdline options: "-spec -glow -jpgtga -d3dmipmap -nomotiondebris -2d_poof -rlm -dualscanlines -ship_choice_3d -targetinfo -3dwarp -smart_shields -snd_preload -fps -ambient_factor 70 -spec_exp 11 -spec_point 0.6 -spec_static 0.8 -spec_tube 0.4 -fov 0.39"

cmdline_fso.cfg contents: "-ambient_factor 70 -spec_exp 11 -spec_point 0.6 -spec_static 0.8 -spec_tube 0.4 -fov 0.39 -spec -glow -jpgtga -d3dmipmap -nomotiondebris -2d_poof -rlm -dualscanlines -ship_choice_3d -targetinfo -3dwarp -tbpwarpeffects -smart_shields -snd_preload -env -alpha_env -fps"

I'll add the backtrace later (I'm currently running Windoze)

Thanks for the help! And thanks that I can run FS2_Open under Linux now! :D

EDIT:
I forgot: I've already tried -novbo

And now the "Backtrace"...

When I start fs2_open, the first thing I get is

Quote
(gdb) run
Starting program: /home/maniac/.fs2_open/fs2_open_d
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
warning: shared library handler failed to enable breakpoint
outwnd not initialized yet...  Building file index...
outwnd not initialized yet...  Searching root '/home/maniac/.fs2_open/'
outwnd not initialized yet...  Searching root '/home/maniac/.fs2_open/'
outwnd not initialized yet...  Found 36 roots and 20590 files.
Future debug output directed to: /home/maniac/.fs2_open/data/fs2_open.log

Program received signal SIG32, Real-time event 32.
0xb7e14353 in ?? ()


When I'm continuing and I try to select a animated-glowmapped ship like the Pegasus or any shivan ship I only get:
Quote
(gdb) continue
Continuing.
ASSERTION FAILED: "cfbp->data != NULL" at cfile/cfile.cpp:1182

Program received signal SIGABRT, Aborted.
0xb7bd2101 in ?? ()
(gdb) continue
Continuing.

Program terminated with signal SIGABRT, Aborted.
The program no longer exists


And here are the last few lines from the fs2_open.log:

Quote
Got event GS_EVENT_TECH_MENU (11) in state GS_STATE_MAIN_MENU (11)
Loading model 'fighter01.pof'
IBX: Found a good IBX to read for 'fighter01.pof'.
For "fighter01.pof" I couldn't find Fighter01-01c.ani but I did find Fighter01-01c.dds.
For "fighter01.pof" I couldn't find Fighter01-01c-glow.ani but I did find Fighter01-01c-glow.pcx.
For "fighter01.pof" I couldn't find thruster01-glow.ani or thruster01-glow.pcx.
For "fighter01.pof" I couldn't find thruster01-shine.pcx
For "fighter01.pof" I couldn't find Fighter01-01a.ani but I did find Fighter01-01a.dds.
For "fighter01.pof" I couldn't find Fighter01-01a-glow.ani but I did find Fighter01-01a-glow.pcx.
For "fighter01.pof" I couldn't find Fighter01-01b.ani but I did find Fighter01-01b.dds.
For "fighter01.pof" I couldn't find Fighter01-01b-glow.ani but I did find Fighter01-01b-glow.pcx.
For "fighter01.pof" I couldn't find Fighter01-01a.ani but I did find Fighter01-01a.dds.
For "fighter01.pof" I couldn't find Fighter01-01a-glow.ani but I did find Fighter01-01a-glow.pcx.
Why are you trying to free a NULL pointer?  [modelinterp.cpp(5174)]
glowbank texture num is 279196
glowbank texture not found, setting as the normal one num
glowbank texture num is 198146
glowbank texture not found, setting as the normal one num
glowbank texture num is 171120
glowbank texture not found, setting as the normal one num
glowbank texture num is 1071431
glowbank texture not found, setting as the normal one num
Frame  0 too long!!: frametime = 1.054 (1.054)
Frame  0 too long!!: frametime = 0.351 (0.351)
Loading model 'fighter2t-01.pof'
IBX: Found a good IBX to read for 'fighter2t-01.pof'.
For "fighter2t-01.pof" I couldn't find fighter2t-01A.ani but I did find fighter2t-01A.pcx.
For "fighter2t-01.pof" I couldn't find fighter2t-01A-shine.pcx
For "fighter2t-01.pof" I couldn't find thruster01-glow.ani or thruster01-glow.pcx.
For "fighter2t-01.pof" I couldn't find thruster01-shine.pcx
For "fighter2t-01.pof" I couldn't find fighter2t-01B.ani but I did find fighter2t-01B.pcx.
For "fighter2t-01.pof" I couldn't find fighter2t-01B-glow.ani or fighter2t-01B-glow.pcx.
For "fighter2t-01.pof" I couldn't find fighter2t-01B-shine.pcx
For "fighter2t-01.pof" I couldn't find fighter2t-01C.ani but I did find fighter2t-01C.pcx.
For "fighter2t-01.pof" I couldn't find fighter2t-01C-glow.ani or fighter2t-01C-glow.pcx.
For "fighter2t-01.pof" I couldn't find fighter2t-01C-shine.pcx
opengl_minimize
« Last Edit: February 28, 2005, 02:45:14 pm by 2173 »

 

Offline Mr_Maniac

  • 28
  • Posts: 349
    • http://mr-maniac.de.vu
That's the output of the debug-build...
But the release build doesn't have more output...
The only difference is, that the release build gives me a nice "Segmentation Fault"...

EDIT:

I-AM-STUPID!
I-AM-SOOO-STUPID!
:hopping: :doh: :doh: :doh:

Okay... The Glowmaps are working... Seems that Lightspeeds Shinemaps caused the problem... I searched everywhere but I didn't delete my maps/ folder :doh:

Now I did and it's working fine...
« Last Edit: February 28, 2005, 03:19:14 pm by 2173 »

 

Offline Mr_Maniac

  • 28
  • Posts: 349
    • http://mr-maniac.de.vu
FS2_Open Linux Discussion
Okay... New day, new problem ;)
CVS: 03-01-2005
Includes changes from Bobboau.
Here I have a compile problem:

Quote
./globalincs/pstypes.h:340:1: Warnung: "NO_NETWORKING" redefined
:9:1: Warnung: this is the location of the previous definition
ship/ship.cpp: In function `void ship_render(object*)':
ship/ship.cpp:4608: Warnung: Variable »G3_user_clip« wird nicht verwendet
ship/ship.cpp: In function `void change_ship_type(int, int, int)':
ship/ship.cpp:7270: Fehler: name lookup of `i' changed for new ISO `for' scoping
ship/ship.cpp:7267: Fehler:   using obsolete binding at `i'
ship/ship.cpp: In function `int ship_stop_fire_primary(object*)':
ship/ship.cpp:7622: Fehler: name lookup of `i' changed for new ISO `for' scoping
ship/ship.cpp:7616: Fehler:   using obsolete binding at `i'
ship/ship.cpp:7622: Warnung: statement hat keinen Effekt
ship/ship.cpp: In function `void ship_animation_set_inital_states(ship*)':
ship/ship.cpp:13847: Fehler: name lookup of `i' changed for new ISO `for' scoping
ship/ship.cpp:13844: Fehler:   using obsolete binding at `i'

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
  • Posts: 5,095
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
Originally posted by Mr_Maniac
./globalincs/pstypes.h:340:1: Warnung: "NO_NETWORKING" redefined
:9:1: Warnung: this is the location of the previous definition

Are you making an Inferno build?  I forgot to take that line out of configure.ac, it should only define INF_BUILD.  Also it's supposed to be NO_NETWORK, without the ING, I missed that.  I'll get it fixed before the day is over.

Quote
ship/ship.cpp: In function `void change_ship_type(int, int, int)':
ship/ship.cpp:7270: Fehler: name lookup of `i' changed for new ISO `for' scoping
ship/ship.cpp:7267: Fehler: using obsolete binding at `i'

Yeah Bobboau tends to do that, it's wrong but MSVC lets it go for whatever reason.  I've already got that fixed but haven't made the commit yet.  Try a cvs update in a few hours and all of this should be fixed.