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

0 Members and 1 Guest are viewing this topic.

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
Originally posted by Mr_Maniac
ASSERTION FAILED: "cfbp->data != NULL" at cfile/cfile.cpp:1182

Just added the fix for that to CVS.  Really should have caught that one sooner but at least it's fixed now.  That was only a problem for ANIs which were not in a VP, but you may have figured that out already.

And the other fixes (for configure.ac, pstypes.h and ship.cpp) are in CVS now as well.

 
FS2_Open Linux Discussion
Quote
hud/hudobserver.cpp:55: error: `net_player' has not been declared
hud/hudobserver.cpp:56: error: ISO C++ forbids declaration of `pl' with no type
hud/hudobserver.cpp: In function `void hud_obs_render_players_all()':
hud/hudobserver.cpp:66: error: `Net_players' undeclared (first use this function)
hud/hudobserver.cpp:66: error: (Each undeclared identifier is reported only once for each function it appears in.)
hud/hudobserver.cpp:66: error: `MULTI_CONNECTED' undeclared (first use this function)
hud/hudobserver.cpp:66: error: `MULTI_STANDALONE' undeclared (first use this function)
hud/hudobserver.cpp:66: error: `MULTI_PERM_OBSERVER' undeclared (first use this function)

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Hehehe, forgot to disable building of the networking files in Makefile.am.  It's not the first time I've done that. :D

Fix going in now...

 
FS2_Open Linux Discussion
And again two "issues":
First two messages fs2_open gives me:
Quote
WARNING: "Null vector in vector normalize. Trace out of vecmat.cpp and find offending code." at math/vecmat.cpp:747
WARNING: "Ship 'Discovery' has only 2 points on dock path.  Docking will look strange.  Contact Adam." at ship/aicode.cpp:1147


And now I'll attach a picture to describe my second problem.
This Problem occurs in every mission... This "polygon" you'll see appears sometimes...

http://home.arcor.de/mr_maniac/Bilder/screen00.jpg

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
First message is a known problem, but not fatal.  Warning() messages don't get shown in release builds on Windows which is probably why there is no hurry to fix the problem model(s).  It still gives those warnings on Linux release builds but I guess I need to fix that in order to match Windows behavior.

Second message I know I've seen but I think it's specific to a model and so should only happen in missions with that model.  What mission are you playing now that gives you that, or is it more than one?

Second problem:  Hmmm, if it's in all nebula missions then try removing -2d_poof and see if it still does it.  I got -2d_poof working in OGL last week but there may be a bug or two that I didn't notice.


Still haven't gotten those networking changes in CVS yet, testing in Windows first, but I'll get them in shortly.

EDIT: Ok, all networking changes should be in.  Sorta big though (approx. 80K; 2,900 lines) so be ready.
« Last Edit: March 02, 2005, 03:25:20 pm by 1252 »

 
FS2_Open Linux Discussion
@taylor:
You misunderstood!
The second problem is not in all NEBULA missions, it is in ALL missions...
No matter if nebula or non-nebula...

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
Originally posted by Mr_Maniac
You misunderstood!
The second problem is not in all NEBULA missions, it is in ALL missions...
No matter if nebula or non-nebula...

No, I understood, just wanted to make sure.  Would have been much easier if it was just nebula missions.  That sentence doesn't read very well, should have clarified what I meant.  :)

Are there any similar conditions when it shows up?  You're pretty close to that Fenris/Levy in the screenshot so is it a proximity thing to other ships or just completely random?  Does it still occur if you don't build with any special CXXFLAGS (-fomit-frame-pointer specifically has caused issues in the past)?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
Originally posted by Mr_Maniac
And now I'll attach a picture to describe my second problem.
This Problem occurs in every mission... This "polygon" you'll see appears sometimes...[/URL]

Ok, now I'm seeing stray polys as well.  Nothing as bad as your pic but some slivers are seen during a mission.  I haven't noticed this before so it may be rather new (last week or two).

 
FS2_Open Linux Discussion
Hello again!
Since a few days I get following error (compiling):
Quote
playerman/playercontrol.cpp: In function `void read_player_controls(object*, float)':
playerman/playercontrol.cpp:1333: Fehler: `min' undeclared (first use this function)
playerman/playercontrol.cpp:1333: Fehler: (Each undeclared identifier is reported only once for each function it appears in.)
playerman/playercontrol.cpp: In function `int player_inspect_cargo(float, char*)':
playerman/playercontrol.cpp:1835: Fehler: `max' undeclared (first use this function)
playerman/playercontrol.cpp: In function `int player_inspect_cap_subsys_cargo(float, char*)':
playerman/playercontrol.cpp:1940: Fehler: `max' undeclared (first use this function)
playerman/playercontrol.cpp: In function `float player_farthest_weapon_range()':
playerman/playercontrol.cpp:1988: Fehler: `max' undeclared (first use this function)

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Yep I'm getting that too.  I've got a fix going in later today to fix it game-wide.  A quick fix to to move the #include "camera/camera.h" line above all other includes (except system ones).  You'll need to make the change in code/freespace2/freespace.cpp too.  The C++ headers that file (camera.h) needs undefine min/max.

 
FS2_Open Linux Discussion
Well... This quick fix didn't help...
Same error :(
Hmm... I guess I'll wait till it's fixed in CVS ;)

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Big update just made to fix all of the (known) recent build breaks.  Should have that rendering problem fixed as well plus the normal, small bug fixes.  If there are any new problems let me know.

 
FS2_Open Linux Discussion
Okay.... Linux fs2_open works fine now!
Is there anything I can do (Informations) to help you getting Throttle- and rudder-axis to work?
It's not urgent! I can wait some time (maybe even months ;) ) but somehow I miss them...

Oh... Two things I have to say:
1. Compiling is broken again (Something with turrets... At the end of the compiling process.)
2. From mission to mission fs2_open(linux) gets slower... So after a few missions I have only 10 FPS (starting with 110 FPS in the first mission).

I love playing fs2_open under linux! If every game would run under linux, I would completely ban Windows from my HDD...

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
No progress on the throttle thing yet.  Been pretty busy on other bugs, quite a few of which have been rather serious.  I'll get to it as soon as I can though.

As for 1, welcome to my life. :shaking:  Kinda how it goes, and why it took so long to get the Linux code merged in the first place.  It's only been in CVS for just over a month and builds have already broken at least a half dozen times.  There are a few things broken right now but I've got fixes for them all, just not in CVS yet.  The turret thing we're waiting on new code for.  It's not merging very well so things are held up.

2... ehh, that's not good.  About how many missions in a row does it become really noticable?  I usually play one or two at the time for testing so if there is a particular number to watch out for it would help me out.  I'm thinking that some memory related issues have snuck in recently so if you notice a big drain let me know.  I'll going to do more Valgrind testing this week and hopefully flush out any hiding problems.

My Linux game directory is over 35gig right now so I've got plenty of Linux games to play.  No Windows partition for me. :D

 

Offline Alpha0

  • 24
FS2_Open Linux Discussion
Regarding Mr_Maniac's point 2, there seems to be some issue with the timer code for GCC in timer.cpp. I am building FS2 using Mingw (i.e. GCC) and I have noticed that when the executable runs, it is initially very fast. At some point though, after two or three missions, it becomes slow, really slow. After some investigation and tweaking with the timer code, I found out that, in timer.cpp, timer_get_fixed_seconds () has a slight error in the assembly code for GCC.

If I change the line that reads (near line 230)
Code: [Select]

"shld  $16,%%edx,%%eax;" // Keep 32+11 bits

to
Code: [Select]

"shld  $16,%%eax,%%edx;" // Keep 32+11 bits

everything works fine. No speedups, no slowdowns. Not sure if this can fix your problem #2 Mr_Maniac, but it may be worth a try, as it is a very simple change.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
Originally posted by Alpha0
I found out that, in timer.cpp, timer_get_fixed_seconds () has a slight error in the assembly code for GCC.

Must be why I've never noticed it.  The 64-bit builds don't make use of any ASM code.  I'll make that change when I next get the chance.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
FS2_Open Linux Discussion
Okay, I'm starting to feel like having another go at getting FS2_Open working under Linux.

However...I'd like to be able to actually code/debug on Linux. AFAIK, there are no tools that come even close to competing with MSVC's Edit and Continue, but I really have no clue what's out there. ;)

So, any recommendations (beyond GCC and Emacs/vi :p)
-C

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Quote
Originally posted by WMCoolmon
So, any recommendations (beyond GCC and Emacs/vi :p)

I use Anjuta mostly (grab the 1.2.3 branch out of gnome cvs) and some stuff is really nice (like the autocompletion and hit CTRL-D on a variable or function to jump to it's cpp file location or SHIFT-CTRL-D to get to the header declaration) but it's not quite MSVC.  Debuging in Anjuta is pretty slow though.  I typically just use gdb from a terminal but ddd is a graphical interface to gdb and though I haven't used it in a couple of years it had most everything a debugging session needs (ie. everything that gdb has but with a point-and-click UI).

I don't really use MSVC much at all though so I can't give a good recommendation on a true Linux replacement.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
FS2_Open Linux Discussion
Ick, gnome. ;) I took a look and it looks almost exactly like what I'm looking for, I just have to get it working...or kdevelop. Mmm, Qt... ;)

Edit: :sigh:
Quote
error: Failed dependencies:
        gnome-vfs2 >= 2.0.2 is needed by anjuta-1.2.2-1
        libbonoboui >= 2.0.1 is needed by anjuta-1.2.2-1
        libbonoboui-2.so.0 is needed by anjuta-1.2.2-1
        libglade2 >= 2.0.0 is needed by anjuta-1.2.2-1
        libgnome >= 2.0.2 is needed by anjuta-1.2.2-1
        libgnome-2.so.0 is needed by anjuta-1.2.2-1
        libgnomecanvas-2.so.0 is needed by anjuta-1.2.2-1
        libgnomeprint-2-2.so.0 is needed by anjuta-1.2.2-1
        libgnomeprint22 >= 2.0.1 is needed by anjuta-1.2.2-1
        libgnomeprintui-2-2.so.0 is needed by anjuta-1.2.2-1
        libgnomeprintui22 >= 2.0.1 is needed by anjuta-1.2.2-1
        libgnomeui >= 2.0.2 is needed by anjuta-1.2.2-1
        libgnomeui-2.so.0 is needed by anjuta-1.2.2-1
        liblinc.so.1 is needed by anjuta-1.2.2-1
        libvte.so.4 is needed by anjuta-1.2.2-1
        vte >= 0.7.0 is needed by anjuta-1.2.2-1
« Last Edit: March 20, 2005, 07:06:34 pm by 374 »
-C

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
FS2_Open Linux Discussion
Mostly the standard GNOME libs.  Can't say that I know what liblinc.so.1 is for, must be build specific.  VTE is for the terminal (built in cmdline) but should be installed with gnome-terminal.

I write this next KDE related stuff knowing that it might cause some zealot issues: ;)

I used KDE a while back but never really liked it that much.  It's a bit too Windows for my tastes.  Haven't used any recent version of kdevelop but it would probably be worth a look before you go through the trouble of getting Anjuta installed.  I've also tried Eclipse recently and although it was very nice I absolutely detest the way project files are done.  Totally turned me off to the thing.  There is just a point when different goes a bit too far.  I'll probably give it another look in the future though.