Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: Amon_Re on September 10, 2003, 04:24:57 pm

Title: FS2_Open Linux Mini Howto
Post by: Amon_Re on September 10, 2003, 04:24:57 pm
Incase you would like to get FS2_Open to run in linux (x86 architecture) you might find this intresting:

First grab bKtHeG's source tarball from http://ds.hamburg051.server4free.de...en_linux.tar.gz (http://ds.hamburg051.server4free.de/20030908_fs2_open_linux.tar.gz)  and extract the fs2_open directory.

First do the configure script ./configure --disable-sound -disable-networking

And after that execute make.

Incase you get compiler errors in gropengl.cpp, open that file (code/graphics/gropengl.cpp), locate the line #include and above that line, add the following line:

#define GL_GLEXT_PROTOTYPES

Save the file and execute make again (from within the fs2_open directory)

Make should now finish the compilation where it left off, and create the file fs2 (located in code/), copy this file to your freespace 2 directory.

If it doesn't, and complains about not finding -lGL, don't panic, this means you don't have a symbolic link in /usr/lib towards the correct file.

Create the symlink called libGL.so and make it point to /usr/X11R6/lib/libGL.so

Again start make from within the fs2_open directory.

In that same directory, create a textfile called fs2_open.ini and make sure it contains the following:

[Default]
Fullscreen=0
VideocardFs2open=OpenGL - Primary Display Driver(1024x768)
Videocard=OpenGL - Primary Display Driver(1024x768)
VideoApi=OpenGL

That's all, you should now be able to start fs2 with ./fs2

Extra notes, if you installed FreeSpace 2 using eg iculus's installer and get an error "error parsing strings.tbl" or "error parsing rank.tbl", try copying over your working freespace install from your windows partition, and see if that helps.

Don't have windows installed? No biggy, install the latest wine, and you can use the installer from the FreeSpace CD's.

Incase you got an error while compiling like, eg "brace-enclosed initializer used to initialize x", it is most likely because of a whacked GCC install, check that you have binaries that match each other (don't mix files from eg 2.9.2 with 3.x), and if that doesn't help, try removing & reïnstalling GCC.

With many thanks to bKtHeG for making this available
Title: FS2_Open Linux Discussion
Post by: Inquisitor on September 11, 2003, 11:46:52 am
Ooo, this is promising :)

Does the windows compile still work? If someone says yes, we should get this into the source tree asap :)

What version of SCP is bk's build based on?
Title: FS2_Open Linux Discussion
Post by: Amon_Re on September 11, 2003, 11:51:06 am
Yea, it is, you should see it run in X ;) Or even better, see it load! :eek2:

I have to say that it runs very, very well, but on another note, i had some very hard crashes/freezes, don't know what is causing them yet tho, will investigate.

So, where are the 3.5.5 sources? :D

PS: Life without Micro$oft is possible :ha:

Cheers
Title: FS2_Open Linux Discussion
Post by: Amon_Re on September 11, 2003, 11:56:08 am
Quote
Originally posted by Inquisitor
Ooo, this is promising :)

Does the windows compile still work? If someone says yes, we should get this into the source tree asap :)


Don't know, the only thing i did was add a #define, bKtHeG did the hard work by making it compile on his machine.

And i can't test it on windows, i deleted it :ha:

Quote
What version of SCP is bk's build based on? [/B]


It says v3.5.5... Forget i asked for them sources ;) I'll install CVS on my machine, and download the whole thing from you guys, if that's possible

Got my intrest in coding back :D

Cheers
Title: FS2_Open Linux Discussion
Post by: bKtHeG on September 11, 2003, 02:55:01 pm
Download: http://ds.hamburg051.server4free.de/20030911_fs2_open_linux.tar.bz2

Changes:
- Basic sound support (no speech in missionbriefing)
- Using last cvs version
- Some smaller changes/fixes (including the opengl fix)

Tested:
- Joystick support (seams to work)
- Inferno mod (always crashes)
- normal game (quiet unstable - but playable)

How to build it (with sound):
(recommended: last stable gcc release (3.3.1))
Code: [Select]

./configure --disable-networking
make


How to get 1024x768:
Code: [Select]

[Default]
Fullscreen=0
VideocardFs2open=OpenGL - Primary Display Driver(1024 x 768)
Videocard=OpenGL - Primary Display Driver(1024 x 768)
VideoApi=OpenGL

(notice the space between the "1024", "x" and "768" - if you already launched fs2_open remember to edit fs2_open.ini in your home-directory)

EDIT:
In order to compile it you need the last (cvs) version of openal.
Title: FS2_Open Linux Discussion
Post by: Amon_Re on September 11, 2003, 03:06:10 pm
Rats, just managed to get the cvs :)

Downloading right now :)

Cheers
Title: FS2_Open Linux Discussion
Post by: Kamikaze on September 11, 2003, 06:25:24 pm
Great stuff :yes: , I'll test it later on my machines.
Title: Mini Howto, second revision
Post by: Amon_Re on September 13, 2003, 07:05:27 am
Incase you would like to get FS2_Open to run in linux (x86 architecture) you might find this intresting:

First grab bKtHeG's source tarball from http://ds.hamburg051.server4free.de...n_linux.tar.bz2 (http://ds.hamburg051.server4free.de/20030911_fs2_open_linux.tar.bz2) and extract the fs2_open directory.
First do the configure script ./configure -disable-networking
And after that execute make.
Incase you get errors while compiling in ds.cpp, it is probably because you lack the  latest CVS version of openAL.

In order to get the latest version, you should first make sure you have CVS installed.
Do the following in a shell(make sure you are online):

cvs -d:pserver:[email protected]:/usr/local/cvs-repository login

This will connect to the repository, if you are asked for a password, use "guest"
Now do the following:

cvs -d:pserver:[email protected]:/usr/local/cvs-repository co openal

This will download the repository into your current directory, so make sure you are in a temporary directory first!
Change to the directory, and read the docs for openAL.
Basicly, you'll have to do the following from within the openal directory:

cd linux
./configure --prefix=/usr/local
make
make install

Make sure you replace the old libraries in /usr/lib and that you eighter copy or link the new ones to /usr/lib

Now go back to the fs2_open directory, and run make again.

Make should now finish the compilation, and create the file fs2 (located in code/), copy this file to your freespace 2 directory.
If it doesn't, and complains about not finding -lGL, don't panic, this means you don't have a symbolic link in /usr/lib towards the correct file.
Create the symlink called libGL.so and make it point to /usr/X11R6/lib/libGL.so

Again start make from within the fs2_open directory.

In that same directory, create a textfile called fs2_open.ini and make sure it contains the following:

[Default]
Fullscreen=0
VideocardFs2open=OpenGL - Primary Display Driver(1024 x 768)
Videocard=OpenGL - Primary Display Driver(1024 x 768)
VideoApi=OpenGL

That's all, you should now be able to start fs2 with ./fs2

Extra notes, if you installed FreeSpace 2 using eg iculus's installer and get an error "error parsing strings.tbl" or "error parsing rank.tbl", try copying over your working freespace install from your windows partition, and see if that helps.
Don't have windows installed? No biggy, install the latest wine, and you can use the installer from the FreeSpace CD's.
Incase you got an error while compiling like, eg "brace-enclosed initializer used to initialize x", it is most likely because of a whacked GCC install, check that you have binaries that match each other (don't mix files from eg 2.9.2 with 3.x), and if that doesn't help, try removing & reïnstalling GCC.

With many thanks to bKtHeG for making this available
Title: FS2_Open Linux Discussion
Post by: Inquisitor on September 18, 2003, 08:56:40 am
is this the most recent?
Title: FS2_Open Linux Discussion
Post by: Inquisitor on September 18, 2003, 09:58:09 am
Update:

It compiles and links on windows, after a few updates:

in gropengl.cpp

bk has:

#include
#include
#include

I had to change the pathing to:

#include "gl/gl.h"
#include "gl/glu.h"
#include "gl/glext.h"

And the it compiled the ogl stuff.

Another error was in localization.cpp, I had to comment out the include for unistd.h

With that, this compiles, runs, and can load the first SP training mission.

Also had to replace the code/make file stuff with what is in CVS, so there is an issue there we'll have to resolve.

Good stuff! What can we do to get this into CVS!?!
Title: FS2_Open Linux Discussion
Post by: bKtHeG on September 18, 2003, 10:43:11 am
Quote

...
Also had to replace the code/make file stuff with what is in CVS, so there is an issue there we'll have to resolve.


Do you mean code/Makefile? This file is heavily modified in order to work 100% under linux. What error did you get?

The opengl-stuff needs to be placed in #ifdef's because linux needs the .
Title: FS2_Open Linux Discussion
Post by: Inquisitor on September 18, 2003, 12:43:14 pm
Yeah, the code makefile, I figured it was VS being stupid, I htink our DSW is using a makefile as well, I'll switch it to a different name.

what about the unistd.h stuff?
Title: FS2_Open Linux Discussion
Post by: Amon_Re on September 23, 2003, 03:34:50 pm
Sorry that i didn't read this sooner, but in the includes...

#include etc, condidering that Linux's filesystems are case sensitive this might pose a *BIG* problem.

Normally on windows you shouldn't have this problem, did you test it if you change the  directory name to uppercase on your system? Does it still nag about it?

If it does, then i suggest we use some #ifdefs or something simular so that the compiler always gets the correct files.

As for the makefile, i haven't even looked at that one yet, i'm new to linux :)

Cheers
Title: FS2_Open Linux Discussion
Post by: Inquisitor on September 23, 2003, 05:15:48 pm
yeah, it looks like a stupid pathing issue, not a show stopper ;)
Title: FS2_Open Linux Discussion
Post by: bKtHeG on October 05, 2003, 11:05:19 am
I've got enought time to do a quick update on the linux tree. Mainly merges between SCP and my own tree but also some smaller patches (I don't know exacty what changes I've done since the last version).

Download: here (http://ds.hamburg051.server4free.de/20031005_fs2_open_linux.tar.bz2)
Title: FS2_Open Linux Discussion
Post by: kasperl on October 22, 2003, 06:31:57 am
erm, i can't really understand this, why can't you distribute a binary?
Title: FS2_Open Linux Discussion
Post by: bKtHeG on October 26, 2003, 08:16:08 am
binary means problems - thats the reason

You need a matching gcc-version and matching libs and I don't think you have the same versions as me (because some are cvs-versions - no official releases).

Under linux it is much simplier to compile fs2_open yourself even if the howto sounds difficult. Just try it....
Title: FS2_Open Linux Discussion
Post by: kasperl on October 26, 2003, 12:09:32 pm
i did.

but i might have done something wrong, and i really don't have the time to play around with it, school is starting again tomorow.
i'll see what i can do in some weekend, but i doubt i'll have any time left over before christmas.
Title: FS2_Open Linux Discussion
Post by: Setekh on October 27, 2003, 06:14:05 am
*throws in link*

http://icculus.org/freespace2/
Title: FS2_Open Linux Discussion
Post by: Col. Fishguts on November 03, 2003, 10:14:36 am
Hi there...

Well, I got it to compile until the gropengl.o stuff, but then I get the following error:

"graphics/gropengl.cpp:3039: implicit declaration of function `int glCompressedTexImage2D(...)'
make[1]: *** [gropengl.o] Error 1
make[1]: Leaving directory `/home/elias/fs2_open/fs2_open/code'
make: *** [all-recursive] Error 1"

So, has anyone an idea, what's causing this error ?

And yes, I used the newer tarball, which has the "#define  GL_GLEXT_PROTOTYPES" line already in it.
I think I have all necessary OGL libraries installed, because other OGL stuff works perfectly.
Btw, I'm using Debian with a g++ 2.95
Title: FS2_Open Linux Discussion
Post by: kasperl on November 03, 2003, 01:15:24 pm
Col.Fishguts, AFAIK, Knoppix is a Debian mixup right? could you, sometime, perhaps, look into the possibilty of making a FS2 disk with Knoppix, without a GUI, and just running FSO?
that would let me play FS2 at school, and mkae me very happy.
Title: FS2_Open Linux Discussion
Post by: Col. Fishguts on November 03, 2003, 02:51:47 pm
Actually, I don't know...I tried Knoppix out only once.

But I like your idea...an all-in-one-boot-OS-FSO-CD ;7

Though, you might run into problems, if you want to get OGL to wirk platform independent...and you sure had to forget about hi-res graphics, because on 1 CD with Knoppix on it you wont have enough space for all the FS stuff.
But definitely a good idea...but first I've got to get this thing to compile properly
Title: FS2_Open Linux Discussion
Post by: bKtHeG on November 04, 2003, 07:57:53 am
I have no real idea why compiling fails on opengl.o - Only to thoughts:
1. Perhaps gcc 2.95 is not the best choice (even if it is very good - it is outdated)
2. You should check the versions of your opengl-libs an weather you can find the function or not

Knoppix:
Knoppix is debian-based but not exactly debian.
The main problem should be the gfx-card support. I don't think knoppix is optimized for games and includes everything that is necessary.
Regarding the size: You can use a dvd (I think there also was a Knoppix-version on dvd (not as iso))
Title: FS2_Open Linux Discussion
Post by: Col. Fishguts on November 04, 2003, 09:49:28 am
Quote
Originally posted by bKtHeG
I have no real idea why compiling fails on opengl.o - Only to thoughts:
1. Perhaps gcc 2.95 is not the best choice (even if it is very good - it is outdated)
2. You should check the versions of your opengl-libs an weather you can find the function or not
 


1. OK, I switched to g++-3.0, but the compile error still occurs

2. If I read the error message correctly, then g++ stumbles upon  "glCompressedTexImage2D" the first time in gropengl.cpp, while it should be defined somewhere in a .h header. Shouldn't that be in one of the headers of the FSO source ?
Or should it be included from one of my OGL libraries ? if yes, where should I search for it, to look, if I have it or not ?

EDIT: Since I'm too stupid to get it to compile....could someone who has a working binary pleeeze put it up for download somewhere ?
(and sorry for my n00b'ness, it's been a while that I did something in C++)
Title: FS2_Open Linux Discussion
Post by: kasperl on November 04, 2003, 10:59:30 am
Quote
Originally posted by bKtHeG
[BKnoppix:
Knoppix is debian-based but not exactly debian.
The main problem should be the gfx-card support. I don't think knoppix is optimized for games and includes everything that is necessary.
Regarding the size: You can use a dvd (I think there also was a Knoppix-version on dvd (not as iso)) [/B]


i got FS2 without cutscenes and some stuff rarred down to 500MB, and unrarred it's 900 with music and voice and hi-res texes. you can kill everything but the OS, and AFAIK you'd have a lot of space left over.

as for technical problems, i wouldn;t know. i can barely use the RH GUI, and i can't even make out these instructions, i am mister stupid under linux.
Title: Any help needed?
Post by: taylor on November 07, 2003, 12:05:23 am
Is there a todo list of things I can start going over in an effort to help?  I added the support to the icculus.org project for two roots (${HOME}/., and the install dir) and getting that support into FSO should be simple enough.  Depending on what you've got for osregistry having the ini settings automatically written with defaults should be easy as well.  I ported (not much to it really) the original osregistry-unix stuff to CFILE in order to automatically use root[0] which in this case is in ${HOME} so if that's what you're using it will be simple.  I downloaded the tarball so I'll take a look but if there is anything specifically that needs help first please let me know.  Is there anyone in particular to send patches to?

Also, I ported cfilearchiver and added a couple of smarts to it so that I could make VPs without the need for Wine or anything.  If anyone is interested in that let me know.
Title: FS2_Open Linux Discussion
Post by: Bobboau on November 07, 2003, 12:30:00 am
we can get you CVS write access and access to the internal forum if you realy want to help, I don't know what needs to be done off hand, but if you realy are going to help us this is gona be great :D
Title: FS2_Open Linux Discussion
Post by: taylor on November 07, 2003, 12:52:20 am
I definitely intend to help in any way that I can.  I don't think that CVS write access is needed at this point.  I'd rather just figure out what needs to be done and get familiar with the FSO code base since it's a bit different than the icculus.org stuff.  The current *nix support isn't in CVS yet, right?  Until that happens I think that just trading patches with someone would be plenty enough to get work done.
Title: couple things...
Post by: taylor on November 07, 2003, 01:20:31 am
The "brace-enclosed initializer used..." message is just bad code and has been fixed in icculus.org CVS already, just take the extra braces out.  Some gcc setups are just less strict than others so it gets passed without the error.  [little later] Of course it shouldn't be as bad as it is.  I'll have a look at this since it happens with a fresh install of Fedora Core 1 so if gcc is borked then it's officially borked.  The same code from icculus.org compiles fine on this system so something is wrong.

Why does PSNET_SOCKET_RELIABLE have a typedef of both int and uint in two headers?    Shouldn't it just be a uint a psnet2.h?

This is all from the 20030911 tarball so if there is something newer please let me know.
Title: FS2_Open Linux Discussion
Post by: bKtHeG on November 07, 2003, 05:43:45 am
This is the last version: here (http://ds.hamburg051.server4free.de/20031005_fs2_open_linux.tar.bz2)
(There is a newer one on my hd (--enable-debug is working) but the ht&l-opengl code is not working)

I know there are many things that are not very good code but I'm not an expert in gcc.

PSNET_SOCKET_RELIABLE: The whole net-stuf is still windows-only and therefore I didn't check the constants and types.

My todo:
- new version (ht&l)
- write a working audiostream-version (audiostr.cpp)
- find out why there are so many segmentation faults
- implement the rest of the opengl-functions (fullscreen for example)
- rewrite of osapi_unix.cpp (this is bad code)
- implement net-code

The whole code is still not in cvs because I don't have any access to it and nobody else commited it.
One question: could somebody please give me access to the internal forum. It would be a great help to understand what things are still under construction and what patches are commited (and what things are missing)
Title: FS2_Open Linux Discussion
Post by: Col. Fishguts on November 07, 2003, 07:13:41 am
Ok, I've tried it out but now I get even more compile errors. All of them appear in gropengl.cpp

Code: [Select]
graphics/gropengl.cpp: In function `void
   gr_opengl_set_tex_state_combine_arb(gr_texture_source)':
graphics/gropengl.cpp:818: `GL_COMBINE_ARB' undeclared (first use this
   function)
graphics/gropengl.cpp:818: (Each undeclared identifier is reported only once
   for each function it appears in.)
graphics/gropengl.cpp:819: `GL_COMBINE_RGB_ARB' undeclared (first use this
   function)
graphics/gropengl.cpp:820: `GL_RGB_SCALE_ARB' undeclared (first use this
   function)
graphics/gropengl.cpp: In function `int opengl_create_texture_sub(int, int,
   ushort*, int, int, int, int, int, int, int, int, tcache_slot_opengl*, int,
   int)':
graphics/gropengl.cpp:3048: `glCompressedTexImage2D' undeclared (first use this
   function)
make[1]: *** [gropengl.o] Error 1


Well I guess I'm still missing some libraries, but I don't know which. This is driving me nuts... I've installed all OpenGL and SDL1.2 libraries I could find....what else am I missing ?!?

Any help would be very appreciated...
:confused:
Title: FS2_Open Linux Discussion
Post by: taylor on November 07, 2003, 11:18:06 am
bKtHeG:  I had started working on the audiostr stuff for icculus.org but haven't gotten anywhere useful yet.  The only part of it that's working is the parsing function on load.  I'm using SDL_RWops so that makes it easy and the rather large part that's left is to plug in more of the OpenAL code and some utility functions for buffer mangagement and things like that.

With the icculus.org code I don't think that there was that much to getting the network stuff working.  Getting to work on OSX is another matter and has required a lot of work and it still doesn't work correctly.  I'll have a look at this and see what actually needs to be done.

I fixed/finished some of the OGL stuff a few months ago for i.o so I'll see what's still missing and try to pull as much as possible from there.  I have no idea what's envoled with HT&L at this moment but I'll look into it.  HT&L will probably be a project best suited for someone who's more familiar with how it all works though.  Is there anything in OGL that should take priority?

The CFILE stuff stuff and osregistry stuff is there so all that's really need is the osapi cleanup and default ini options added.  At first glance to osapi my thought was "WTF!?" so I'll see if I can clean that up a little bit ;)  How big of a deal is it to use threading now or can I just skip the threaded stuff for the time being and get the rest going?

I'll check out stability as soon as I get it to compile all the way.  Oh and for os_sleep() I had previously made a change to use SDL_Sleep() rather than usleep() because it was causing problems for people with NPTL enabled kernels.  I'll make that change here as well unless there are any objections.
Title: FS2_Open Linux Discussion
Post by: Goober5000 on November 07, 2003, 12:41:42 pm
Moved back to the main forum.
Title: FS2_Open Linux Discussion
Post by: taylor on November 07, 2003, 01:01:42 pm
Got it compiling fine with gcc 2.96 but not 3.3.2.  I'll work on that later.

Forget what I said about os_sleep(), I was thinking of Sleep() when I wrote that and you've already got that change.
Title: FS2_Open Linux Discussion
Post by: phreak on November 07, 2003, 01:57:46 pm
the ARB_COMBINE extension is used by shinemapping.  if you grab the latest glext.h it should be in there.

cvsroot/code/graphics/gl/
Title: FS2_Open Linux Discussion
Post by: Col. Fishguts on November 07, 2003, 03:04:01 pm
Ah, I see..
But I still get the error
Code: [Select]
graphics/gropengl.cpp:3048: `glCompressedTexImage2D' undeclared (first use this
   function)

..it's the same that I got with the tarball at the beginnig of this thread.

Does anybody know where this function comes from, or in which library it should be ?
Title: FS2_Open Linux Discussion
Post by: bKtHeG on November 08, 2003, 08:59:55 am
I don't have any concrete idea about glCompressedTexImage2D (remember: I know only little about opengl) but it should be part of opengl1.3 or opengl1.4
----

There is a new work-in-progress build: here (http://ds.hamburg051.server4free.de/20031108_fs2_open_linux.tar.bz2)

This build contains the last version of ht&l and is therefore not very stable. Also  there are a couple of functions that are not written at the moment (I placed empty ones in order to be able to run fs2 - You should be able to see tons of stub-messages).
This version also uses the species-update (to disable it: --disable-more-species but it should end in compile-errors)
I also added the command-line parameter -ng (no-grab) and the configure-option --enable-debug and fixed the "brace-enclosed initializer.." errors

to build it do the same as explained above but replace the ./configure ... command with the following:
./configure --disable-networking --enable-debug

One additional note:
The command-line options parser is not working in the correct way. It only supports one option at the time. Therefore "-ng -htl" won't work.
Title: FS2_Open Linux Discussion
Post by: Kazan on November 08, 2003, 09:21:08 am
disabling the species update sholdn't produce any compiler errors.....
Title: FS2_Open Linux Discussion
Post by: taylor on November 08, 2003, 01:22:20 pm
bKtHeG:  Can I send any patches to you or just upload them somewhere and PM you the location?  Right now I've added a couple of little things (to 20031108):

- create userdir
- add the OGL fullscreen and minimize stuff
- automatically create ini with default video setting of 640x480
- fix bug in ds_do_frame that would segfault if sound is disabled
- look for cmdline.cfg in userdir and then gamedir if not found

The bug in ds_do_frame shouldn't be Linux specific so I didn't #ifdef it.  Also I didn't have a problem with the species stuff, just added a new line to the header and it stopped complaining.  I'll have a look at the cmdline parser if you haven't already fixed it.
Title: FS2_Open Linux Discussion
Post by: taylor on November 08, 2003, 01:29:53 pm
It probably would have been a good idea to look at the parser before posting. :D

It was just chopping off the last two characters.  Changing "arglen += argc - 2;" to "arglen += argc + 2;" fixed the problem and all is well now.
Title: FS2_Open Linux Discussion
Post by: bKtHeG on November 08, 2003, 06:32:05 pm
The best would be sending it to me via email but uploading it somewhere would be ok too.

Regarding the userdir creation: I think the code allready did this before...
Title: FS2_Open Linux Discussion
Post by: taylor on November 08, 2003, 07:00:47 pm
Alright, I'll make the patch and send it your way.

As far as the userdir thing it wasn't created explicitly but only as a by-product of CFILE (cfwrite will create leading directories) that I can see.  I added this to main() in the icculus.org stuff to avoid a couple of problems (cmdline, some osregistry stuff) that I may or may not have delt with since then, I don't really remember.  Either way it was just a safety catch to guarantee that the directory existed first thing before any code tried to access it.

FSO doesn't handle the command line the exact same way as the icculus.org code (which is more like the original) so it may not ever have any of the same issues.  I have already changed the cmdline code once to fix a weird (and obvious) memory error that I introduced and to fix the problem of single args and double args getting mixed up.  I didn't port osregistry to CFILE until after the userdir code was working and that was because it was going to be easier in the long run and to fix numerous crashes to came up once userdir was added.

I still don't know the FSO code that well so if it's not needed feel free to take it out.
Title: FS2_Open Linux Discussion
Post by: Johnmike on November 12, 2003, 06:31:23 pm
One word.  DVD.
Title: FS2_Open Linux Discussion
Post by: Bobboau on November 12, 2003, 06:39:23 pm
a): that isn't one word it's three letters, each of wich stand for a diferent word
b): what does that have to do with the Linux build
Title: FS2_Open Linux Discussion
Post by: bKtHeG on November 13, 2003, 11:15:05 am
New version: here (http://ds.hamburg051.server4free.de/20031113_fs2_open_linux.tar.bz2)

Changes:
* Last cvs version
* auto-language detection (taylor) - this is a really nice thing. My german version now works for the first time (before this no fs2_open version was able to display all characters)
* cmdline.cfg is now loaded from the home-config-dir (taylor)
* The user directory is created automatically (taylor)
* Fullscreen support (taylor)
* Default config values (taylor)
* -ng (nograb) changed to -nograb
* started working on some changes to bmpman (using devIL for loading). But this is unuseable at the moment (extremly early stage)

I think these are all changes. Somebody should correct me if something is missing.
Title: FS2_Open Linux Discussion
Post by: Xyzop on November 22, 2003, 01:32:42 am
Hello, this is my first post ever at HLP.

I just built fs2_open in linux today and plays okay, no crashes so far.

I noticed something with the afterburners. It doesn't deplete the afterburner "fuel". I'm not sure if this known or not or if this is related to the other afterburner bug.

Also, most of the models seem really bright. I'm not sure if I need an extra VP file or not. Please yell at me if I should RTFM.

I'm curious if avifile could be used to play the movie avi files for this linux port.

Thank you for a really nice port! You guys are doing a nice job!
Title: FS2_Open Linux Discussion
Post by: taylor on November 22, 2003, 04:29:00 am
Xyzop:  The afterburner thing is a bug.  I had forgotten about fixing this previously and had deleted the changes when I installed the previous source release and forgot to tell bKtHeG.  Oops.  :D

Anyway, for the fix edit code/ship/afterburner.cpp line 370 and change:
if (objp != Player_obj) {
to
if (objp == Player_obj) {

That should get things working again.  If it doesn't work for you let me know.

The models are bright to me too but I think it's just some incomplete parts of the OpenGL code.  Though it could just be that I need to RTFM too so maybe someone else can give a definite answer.

For the movies I'm looking at avifile and libxine at the moment.  libxine actually has a MVE decoder which is a plus, though it hasn't ever decoded anything correctly for me (which sort of invalidates the plus).  Another plus for libxine is that it can render to various backends (SDL and an alpha/beta OpenGL) which should make it easier to play movies in-game without having to switch back to the desktop to play.  I haven't looked at avifile in a while so I don't know it's current capabilities.  It's on my list to look at both of them though and figure out which would be easiest to implement and maintain long term.
Title: FS2_Open Linux Discussion
Post by: Xyzop on November 22, 2003, 10:02:58 am
Cool, afterburners working fine now.

Ok, I'll try looking into the opengl code. I have some experience with opengl code. I seem to remember having a similar problem with a project I was working on. I've also just noticed when flying through the nebula (around the 4th or 5th mission), the nebula texture(s) do not scale correctly. Maybe mipmapping is not enabled. The Aquitane looks pink too.

Yeah, xine doesn't play the MVEs correctly for me either. I think there is some preliminary MVE decoding code in the icculus.org code. However, I'm not sure about the legality of it. Avifile should work fine. It renders through SDL but not OpenGL.
Title: FS2_Open Linux Discussion
Post by: Xyzop on November 22, 2003, 11:14:47 am
Oh, I just found this thread (http://www.hard-light.net/forums/index.php/topic,16418.0.html) about the media VPs. It does seem to fix the brightness for most of the models. However, some models seem to suddenly get really bright when closing in on them. So apparently it's not really an opengl issue.

I'm still looking into the nebula issue(s).
Title: FS2_Open Linux Discussion
Post by: taylor on November 22, 2003, 11:24:21 am
I've got very little OGL experience so if you can do anything to help that would be great.  Another OGL problem you may want to look into as well is the line and shade code which is mainly used in the help.  Grab the icculus.org, go to the mainhall and hit F1, then try the same thing in FSO and you'll see what I mean.

I've reworked the MVE code for icculus.org to render to OGL which makes it *much* faster and fixed a lot of memory problems.  It's been ported to CFILE to make it easier to find the movies and numerous decoder bug fixes have been made.  This isn't in icculus.org CVS yet because it still lacks some audio code.  Currently I've gotten all of the OpenAL code in except for a way to manage the audio buffers that are needed (10, 9K buffers to work correctly).  It's on my list of things to do.  I'm not sure about the legality either but it's been in public CVS for over a year and a half without protest so we'll see.

I downloaded the new avifile version so I'll take a look at it.
Title: FS2_Open Linux Discussion
Post by: Xyzop on November 22, 2003, 10:07:53 pm
:( I can't find the problem with the main hall help. The line and shade code look almost identical. Maybe the problem lies elsewhere. I'll keep investigating.

Oh, I just noticed that some ships have infinite afterburners. It's hell trying to keep up with super fast shivans :p

The nebula looks a little better if I turn up the nebula detail, but it's still a little blocky.

EDIT: (typo)
Title: FS2_Open Linux Discussion
Post by: Xyzop on November 23, 2003, 02:50:42 pm
I finally figured out what was going on with the help stuff. Apparently there is a check to see if a texture is cached in the gr_opengl_tmapper_internal_* functions. If it's not cached, then it returns. Since textures are not used when drawing the lines and the shading, it would "return" way before attempting to draw the lines and shading. Checking to see if the flag TMAP_FLAG_TEXTURED is enabled before checking for a cached texture allows the lines and shading to be draw.

I should have a patch ready after I take out my debugging mprintf's.

So is email the way to send patches here?
Title: FS2_Open Linux Discussion
Post by: taylor on November 23, 2003, 03:54:13 pm
Awesome!

You can e-mail patches to me ([email protected]) if you want and I'll send them to bKtHeG.  Beyond that I'm not sure what to do with them yet (Bobboau?).  A quick brain fart and I seem to remember a link to a bugzilla around here somewhere if you want to try and find that.  I probably need to take a look at the bugzilla as well.

Some of my patches, like this one, aren't all that Linux related so I'm not sure if bKtHeG really wants them.  I've fixed a couple of little crash bugs (like when sound is disabled) and quickly modified the movie player to search for movies with cf_find_file_location() so that the movies don't have to be in the current directory.  And on the topic of movies I do think that avifile looks the best at this point.  It looks like it can work a lot like the icculus.org MVE player by decoding a single frame and passing it on to a video handler which displays it (using SDL in libmve and OpenGL in my current icculus.org version).
Title: FS2_Open Linux Discussion
Post by: Xyzop on November 23, 2003, 10:23:41 pm
Here's the link for the fs2 scp bugzilla page:
http://fs2source.warpcore.org/bugzilla/index.cgi
Title: FS2_Open Linux Discussion
Post by: Xyzop on November 23, 2003, 10:40:41 pm
Oh, if you do get something going with avifile, I'd be happy to test it. :D
Title: FS2_Open Linux Discussion
Post by: tr909 on November 24, 2003, 07:39:57 am
Taylor, reading this thread and seeing your posts here: does this mean that your freespace2 work is focussing more on freespaceOpen now? (instead of the icculus.org version) And does this mean the Mac version (tigital) might also include the FreeSpaceOpen engine?
Title: FS2_Open Linux Discussion
Post by: taylor on November 24, 2003, 10:25:42 am
tr909:

My primary focus is still icculus.org for now.  Since the icculus.org port is mostly just a port of the original game and not full of enhancements like FSO there is an end to it.  The icculus.org project is literally missing 2 or 3 portions of code before all of the todo list items are completed.  All of the missing parts are a least started by myself or tigital and we are working together to get everything done faster.

Those parts that are missing though are the same ones that FSO needs so I'm working on the code for icculus.org and then spending a few minutes to get that same code working in FSO.  The largest block of unfinished code in the icculus.org project is the audio streaming code but it has been started.  When all of my current code is done and in icculus.org CVS then I am going to focus all of my attention on FSO.

tigital is getting ready to release beta3 of the OSX code and if that goes as well as I think it will I believe he is going to get it into icculus.org CVS.  After that he does want to work on FSO as well so I'm guessing that he is going to be around here a bit more.  If he ends up not having enough time to get the OSX version working for FSO then I'll bring the code over and get it working.
Title: FS2_Open Linux Discussion
Post by: Xyzop on November 25, 2003, 01:56:04 pm
bKtHeG: I think I found a way to get the DXTC format (e.g., DXT1,DXT3,DXT5) from DevIL using:
Code: [Select]
ilGetIntegerv(IL_DXTC_DATA_FORMAT,&dxtc_format);
then check if 'dxtc_format' equals IL_DXT[1,3,5] and set 'type' accordingly.

Also there is a small typo in code/bmpman/bmpman.cpp, line 1082:
Code: [Select]
#ifndef USE_DEVL

I haven't tested fs2open with DevIL enabled yet. I'll give it a try later.
Title: FS2_Open Linux Discussion
Post by: theoddone33 on December 03, 2003, 10:49:18 pm
libxine's MVE stuff probably doesn't work because it's based on the old 8bpp movie code used in d2x.  The only non-Interplay code I know of that plays 16bpp MVEs (like FS2 uses) is in the icculus.org CVS.  It required some moderately significant changes.

libxine for MVE would be an ok way to go for people that have a configure script.
Title: Can't geto fs2 to compile with pthread error
Post by: Azoele on December 06, 2003, 08:23:30 am
/usr/lib/libopenal.a(posixthreads.o)(.text+0x1e0): In function `Posix_AtForkThread':
threads/posixthreads.c:109: undefined reference to `pthread_atfork'
collect2: ld returned 1 exit status
make[1]: *** [fs2] Error 1
make[1]: Leaving directory `/home/azoele/Desktop/fs2_open/code'
make: *** [all-recursive] Error 1


This is the errores I get.
I got openal from CVS and compiled/installed it, and this is the only error I get...

Anybody's got a clue? I can't wait to play FS2 on Linux with audio, since the Win version keeps giving me memory errors either with stock executable and with FS2Open.exe 3.5.5...

Thanks,

Lorenzo
Title: FS2_Open Linux Discussion
Post by: bKtHeG on December 06, 2003, 08:29:44 am
Finally I've got the time to make a new release:

Download: here (http://ds.hamburg051.server4free.de/20031206_fs2_open_linux.tar.bz2)

Changes:
* MS-ADPCM decoder [taylor]
* some changes to the network-stuff [taylor]
* the movie now determines the full path of a mve-file (no playback yet) [taylor]
* newest cvs-version (including htl-support)
* some smaller changes to the windows_stub-stuff

Problems:
* Debug-built: one assertion always fails if a rocket hits a ship
* Random segmetation-errors
Title: FS2_Open Linux Discussion
Post by: taylor on December 07, 2003, 07:08:29 pm
For that first in the list of problems (ship hit crash) all that's needed is to change "Num_weapons" to "Num_weapon_types" at the end of the Assert.

I looks like you fixed the depreciated sys_errlist problem in _chdir in the windows stubs but there is still another one in _mkdir.  I fixed this for both previously but I don't think I ever sent you a patch for it.

I'm working on straming audio for the icculus.org side of things and a working build of an OSX FSO port for Inquisitor so I'm going to spend time trying to track down the random segfaults rather than new code for FSO.  I still haven't experienced a crash that was exclusive to the *nix build though so if anyone has a crash please let me know where so I can look for it.
Title: FS2_Open Linux Discussion
Post by: HellToupee on January 22, 2004, 02:15:36 am
i cant get it to compile i get this

graphics/gropengl.cpp: In function `void
   gr_opengl_set_tex_state_combine_arb(gr_texture_source)':
graphics/gropengl.cpp:1253: error: `GL_COMBINE_ARB' undeclared (first use this
   function)
graphics/gropengl.cpp:1253: error: (Each undeclared identifier is reported only
   once for each function it appears in.)
graphics/gropengl.cpp:1254: error: `GL_COMBINE_RGB_ARB' undeclared (first use
   this function)
graphics/gropengl.cpp:1255: error: `GL_RGB_SCALE_ARB' undeclared (first use
   this function)
graphics/gropengl.cpp: In function `int opengl_create_texture_sub(int, int,
   ushort*, int, int, int, int, int, int, int, int, tcache_slot_opengl*, int,
   int)':
graphics/gropengl.cpp:3469: error: `glCompressedTexImage2D' undeclared (first
   use this function)
graphics/gropengl.cpp: In function `uint opengl_create_vbo(unsigned int,
   void**)':
graphics/gropengl.cpp:4516: error: `glGenBuffersARB' undeclared (first use this
   function)
graphics/gropengl.cpp:4521: error: `GL_ARRAY_BUFFER_ARB' undeclared (first use
   this function)
graphics/gropengl.cpp:4521: error: `glBindBufferARB' undeclared (first use this
   function)
graphics/gropengl.cpp:4522: error: `GL_STATIC_DRAW_ARB' undeclared (first use
   this function)
graphics/gropengl.cpp:4522: error: `glBufferDataARB' undeclared (first use this
   function)
graphics/gropengl.cpp: In function `void gr_opengl_destroy_buffer(int)':
graphics/gropengl.cpp:4606: error: `glDeleteBuffersARB' undeclared (first use
   this function)
graphics/gropengl.cpp: In function `void gr_opengl_render_buffer(int)':
graphics/gropengl.cpp:4629: error: `glBindBufferARB' undeclared (first use this
   function)

ive tried gcc 2.95 and 3.3, im using debian.
Title: FS2_Open Linux Discussion
Post by: phreak on January 23, 2004, 12:14:32 pm
you need a new copy of glext.h

i think there is one here (http://fs2source.warpcore.org/cgi-bin/cvsweb/cvsweb.cgi/fs2_open/code/graphics/gl/Glext.h)
Title: FS2_Open Linux Discussion
Post by: HellToupee on January 27, 2004, 11:50:48 pm
no luck with the new file :(
Title: FS2_Open Linux Discussion
Post by: bKtHeG on January 28, 2004, 07:02:10 am
Which version do you have? (You should use the lastest version available and not the one at the beginning of the thread)
If you are using the most up to date version: Which gfx-card and which driver do you have?
Title: FS2_Open Linux Discussion
Post by: HellToupee on January 29, 2004, 11:45:34 pm
i am using the latest version posted in this thread, i have a nvidia gf4 mx440 with the 5338 drviers, on 2.6.1 kernel.
Title: Compiling on PPC Linux.
Post by: Atalhlla on February 03, 2004, 04:18:12 pm
[edit]While I'm pretty sure what "it" refers to is obvious, "it" refers to FSO.[/edit]

I know I've been kinda silent since my first couple of posts, but I've been working on my science fair project, and I'm using... PPC linux.  Crazy, eh?  While I'll be glad when the OSX build comes, I'm wondering about getting it to compile on PPC Linux.  The only thing that's gone wrong with it so far is the asm stuff in some of the graphics/ source files.

The reasons I'm asking are that I'd like something to do while trying to build a new kernel and I don't know assembler :P

Is it talking to the graphics card, or the CPU?  And/Or is there something I need to change in some of the gcc flags?

Or have I missed something in a readme or documentation somewhere.. <.<

~Atal
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 12, 2004, 02:03:04 pm
Well, seems things have been happening for the linux port, COOL ;)
Taylor, if/when FSO compiles on OSX, could you upload the sources somewhere?

I've downloaded the last sourcetree from Bk & i'll see to compile with that.
Taylor, the installer made for Incubus(?), is the sourcecode available for that?

Cheers
Title: FS2_Open Linux Discussion
Post by: taylor on February 13, 2004, 01:16:29 am
I've been extremely busy with work since the last week of November so I haven't done any coding, except for work.  I'm ashamed.  Hopefully things will ease up a bit here soon and I can get back to working on the game(s).  I was about a third of the way through the streaming audio code and only had to figure out the best way to handle the audio buffers to be done with the MoViE player for the icculus.org code.  All of the audio streaming code is in a separate file and will be simple to get it plugged into FSO and it should work on OSX/PPC without any changes.

Amon_Re:
I'm waiting on tigital to get the OSX stuff for icculus.org finalized before I do anything about it for FSO, but then tigital will probably work on that as well.  There have been some freaky crashes with the beta3 code and I haven't been able to reproduce any of them in order to find a fix.  There are some issues with cross platform use of pilot files as well but the optimal fix (hopefully, it has to work with original Windows files) exists only in my head at the moment.  (mental note, make sure tigital is still alive and figure out the status of this stuff)

   I assume that you are referring to icculus.org and not the band (Incubus) but the (Linux) installer which ravage has is loki_setup out of the icculus.org CVS.  I don't know if loki_setup works under OSX though and ravage's installer uses wine to install the FS2 game data so that's not going to work for you with a clean install to OSX.  I believe that someone made the installer that works under OSX (for UT2K, I think) but I'm not sure who that was or where the source is hiding.

Atalhlla:
   It should be pretty easy to take out the parts from the icculus.org OSX version necessary for it to work on Linux/PPC and get them into bKtHeG's FSO code.  My tree has code that is a bit cut down from tigital's so it's geared more toward Linux/PPC rather than OSX anyway.  Getting it in FSO and Linux but still on PPC might help us figure out if some of the stranger bugs are OSX or just code related.  Message me if you are serious about testing it out and will agree to not distribute the code for now, I really don't want a bunch of bug reports and complaints on something that's probably going to be replaced with tigital's final code in the not-too-distant future.
Title: FS2_Open Linux Discussion
Post by: tr909 on February 13, 2004, 05:39:53 am
I mailed some bug^h^h^h crash reports to tigital (begin january) and some things are OSX-Panther related (tigital at that time still used OSX-Jaguar) He rather sort things out first before receiving many more reports. success you coders. keep up the good stuff :-)
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 14, 2004, 10:48:21 am
Quote
Originally posted by taylor
Amon_Re:
I'm waiting on tigital to get the OSX stuff for icculus.org finalized before I do anything about it for FSO, but then tigital will probably work on that as well.  There have been some freaky crashes with the beta3 code and I haven't been able to reproduce any of them in order to find a fix.  There are some issues with cross platform use of pilot files as well but the optimal fix (hopefully, it has to work with original Windows files) exists only in my head at the moment.  (mental note, make sure tigital is still alive and figure out the status of this stuff)

   I assume that you are referring to icculus.org and not the band (Incubus) but the (Linux) installer which ravage has is loki_setup out of the icculus.org CVS.  I don't know if loki_setup works under OSX though and ravage's installer uses wine to install the FS2 game data so that's not going to work for you with a clean install to OSX.  I believe that someone made the installer that works under OSX (for UT2K, I think) but I'm not sure who that was or where the source is hiding.[/B]


Yes, i was talking about icculus.org, sorry 'bout that :)
The reason why i asked for the installer is because i'm willing to make up to date packages of the installer & the FSO binary for download, i got the space & bandwidth for it.
Another point of intrest for me relating to the OSX version is a native LinuxPPC version aswell as (if i can find someone who can help with it) an Amiga port, in my opinion FSO should run on every platform that's able to grind them numbers ;)

Cheers
Title: FS2_Open Linux Discussion
Post by: HellToupee on February 14, 2004, 01:34:10 pm
if you do make an installer let it install the binaries without having to do an install requiring the cd.
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 15, 2004, 09:44:35 am
Quote
Originally posted by HellToupee
if you do make an installer let it install the binaries without having to do an install requiring the cd.


Simple solution, an RPM file with just the binaries, and an RPM with the full installer ;)

I'll see if i can grab the installer from icullus later today

Cheers
Title: FS2_Open Linux Discussion
Post by: Taristin on February 15, 2004, 02:58:39 pm
Please do.

I haven't the foggiest what I'm doing in Linux yet...
Title: FS2_Open Linux Discussion
Post by: HellToupee on February 15, 2004, 04:19:32 pm
Quote
Originally posted by Amon_Re


Simple solution, an RPM file with just the binaries, and an RPM with the full installer ;)

I'll see if i can grab the installer from icullus later today

Cheers


no thats not suitable, not all linux distrobutions use rpm.
Title: FS2_Open Linux Discussion
Post by: Kamikaze on February 15, 2004, 07:34:02 pm
Why would you need an installer? Just provide rpms, debs and tgzs.

By the way, has anyone gotten static compiling with FSO working? I tried to do it, but it's not working too well.
Title: Icculus build on PPC
Post by: Atalhlla on February 15, 2004, 11:52:49 pm
I'm not sure if anyone else has tested it yet, but when I build the icculus FS2 build on PPC Linux, durring compilation there are a bunch of "malformed pragma" warnings.  Other than that, it builds fine.  But, when I run it, it hangs on
[atalhlla@localhost FS2]$ ./freespace2 --window
WinMain: exceptions shall fall through
STUB: WinMainSub at src/freespace2/freespace.cpp, line 7109, thread 2587
STUB: find_freespace_cd at src/freespace2/freespace.cpp, line 8560, thread 2587
General: Size of bitmap info = 355 KB
General: Size of bitmap extra info = 8 bytes
STUB: cfile_chdrive at src/cfile/cfile.cpp, line 466, thread 2587
General: Building file index...
General: Searching root '/home/atalhlla/freespace2/FS2/'

_


First : What is that supposed to be for, even?
Second : Am I right in guessing that it still need testing/debugging? (and 's that what I'm supposed to be working on? :P)
Just curious.
~Atal
Title: FS2_Open Linux Discussion
Post by: taylor on February 16, 2004, 12:24:12 am
The icculus.org CVS doesn't have any of the OSX stuff in it yet so it doesn't support PPC at the moment.  It should all go in when the OSX build is working good.  Without the needed endianess swaps it won't parse the VPs correctly (or PCXs, or pilot files, or models, ...) so it won't load.  When tigital declares it ready, OSX support will be added to icculus.org CVS.

If you haven't tried it yet then you can download the OSX beta3 (which is built on OSX so it's not Linux/PPC friendly) from tigital's mac.com homepage.  I don't have that URL handy at the moment but you can do a search in the IMG forums (www.insidemacgames.com) to get the correct address.  Hopefully it's not going to be much longer before the full OSX patch is added to CVS for everyone to get at and play with.

Oh and bKtHeG's newest release, that I know of, is here: http://ds.hamburg051.server4free.de/20031206_fs2_open_linux.tar.bz2 (http://ds.hamburg051.server4free.de/20031206_fs2_open_linux.tar.bz2)
Title: FS2_Open Linux Discussion
Post by: Atalhlla on February 16, 2004, 12:32:10 am
Quote
Without the needed endianess swaps it won't parse the VPs correctly (or PCXs, or pilot files, or models, ...) so it won't load.

Aaaah, okay, thanks :)
Also, I did play with the OSX build from Tigital's mac.com account.  I must say that I wouldn't be as interesting in FS2/FSO as I am now if I didn't play it.
Quote
Oh and bKtHeG's newest release...

Again, thanks so much. :D

~Atal
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 16, 2004, 02:47:39 pm
Quote
Originally posted by HellToupee


no thats not suitable, not all linux distrobutions use rpm.


True, but i can't make debian packages or gentoo packages...
I could offcourse always drop the executable in a tarball of people with other distributions, but then you wouldn't get any dependancy checks

Cheers
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 16, 2004, 02:51:25 pm
Quote
Originally posted by Kamikaze
Why would you need an installer? Just provide rpms, debs and tgzs.

By the way, has anyone gotten static compiling with FSO working? I tried to do it, but it's not working too well.


tgz i can do, debs i haven't got the foggiest idea about :)
The reason why i'm intrested about the installer is that not everyone has a windows install of FS2.

I don't even have windows anymore.

Cheers
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 16, 2004, 02:59:10 pm
Well, i just compiled bKtHeG's latest tree, and i got some notes:

1: I needed to compile & install Mesa 6
2: It doesn't compile with gcc 3.x, but it compiles with 2.96
3: Got a seg fault, i'll try & see why (i'm guessing right now it's something minor, it complained about a read error in hash)

Cheers
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 16, 2004, 03:21:16 pm
There was a whole bunch of debug output here, but after some tracking it looks like a Mesa 6 issue, nothing to see here, move along... :)

Cheers
Title: FS2_Open Linux Discussion
Post by: taylor on February 16, 2004, 04:02:14 pm
Amon_Re:

Using gcc 3.3.2 here, what's the error?  I was under the impression that all of the gcc 3.x problems were dealt with already.  As far as Mesa6, I'm using the NVIDIA gl.h, etc. so if it's a header issue I don't see it.  I assume the segfault is gone now as well so I'll leave that alone.  If not then post a backtrace from gdb.

As far as packaging issues, that's one reason why I like loki_setup.  It creates a self-extracting tarball that runs a staticly linked GTK based GUI installer and doesn't ever touch the packaging system.  The basic libraries like OpenAL and SDL can be included, just use a shell script to set LD_LIBRARY_PATH to look in the game directory first for the libs.  This handles the dependency issues for everything but OpenGL and glibc versions which shouldn't be an issue for most people.  loki_uninstall can be used to remove the installed files since everything is registered in a product xml file.
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 16, 2004, 04:16:31 pm
Quote
Originally posted by taylor
Amon_Re:

Using gcc 3.3.2 here, what's the error?


Mainly linker issue's, went away with using gcc2.96, but i'm suspecting my compiler is wacked, so i'll check that out first.

Quote
I was under the impression that all of the gcc 3.x problems were dealt with already.  As far as Mesa6, I'm using the NVIDIA gl.h, etc. so if it's a header issue I don't see it.  I assume the segfault is gone now as well so I'll leave that alone.  If not then post a backtrace from gdb.


I'll see what happens later, but the reason why i updated Mesa was exactly a header issue, iirc glGenBuffersARB wasn't known to my system with the Mesa 5.01 libs & headers.
I don't know if installing the nvidea headerfiles will work, as i use a lowly ATI Rage Fury Pro.

Quote
As far as packaging issues, that's one reason why I like loki_setup.  It creates a self-extracting tarball that runs a staticly linked GTK based GUI installer and doesn't ever touch the packaging system.  The basic libraries like OpenAL and SDL can be included, just use a shell script to set LD_LIBRARY_PATH to look in the game directory first for the libs.  This handles the dependency issues for everything but OpenGL and glibc versions which shouldn't be an issue for most people.  loki_uninstall can be used to remove the installed files since everything is registered in a product xml file.


I'll be looking into loki_setup, but some people also like to use the packaging system, anyway, once the whole thing compiles & runs properly it's just a matter of setting everything up (including loki) and use scripts to generate the tarballs, rpm's & loki_setup if need be.

One of the errors i do remember seeing when running the executable that i compiled was in hash.c, but fs2_open doesn't contain a hash.c, the only sources on my hd that do contain this file are linuxppc kernel & mesa, i kinda suck at debugging with gdb (or any debugger actually, definatly need to read up on that :))

I'll keep you posted

Cheers
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 16, 2004, 05:30:46 pm
Ok, i recompiled just about every library i can think off, reïnstalled the header files and doublechecked my compiler, it's compiling with gcc 3 again, but alas, no banana.

This is the output i get before the seg fault:

DEBUG: os_config_read_string at osapi/osregistry_unix.cpp, line 423, thread 4129 - section: (null) char: VideocardFs2open default: (null)
DEBUG: os_config_read_string at osapi/osregistry_unix.cpp, line 423, thread 4129 - section: (null) char: Videocard default: (null)
DEBUG: os_config_read_string at osapi/osregistry_unix.cpp, line 423, thread 4129 - section: (null) char: VideoApi default: (null)
DEBUG: os_config_read_string at osapi/osregistry_unix.cpp, line 423, thread 4129 - section: (null) char: Language default: English
DEBUG: os_config_read_string at osapi/osregistry_unix.cpp, line 423, thread 4129 - section: (null) char: Soundcard default: (null)
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
[hash.c:395] failed read
STUB: Constructor at sound/audiostr.cpp, line 420, thread 4129
STUB: Initialize at sound/audiostr.cpp, line 440, thread 4129
DEBUG: os_config_read_string at osapi/osregistry_unix.cpp, line 423, thread 4129 - section: (null) char: VideocardFs2open default: (null)
STUB: gr_detect_cpu at graphics/2d.cpp, line 935, thread 4129
DEBUG: os_config_read_string at osapi/osregistry_unix.cpp, line 423, thread 4129 - section: (null) char: Gamma default: 1.80
STUB: game_init at freespace2/freespace.cpp, line 2835, thread 4129

Like i said i have no experiance with running debuggers (i'm an old skool amiga user, debugging on that machine was running it & seeing if the bloody thing rebooted or not ;)) so if you could gimme a small explication of what you want me to do, i'll get right on it.

Anyways, if you ask my unfounded, unverified & intuitionbased opinion, i'd say it's related to mesa 6.0.

Cheers
Title: FS2_Open Linux Discussion
Post by: taylor on February 16, 2004, 06:04:55 pm
Quote
Like i said i have no experiance with running debuggers (i'm an old skool amiga user, debugging on that machine was running it & seeing if the bloody thing rebooted or not ) so if you could gimme a small explication of what you want me to do, i'll get right on it.


It's not that difficult really.  Just open a terminal window and run the fs2 binary with gdb "gdb ./fs2" which with load it up and give you a "(gdb)" prompt.  Type "r" and press enter to run FS2, and you can put any command line options you want like this "r -window".  It's a good idea to always run the app in a window since you'll need to get back to the gdb window at some point.  When it segfaults you'll be put back at the (gdb) prompt and then you type "bt" and press enter to get the backtrace.  It will then spit out all of the info, which could be a lot or a little, that's needed.  At this point you can just do "k", or "kill", to terminate the still running fs2 process and then "q" to exit gdb.

gdb does a lot more than that obviously but that's the basic stuff and usually all that's needed.
Title: FS2_Open Linux Discussion
Post by: tigital on February 16, 2004, 07:46:07 pm
...sorry I haven't gotten the OSX/ppc stuff into icculus's cvs yet, but like taylor, I've been extremely busy with other stuff (including a massive hard drive crash that I'm just now fully recovering from)...

...I finally got cvs access to icculus, and also just met ryan, the man himself, a coupla weeks ago at the apple games summit!

...so hold tight, and I'll try to get it done in the next week...
Title: FS2_Open Linux Discussion
Post by: Setekh on February 17, 2004, 03:06:29 am
Cool, great to hear you guys are still active at this. :)
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 17, 2004, 01:40:25 pm
Taylor, here's the (short) backtrace i get when running fs2:

Program received signal SIG32, Real-time event 32.
0x40414714 in pthread_getconcurrency () from /lib/i686/libpthread.so.0
(gdb) bt
#0  0x40414714 in pthread_getconcurrency () from /lib/i686/libpthread.so.0
#1  0x404142b8 in pthread_getconcurrency () from /lib/i686/libpthread.so.0
#2  0x40413a61 in pthread_create () from /lib/i686/libpthread.so.0
(gdb)

I know libpthread is a systemlibrary so i'll see if that one can be updated.

Cheers
Title: FS2_Open Linux Discussion
Post by: Atalhlla on February 17, 2004, 09:26:36 pm
Anyone currently a little behind schedule : Eh, that's okay with me, I'm pretty used to waiting.  Almost too used to it, actually.  I have to stop waiting on myself for school work :P

tigital : Ach, your HD blew?  Hope you didn't loose anything vital/had it backed up recently..  

taylor : You aren't going to loose your HD soon, too, are you? :P
Anyway, I applied the patch to the Bk build, and I still got errors about the ASM bits.  Are they really needed?  
Code: [Select]
// -- code/graphics/aaline.cpp --
// Multiply a fixed-point number by a s11.20 fixed-point
// number.  The actual multiply uses less bits for the
// multiplier, since it always represents a fraction
// less than 1.0 and less total bits are sufficient.
// Some of the steps here are not needed.  This was originally
// written to simulate exact hardware behavior.
//#if defined _WIN32
long int fix_xy_mult(long int oa, fix_xy ob)
{
        int retval;

#if defined _MSC_VER
        _asm {
                mov     edx, oa
                mov     eax, ob
                imul    edx
                shrd    eax,edx,20
                mov     retval, eax
        }
#elif defined __GNUC__
        asm(
            "mov   %1,%%edx;"
            "mov   %2,%%eax;"
            "imul  %%edx;"
            "shrd  $20,%%eax,%%edx;"
            "mov   %%eax,%0"
            : "=g" (retval)        // outputs
            : "g" (oa), "g" (ob)   // inputs
            : "eax", "edx"         // clobbered registers
            );
#else
#error unknown compiler
#endif
        return retval;
}

I looked at the icculus build, and here's what it looked like...
Code: [Select]
// -- src/graphics/aaline.cpp --
// Same comments here....
// ...
long int fix_xy_mult(long int oa, fix_xy ob)
{
#ifdef PLAT_UNIX
        STUB_FUNCTION;    // It's a stub function, here... <_
        return 0;      
#else
        int retval;
       
        _asm {
                mov     edx, oa
                mov     eax, ob
                imul    edx
                shrd    eax,edx,20
                mov     retval, eax
        }
       
        return retval;
#endif
}


And I think I've tried both GCC 2.95.3 and 3.2.2.

Best of wishes to all you stressed coders out there ;)
~Atal
Title: FS2_Open Linux Discussion
Post by: taylor on February 17, 2004, 09:52:58 pm
Quote
taylor : You aren't going to loose your HD soon, too, are you? :P

Almost lost everything already.  I had a serious failure at the end of 2001 that almost made me lose the Freespace 1 port.  Spent three days running dd over parts of the drive, after replacing the drive ciruitry, looking for stuff to salvage.  I lost some stuff but got most of it back.  Now I've got smartd monitoring both drives on my main workstation, automatic network backups, and a exact model number spares of both drives for easy replacement.

I think that some times I just take things too far. ;)

Quote
Anyway, I applied the patch to the Bk build, and I still got errors about the ASM bits. Are they really needed?

Aaahh!  I knew that was going to be an issue but forgot about it for some reason.  I'll do a quick patch against what I've already sent you to get rid of the ASM issues.  You're obviously not going to benefit from those optimized sections but it's all going to work still.  The icculus.org port doesn't make use of any ASM code.
Title: FS2_Open Linux Discussion
Post by: Inquisitor on February 18, 2004, 08:36:07 am
Ok, which one of you guys wants to merge this into the active SCP code base and help maintain it?
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 18, 2004, 09:17:06 am
Quote
Originally posted by Inquisitor
Ok, which one of you guys wants to merge this into the active SCP code base and help maintain it?


/me hides :eek:
Title: FS2_Open Linux Discussion
Post by: Inquisitor on February 18, 2004, 10:59:02 am
Seriously :) It needs merged in :)

I can help compile it now that i have a linux dev environment, but the merge is gonna require one of you guys :)
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 18, 2004, 11:56:29 am
The latest build compiles on your setup? And runs? :eek:
I still haven't figured out why it crashes here, libpthread is up to date, so is Mesa, problem is, ever since updating libpthread i can't do anything anymore, when i run it through gdb it halts after the seg fault, but alas, it first kills mouse & keyboard, wich means i can't reach my console :mad:

Oh well, i'll find the cause sooner or later, i'm stuborn :)

Cheers
Title: FS2_Open Linux Discussion
Post by: Atalhlla on February 18, 2004, 03:15:06 pm
Well, the ASM errors are gone.  Thanks Taylor.

*ominous pause*

But now I'm getting the same OpenGL errors that Amon was getting.
*prints the list of errors here... or not.* :P
Anyway, I checked that I have the latestest Glext.h already (I'm pretty sure, also, that it was from the exact same build.. woo.).  I'm not sure about this part in the gropengl.cpp, though:
Code: [Select]
#ifdef _WIN32
static ogl_extension GL_Extensions[GL_NUM_EXTENSIONS]=
{
        {0, NULL, "glFogCoordfEXT", "GL_EXT_fog_coord",0},
        ....    // Taken out to shorten.  You know what's there, anyway.
};
#elif defined unix //somebody should check weather the "NULL" is required under windows or not
// Should that really be "unix"?  Is it defined by a Makefile or compiler arg or...?
static ogl_extension GL_Extensions[GL_NUM_EXTENSIONS]=
{
        {0, 0, "glFogCoordfEXT", "GL_EXT_fog_coord",0},
        ....
};
#endif

Then there's a bunch of defines under an #ifdef _WIN32...
Code: [Select]
#ifdef _WIN32
        #define GLEXT_CALL(x,i) if (GL_Extensions[i].enabled)\
                                                                ((x)GL_Extensions[i].func_pointer)

        #define glFogCoordfEXT GLEXT_CALL(PFNGLFOGCOORDFEXTPROC, GL_FOG_COORDF)
        ....
#endif


Just wondering if any of this should be different.  They aren't in the Icculus build, obviously.  There's like a 2500 line difference between the two, any other code aside... <. .>

~Atal
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 18, 2004, 03:24:34 pm
Well, i've been diagnosing my system further, and it seems that my system still uses Mesa 4, even though i have compiled & installed Mesa 6.

I tracked this down to DRI, however, when doing make linux-solo in Mesa 6 the compilation fails (missing directory in /drivers/dri).

@Atalhlla:
IIRC you were compiling in LinuxPPC right? What are your errors? Could you PM them to me? If it's Mesa that's missing, just goto http://www.mesa3d.org

Cheers
Title: FS2_Open Linux Discussion
Post by: Atalhlla on February 18, 2004, 05:19:59 pm
Thanks, Amon, that solved the gropengl thing.  Anyway, now it dies on graphics/scaler.cpp
Code: [Select]
g++ -DPACKAGE_NAME=\"fs2_open\" -DPACKAGE_TARNAME=\"fs2_open\" -DPACKAGE_VERSION=\"3.5\" \
-DPACKAGE_STRING=\"fs2_open\ 3.5\" -DPACKAGE_BUGREPORT=\"\" -DNO_CD_CHECK=1 -DNO_NETWORK=1 -DNO_STANDALONE=1 \
-DMORE_SPECIES=1 -DNO_SOFTWARE_RENDERING=1 -DNDEBUG=1  -I. -I.    -fexceptions -I/c/dx8/include -Wno-missing-braces -Wno-multichar \
-fsigned-char -DNO_DIRECT3D -DUSE_OPENGL -g -O2 -I/usr/include/SDL -D_REENTRANT -c -o scaler.o `test -f 'graphics/scaler.cpp' || echo \
'./'`graphics/scaler.cpp
graphics/scaler.cpp: In function `void gr8_scaler(vertex*, vertex*)':
graphics/scaler.cpp:963: `palette_blend' undeclared (first use this function)
graphics/scaler.cpp:963: (Each undeclared identifier is reported only once for
   each function it appears in.)
graphics/scaler.cpp: In function `void gr8_aascaler(vertex*, vertex*)':
graphics/scaler.cpp:1205: `struct alphacolor' has no member named `table'
graphics/scaler.cpp:1216: `struct alphacolor' has no member named `table'
make[1]: *** [scaler.o] Error 1
make[1]: Leaving directory `/home/atalhlla/freespace2-ppclinux-test/fs2_open/code'
make: *** [all-recursive] Error 1

I really don't know what to make of this one...

/me waits to see if anyone 'll pull out another magical (AKA what should have been obvious) fix out.

Amon : Just to check, did you replace all the Mesa/OGL things in /usr/lib (or /usr/local/lib if you have them there, instead) and in /usr/X11R6/lib ?

~Atal
Title: FS2_Open Linux Discussion
Post by: taylor on February 18, 2004, 08:19:13 pm
Atalhlla:
My fault, got a little overzealous on the asm fixing.  I'll get a new patch out to you in the next little bit that will just apply to what you have and fix the problem.  It should only be that one file that has the problem.

Inquisitor:
This is bK's thing so I'd rather give him first go at it since he's already worked pretty hard to merge the FSO and icculus.org stuff together.  If he doesn't want to do it or doesn't have the time then I'll start work on updating it to the current CVS version in preparation for a merge.  I don't know that I can devote enough time to maintain it properly since I still don't have time to keep up with everything in FSO world, but if something breaks or needs some *nix candy coated sprinkles added on top then I'll happily do it.
Title: FSO PPC Linux Build
Post by: Atalhlla on February 18, 2004, 08:53:47 pm
Welp.  Don't know what to say about this.

Woot!  It worked!  It runs like malassass down a cold rock (about 2-4 fps on the first training mission) on this 500 MHZ PB G4 (I'm so slooowww...:( ), but it worked!  The sounds cap off alittle early, but that might just be due to the slowness.  Even if it's not, ohwell, it's minor IMO, and can be fixed later.  The important thing is that the last patch was all that was needed.  It now runs on PPC Linux.  I didn't turn off the stub outputs, so they kinda filled up the terminal, but eh. :P
(Unless compiling with out that verbosity speeds it up...)

Thank you, Taylor, Tigital, Bk, Amon, and anyone else that needs thanking.  And the rest of the FSO crew!  Woot! :D

~Atal . o O ( Specular lighting on that ship... oooooh.... )

[edit] Caveat : I still haven't tried importing pilots, yet. :O [/edit]
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 19, 2004, 02:26:08 am
Quote
Originally posted by Atalhlla
Thanks, Amon, that solved the gropengl thing.  Anyway, now it dies on graphics/scaler.cpp



Amon : Just to check, did you replace all the Mesa/OGL things in /usr/lib (or /usr/local/lib if you have them there, instead) and in /usr/X11R6/lib ?

~Atal


No, /lib only contains symlinks to the ones in /usr/X11R6/lib.
You should however run ldconfig after updating them (unless you updated with a package)

I've build a debug build, and it fails in graphics/2d.cpp here,  (line 1130, the assert function fails), so i commented out that, and recompiled & run it again, and it seems it can't locate some .tbl files (strings.tbl amongst others), so eighter my permissions are fubar, or i'm missing some files... Does this build run with a vanilla FS2 install? Or does it need some specific fs2_open vp files?

Cheers
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 19, 2004, 03:37:40 am
Taylor,

Where can i get me hands on the LinuxPPC build? Preferable with the patches already in.

Cheers
Title: FS2_Open Linux Discussion
Post by: Inquisitor on February 19, 2004, 08:03:03 am
Taylor,

bk hasn't seemed to have time due to RL issues, so, if you are willing, email me, we'll get you set up with CVS accounts and the do's and don't s of our repository :)
Title: FS2_Open Linux Discussion
Post by: taylor on February 19, 2004, 08:46:44 am
Amon_Re:
I just wanted Atalhlla to test it first so I wouldn't have to keep sending multiple patches to multiple people.  As soon as he verifies that the code for using cross platform pilot files is working then I planed to get the patch to you.

You said you had or had access to an Amiga/AmigaOS right?  I've never used an Amiga so I'm not exactly sure of the basic hardware/software but if you get SDL, OpenAL, OpenGL, gcc working on it then I think that what I've sent Atalhlla should work for you.  Though it may need a couple of extra little things.  I know that SDL has Amiga support but I don't know about OpenAL.  We'll have to work that out later if you don't already know.
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 19, 2004, 10:29:17 am
Quote
Originally posted by taylor
Amon_Re:
I just wanted Atalhlla to test it first so I wouldn't have to keep sending multiple patches to multiple people.  As soon as he verifies that the code for using cross platform pilot files is working then I planed to get the patch to you.


That shouldn't be a big issue, thx

Quote
You said you had or had access to an Amiga/AmigaOS right?  I've never used an Amiga so I'm not exactly sure of the basic hardware/software but if you get SDL, OpenAL, OpenGL, gcc working on it then I think that what I've sent Atalhlla should work for you.  Though it may need a couple of extra little things.  I know that SDL has Amiga support but I don't know about OpenAL.  We'll have to work that out later if you don't already know.


Yea i got access to it, the old ones are based on 68000 series of proccessors (motorola) and had no 3D hardware, but there were PPC upgrades and 3D cards for those available.
Also there's a new Amiga on the market (not really finished yet, the porting of the new OS is almost done, and the boards are available) that's based on G3 & G4 proccessors with AGP cards and whatnot, so the hardware should be capable of running it.

Mesa should also be possible (i know Mesa 5 exists for it, dunno about the status of Mesa 6) and SDL is, as you aready mentioned existing. openAL... now that one i don't know, what does openAL do actually?

As for the port, i wouldn't be a straight compile, that's for sure, but i know some very capable people who are intrested in porting it from LinuxPPC to AOS.

Cheers
Title: FS2_Open Linux Discussion
Post by: taylor on February 19, 2004, 11:51:09 am
Quote
openAL... now that one i don't know, what does openAL do actually?


That's for the sound.  I looked and it's supports BeOS, MacOS, OSX, Linux (UNIX).  The Linux code should work on pretty much any processor and the OSX version is going to be based on this before too much longer.  I don't know enough about AmigaOS to know if the Linux code would work on it as well.  The Linux source does have Amiga references though so I assume that it does work or just needs to be finished.

Quote
As for the port, i wouldn't be a straight compile, that's for sure, but i know some very capable people who are intrested in porting it from LinuxPPC to AOS.


Privided that a full OpenGL implementation exists and that OpenAL and SDL work then there shouldn't be too much to this.  I say "too much" in a way that means "it probably won't compile out of the box yet but could probably be fixed in a weekend".  SDL should handle video initialization, window management, key-mouse-joy input, endianess issues and basic system setup without code changes.  If OpenAL support is complete then there shouldn't be any problems there either.  The only problems that I can forsee (admitedly without knowing anything about AmigaOS) are compiler issues and some wierdness with CFILE.  I still have dreams about CFILE so there shouldn't be any real problems dealing with that and the compiler issues may not actually be issues if GNU tools are used on the Amiga.

I guess we'll find out for sure though when it's tried for the first time.
Title: FS2_Open Linux Discussion
Post by: tigital on February 19, 2004, 01:19:27 pm
Atalhlla:
Quote
Woot! It worked! It runs like malassass down a cold rock (about 2-4 fps on the first training mission) on this 500 MHZ PB G4 (I'm so slooowww... ), but it worked! The sounds cap off alittle early, but that might just be due to the slowness. Even if it's not, ohwell, it's minor IMO, and can be fixed later. The important thing is that the last patch was all that was needed. It now runs on PPC Linux. I didn't turn off the stub outputs, so they kinda filled up the terminal, but eh. :P
(Unless compiling with out that verbosity speeds it up...)


...wow!  did taylor send you the ppc changes?  I would REALLY like to see the eye-candy!  Anyway you can tar.gz me the source tree?  It'd be great to make available an OSX beta...

...in other news, I've been working on importing the project into apple's xCode, which is really cool:  zero-linking, fix & continue, distributed builds, etc...should speed things up considerably (development-wise, that is)...

Taylor:  are you running a 10.3.x install yet?  I highly recommend it:  made my 2+year old 667 tiBook seem like a new machine!
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 19, 2004, 01:23:01 pm
@Taylor

AmigaOS's default compiler is gcc so no problems there neighter, and the TCP/IP stack is *bsd based, so that shouldn't give any nightmares neighter, so i think it would be quite doable to port it, yea

Cheers
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 19, 2004, 03:16:54 pm
Good news, i got fs2 running on my linuxbox :)

Basicly there were 2 problems, Mesa 6.0 being required and it doesn't work with a vanilla install of freespace.

The fix seemed to be to run the game in windows once and updating it & then copying it to linux.

I wonder if this update can be achieved via linux... Oh well
I'll rewrite the mini howto to reflect the changes.

[edit] It seems i already mentioned this in my earlier minihowto's... argh, i guess it shows you have to RTFM :)

Cheers
Title: Mini Howto, third revision
Post by: Amon_Re on February 19, 2004, 03:31:33 pm
Incase you would like to get FS2_Open to run in linux (x86 architecture) you might find this intresting:

First grab bKtHeG's source tarball from http://ds.hamburg051.server4free.de/20031206_fs2_open_linux.tar.bz2 (http://ds.hamburg051.server4free.de/20031206_fs2_open_linux.tar.bz2) and extract the fs2_open directory.
First do the configure script ./configure -disable-networking
And after that execute make.

Incase you get compiler errors in gropengl.cpp, it's most likely because you lack an up to date version of Mesa, the current version is 6.0 and can be downloaded @ www.mesa3d.org (http://www.mesa3d.org).

You can verify this with the command glxinfo wich will report the version of OpenGL your system supports and wich extensions.
Check to see if the functions mentioned by gcc are present in the glxinfo output (eg glOpenBufferARB).

Unpack the tarball you downloaded, and do make linux-x86.

This will create the new GL libraries wich you need to install on your system.
Depending on the kind of distribution you use, these libraries might be in /lib or in /lib/X11R6/lib, eighter way, you need to replace them with the newly compiled ones, and run ldconfig

Rerun glxinfo to see if the system reports the correct version of Mesa now, if it doesn't, you might have DRI on your system, and you may be required to replace the library in /usr/X11R6/lib/tls aswell (make sure to run ldconfig afterwards).

Incase you get errors while compiling in ds.cpp, it is probably because you lack the latest CVS version of openAL.

In order to get the latest version, you should first make sure you have CVS installed.
Do the following in a shell(make sure you are online):

cvs -d:pserver:[email protected]:/usr/local/cvs-repository login

This will connect to the repository, if you are asked for a password, use "guest"
Now do the following:

cvs -d:pserver:[email protected]:/usr/local/cvs-repository co openal

This will download the repository into your current directory, so make sure you are in a temporary directory first!
Change to the directory, and read the docs for openAL.
Basicly, you'll have to do the following from within the openal directory:

cd linux
./configure --prefix=/usr/local
make
make install

Make sure you replace the old libraries in /usr/lib and that you eighter copy or link the new ones to /usr/lib

Now go back to the fs2_open directory, and run make again.

Make should now finish the compilation, and create the file fs2 (located in code/), copy this file to your freespace 2 directory.
If it doesn't, and complains about not finding -lGL, don't panic, this means you don't have a symbolic link in /usr/lib towards the correct file.
Create the symlink called libGL.so and make it point to /usr/X11R6/lib/libGL.so

Again start make from within the fs2_open directory.

In that same directory, create a textfile called fs2_open.ini and make sure it contains the following:

[Default]
Fullscreen=0
VideocardFs2open=OpenGL - Primary Display Driver(1024 x 768)
Videocard=OpenGL - Primary Display Driver(1024 x 768)
VideoApi=OpenGL

That's all, you should now be able to start fs2 with ./fs2

Extra notes, if you installed FreeSpace 2 using eg iculus's installer and get an error "error parsing strings.tbl" or "error parsing rank.tbl", try copying over your working freespace install from your windows partition, and see if that helps.
Don't have windows installed? No biggy, install the latest wine, and you can use the installer from the FreeSpace CD's.
Incase you got an error while compiling like, eg "brace-enclosed initializer used to initialize x", it is most likely because of a whacked GCC install, check that you have binaries that match each other (don't mix files from eg 2.9.2 with 3.x), and if that doesn't help, try removing & reïnstalling GCC.

With many thanks to bKtHeG, Taylor and all the others for making this available.
Title: FS2_Open Linux Discussion
Post by: taylor on February 19, 2004, 05:46:36 pm
tigital:
It's a very cut down version of your OSX patch.  A few cosmetic changes that will hopefully make for easy porting to other platforms down the road and the new pilot file loading and saving code.  It's probably not enough to even run under OSX yet and deffinitely nothing that would make it work as an APP.  I'm going to get you the new pilot code as soon as it's tested to work 100% and will send you the full FSO patch at the same time.

I wanted to wait with a full OSX patch until you gave the thumbs up on the current code.  Can't say that I want two code bases with the same bugs floating around.  Also this is a good test to determine if any bugs are just OSX related (primarily sound issues where the actual libraries are different) and can help rule out any bugs that may be due to swapping issues.

Still only have access to 10.2.x since I have to deal with what I can steal.  I probably won't get the chance to even test any code on the Mac for a few months yet so that kinda sucks.

Amon_Re:
Might want to add to that HOWTO that if you're using NVIDIA drivers to *NOT* install Mesa6 as that will screw up the NVIDIA driver installation and revert back to software rendering which is slow as hell.

A second note is that I did put in the needed code to automatically create the default ini file (using 640x480 res), ~/.fs2_open/fs2_open.ini so the hand edit shouldn't be needed.  It just has to be run once with the current user to create the files.  If you install as root then don't make an ini file in the game directory since bad things can happen with updates.  Same with pilot files, logs, and anything else that's created/modified on the fly.  Every file that the game creates after install should end up in ~/.fs2_open.  If it doesn't then it's a bug and should be fixed.

I have a Linux FS2 updater to get it to version 1.20 on my website: http://icculus.org/~taylor/freespace/updates.  Just grab and execute fs2-1.20-x86.run to update the needed files from a fresh install.
Title: Pilot testing
Post by: Atalhlla on February 19, 2004, 09:17:06 pm
*tabtabtabtabtabtabtabtab*
It ate my mouse!  Other than that,
X86 Linux pilot : the first training module plays fine up until the instructor has you match speeds with him, then the instructor just sort of wonders about... This has happened with the OSX Beta that Tigital put out, too, although it was only sometimes that it happened.  I'm wondering if it has something to do with any of the conditions for some of the things the instructor has you do...

And since it ate my mouse... Well, I'll need to try that.  Hold on a moment.

[Edit] Hey, did you know that, if it eats your mouse (but not your keyboard), you can just run ./fs2 again, and your mouse will work!
And I still need to test the Windows Pilot.  Boy, that Vasudan main hall is neat.[/edit]

~Atal
Title: FS2_Open Linux Discussion
Post by: taylor on February 19, 2004, 09:51:34 pm
Try using the --nograb option if you're playing in a window.  This will mean that you can't control your ship very well with the mouse but it shouldn't kill it either.  Typically you can just run anything that reinitializes the SDL input system to get you're mouse back, just like running the game again will do.  Also Ryan (icculus) wrote a quick little file to fix just this problem.  It's called umouse and if you can't find it with a search let me know and I can send you the source.

As far as the pilots go, if you try a fresh pilot does the instructor still wonder off?  Obviously this doesn't sound like a pilot issue but does the instructor still move around like it's following waypoints or does it just seem random?  Does he acknowledge that you matched speeds or not?  If he doesn't see that you're matching speeds then it's most likely some scripting issue but I have no idea why it would happen only with the PPC build.  It he does see it then I can think of a couple of off the wall things to check out.

tigital: did you get this fixed in the OSX build already?
Title: FS2_Open Linux Discussion
Post by: taylor on February 23, 2004, 04:45:06 pm
Worked on updating everything to the current CVS this weekend.  I want to do some more bug hunting and generic cleanup before making a new test release.  Should have something new for everyone to play with later this week.

 * Builds with networking enabled now but I don't know of a valid server to start testing the PXO code with.  Other than getting it to compile I haven't looked to bug fix or finish any missing parts so it may not even work, it could crash on first use and take half the Internet with it for all I know.  Other problems I noticed was that a PXO server is required in order to play network games, it will crash if you just want to LAN play.  This is mostly CFILE problems trying to read non-existing files that were read from a non-existing server.  I've fixed this but as it's FUBAR in the win32 build as well I don't have a way (don't have MSVC++) to test it yet.  I also have to look at a viable interface fix for the extra text on a multi-game creation screen.  I'm assuming that this is a PXO/non-PXO issue since it was previously commented out.  The code also seems rather intolerant of failures since if I give the PXO server as one of my computers, that obviously isn't running anything, it will crash.  This may just be an issue with *nix send() though so I may look at that.  I don't really want to spend too much time on this if the original PXO code is going to see the light of day, with Linux support.

 * What's the status of OGL HT&L?  It was crashing badly but it turned out to just be some NULL gr_* calls so that was easy to fix.  Most models don't show up though including missles and ships.  Particles, explosions, primary weapon fire and most debris do show up though.  But the cool glowing primaries are sweet!  I don't plan on fixing this myself for now though so hopefully there are some people actively working on this.  Also the HUD tends to disappear when HT&L is used.

 * I changed the ini file entry for video to be what is currently used in the win32 game, "OGL -(widthxheight)xbpp bits" for "VideocardFs2open" and got rid of "Videocard" and "VideoAPI".  If the entry exists but is invalid (ie. the old string) then it will be replaced with the new string and will ask the user to try running the game again and tells which file to edit to change from default resolution.  So basically this works kind of like the current win32 version does: wrong reg setting, get launcher and update setting, exit game to let user run again, tell user what happend and why.

 * Non-debug builds aren't so verbose now.  DEBUGME's are still there but most everything else is quite unless it's a debug build.  Having to look at all of that crap was annoying unless you actually wanted to know something, in which case you probably need a debug build anyway.

 * NULL does not a valid int make people, damn! :hopping: :D

 * I'm sure that I fixed a couple of small non-*nix specific issues but I can't remeber what they were off the top of my head right now.  I'll give better detail in the changes when I release something.

I still need to do a lot of cleaning before it approaches a CVS ready patch but it's coming along quickly.  About the only thing I need to figure out now is how to properly credit everybody (bK, icculus.org, etc.) since everything is kind of just mushed together at this point.

Does anyone have any complaints that I should know about?  Any bugs?  I'm going to have a quick look in bugzilla (mantis, whatever in the hell is being used now) and see if there is anything interesting.
Title: FS2_Open Linux Discussion
Post by: Kazan on February 23, 2004, 05:24:44 pm
if you want to play multi without PXO uncheck PXO and all systems need to enter the IP of one of the systems [include that system] under TCP/IP

I need to make sure i fixed the crash that was presence with PXO not properly disabling -- i think it is fixed though.


FYI: if you're making chances to the TCP/IP code in fs2openPXO then make sure it's inside the unix ifdefs so it'll merge right and I can then backmerge that into the origional fsnetd codebase that it was pulled from --- as I haven't had a chance to do any unix compat testing/fixing for a while
Title: FS2_Open Linux Discussion
Post by: taylor on February 23, 2004, 06:34:31 pm
Quote
if you want to play multi without PXO uncheck PXO and all systems need to enter the IP of one of the systems [include that system] under TCP/IP

On a LAN game it should use broadcast packets to find the servers so entering an IP is conterproductive unless required for firewalls or whatever.
Quote
I need to make sure i fixed the crash that was presence with PXO not properly disabling -- i think it is fixed though.

It's crashing with CVS HEAD for me on a fresh checkout of 10 minutes ago.  The main problem is stuff like this (in game_hacked_data()):
Code: [Select]

CFILE *tvalid_cfg = cfopen("tvalid.cfg", "rt", CFILE_NORMAL, CF_TYPE_DATA);
char *buffer = new char[cfilelength(tvalid_cfg)];

cfilelength will crash if tvalid_cfg is NULL since there is no test.  multi_update_valid_tables()  just returns if fs2open_pxo.cfg doesn't exist.  If it exists then fine but it shouldn't be a requirement for LAN play.

I added this:
Code: [Select]

   if (!Om_tracker_flag) {
      if (!Game_weapons_tbl_valid || !Game_ships_tbl_valid)
         retval = 1;
                                                                                                                     
         return retval;
    }

and then a check that tvalid_cfg != NULL for safety.  If it is NULL then something went wrong and the assumption is made the the tables are hacked.  There is this same thing in another place or two as well.  The other option was to give a return value to multi_update_valid_tables() to know whether or not it communicated with the server but I didn't want to make those types of changes on a whem.  I'm not looking at it closely but it appears that multi_update_valid_tables() will pass valid tables even if a server is not found to get the crcs from.  In that case the weapons_tbl and ships_tbl tests should be used for hacked or not, like I'm doing if the PXO button is not on (!Om_tracker_flag).
Quote
FYI: if you're making chances to the TCP/IP code in fs2openPXO then make sure it's inside the unix ifdefs so it'll merge right and I can then backmerge that into the origional fsnetd codebase that it was pulled from --- as I haven't had a chance to do any unix compat testing/fixing for a while

Since I don't have a way to test a win32 build I'm just leaving that code alone.  There actually aren't that many changes to code needed.  Most of what I changed was to #include's, just cosmetic/simplification stuff, and simplifying the #define's that didn't really need to be different between plaforms.  I also included globalincs/pstypes.h in a few places to provide endian-swapping if needed in the future and to make sure that the stubs for win32->linux stuff is used (ie. _cdecl under *nix is just "#define _cdecl" but it wasn't getting used)

I  can make a patch for all of this stuff against current CVS and post it for you if you want to take a look.
Title: FS2_Open Linux Discussion
Post by: Kazan on February 23, 2004, 06:51:24 pm
I have no control over tha LAN play thing - that is V's netcode and is SOO DIRTY that i'm afraid it'll give me AIDS

anyting that should be called only when in multiplayer should be enclosed in
if (Om_tracker_flag) { }

for the !Om_tracker_flag and the _tbl_valid falgs they should be ignored -- IIRC they're not even used by fs2openPXO (id' have to double check)

if fs2open_pxo.cfg doesn't exist and PXO is enabled the game should b1tch  -- and you're write that call to update valid tables should be enclosed in an if tracker flag
Title: FS2_Open Linux Discussion
Post by: taylor on February 23, 2004, 08:26:18 pm
The problem is that most of the code doesn't check if PXO is used or not, it just assumes that it is.  fs2open_pxo.cfg is checked for even if PXO is disabled.  If it's not found then OK but the block of code that called to check doesn't take into account that it could have failed not finding the file. Therefore it just keeps going like everything is as it should be.  This is where a return code from multi_update_valid_tables() would be nice but that means changing more than I did for it to work.

The weapon/ship table checks aren't used by your PXO code but were previously used to determine hacked tables for LAN games.  I'm using !Om_tracker_flag at the start of game_hacked_data() so that if we're not using PXO then used the weapon/ship table checks to determine hacked data and skip all of the PXO checks.  Encasing the PXO code in a (Om_tracker_flag) wasn't really needed for a 5 line fix (in this case).

Speaking long term it would be probably be better to just have multi_update_valid_tables() do all validation checking (it's already doing first pass) and return a valid/invalid to the calling function.  The calling functions are just checking again if it was actually valid or not by reading the file created by multi_update_valid_tables() which said that it was valid or not.  All that it looks like it's doing, and again I'm not looking at this real close, is that *_tables() gets name and valid status for each table, then the calling function looks through to find if there was any invalids and then calls it hacked.  If *_tables() has already found an invalid table then why does it have to check again?

You wrote all of this stuff though and other than looking enough to fix this one problem I don't have the entire picture to look at here.  There is probably more to this than I'm seeing but the short term fix so far should get LAN games going again and shouldn't have any impact on your PXO code.  I've been through the LAN code for the icculus.org stuff and there isn't a bunch to it, I'd never say that it was pretty, but it pretty much just does what it does.  I haven't seen anything network code wise that shows the PXO and LAN code interfering with each other.  The interference is in the setup before play, interface stuff and validation, but neither is difficult to fix.

I've posted a patch of just the PXO changes I made so that you can see everything that I did in context.  Grab it here: pxo_fix.diff (http://icculus.org/~taylor/misc/pxo_fix.diff).  This doesn't have all of the changes since that would require more pieces of the *nix patch but everything needed to get LAN play working should be here.  As I said previously I haven't tested this in actual network play, but it doesn't crash anymore and does allow LAN game creation.
Title: FS2_Open Linux Discussion
Post by: Kazan on February 23, 2004, 08:33:24 pm
that failing to check was an oversight on my part

the save to file hack was keeping inline with the way V did it for missions and saved some time - otherwise it would have to check against the server each time



since I am on win32 i cannot easily use a .diff
Title: FS2_Open Linux Discussion
Post by: taylor on February 23, 2004, 09:51:19 pm
Quote
the save to file hack was keeping inline with the way V did it for missions and saved some time - otherwise it would have to check against the server each time


Kind of what I figured but I wanted to check.  Still the file is accessed two times for the tables and then again for the missions.  It should be able to only do this once and save the file for each between sessions to draw from instead of hitting the server again.  I don't think that there is too much overhead the way it's done now though so I'm not going to make a big deal about it.  May be something to think about in the future if the oportunity presents itself.

Quote
since I am on win32 i cannot easily use a .diff


Didn't even think about that, sorry.  Is there something that would be easier for you to look at?  I can post the individual files I made the patch from but I doubt that would be easier for you to deal with (does MSVC have a diff utility for comparing files?).
Title: FS2_Open Linux Discussion
Post by: Kazan on February 23, 2004, 10:51:39 pm
i don't know if MSVC has a diff util...

if i give you write access to my sourceforge you can merge the changes into the server module and then I can copy the files over
Title: FS2_Open Linux Discussion
Post by: taylor on February 24, 2004, 12:27:10 am
Whatever you want is fine with me.  If you want I can commit the crash fix for LAN games and the other changes seperately to make it easier to revert later on.  Just let me know.

Also, for the non-blocking stuff in udpsocket.cpp, you should just be able to #ifdef the different recvfrom() lines and change:

Code: [Select]
recvs.fd_count = 1;
recvs.fd_array[0] = this->socket;
to:
Code: [Select]
FD_ZERO(&recvs);
FD_SET(this->socket, &recvs);

Those macros should work crossplatform.  This is how it's done in psnet2.cpp as well.  The rest of the code in the WIN32 define should work without issue on *nix.
Title: Just a little update...
Post by: Atalhlla on February 24, 2004, 08:44:55 am
I've been a little busy with things in school, lately, sorry.

It sounds like you guys are working on networking. (Yay, I can read. :) )  That would be really cool.  Anyway, the Windows pilot loaded fine, but I haven't tried the OSX pilot, yet.  I'm a little scared, cuz I saw these other files in there... (a .cfg and a .css, I think.)

Also, now that I've settled down enough to look at the ships in game... At first, it looked like they didn't have any thrusters.  Then it turned out that the thrusters had been repositioned at (0,0,0) of the ship.  I imagine that pilot's feeling pretty taosty, by now.

As for that first mission, no, the instructor doesn't ack matching his speed. :\
He does just seem to wonder around.

And with the second one, that destroyer for you to test the escort targeter, the speed and distance on the HUD get all whacked.

Ack!  Gotta go!
~Atal

[edit]
Thanks for the --nograb :D
Here are a couple of pictures after the match speed thing.
http://www.boomspeed.com/atalhlla/fso-ppc-0000.jpg
http://www.boomspeed.com/atalhlla/fso-ppc-0001.jpg
I checked the messages, and he did indeed acknowledge me matching his speed.  But just wonders aimlessly after that, it seems...

Another update:
Tried the second training.  Boy, it's a good thing I didn't try any missions.  Everyone'd have to ram eachother to death.  Did anyone else ever report any bugs with weapons not actually firing, yet still discounting from the banks?
Also, is there supposed to be an Arcadia in there? o_O
Quite frankly, though, getting this thing to even run was cool for me :P
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 25, 2004, 04:30:24 pm
Well, i did some more tests, and got hardware 3D running on Linux, but it seems that there's a problem with actually piloting the ships, at first i tought it was a mouse problem, but it seems not. What happens is that the ship just sits there rotating, perhaps a joystick related issue?

Also, when trying to goto "detail" in the options i get a hard crash

Cheers
Title: FS2_Open Linux Discussion
Post by: kasperl on February 26, 2004, 05:51:53 am
you mean rolling to it's side?

check your Z axis on any gamepads/joysticks.
Title: FS2_Open Linux Discussion
Post by: Amon_Re on February 27, 2004, 06:54:03 am
I'm not sure that it actually reads my joysticks, what commandline parameters does the linux version take btw?

Cheers
Title: FS2_Open Linux Discussion
Post by: taylor on February 27, 2004, 09:27:02 am
It should see and use the joystick by default as long as the kernel modules are loaded and you didn't run ./configure with --disable-joystick.  The commandline parameters are the same as on Windows with the addition of --nograb in the Linux version.  --nograb tells SDL not to exclusively grab the mouse and keyboard when in windowed mode.  I usually run the game with -window and --nograb.  Note that in the new release coming this weekend the --nograb option is now just -nograb, with one dash to match every other option format.

Are you doing this with Linux/PPC?  If so it's not going to work since all of the swaps aren't there unless you put them in yourself or got a patch from tigital.  The detail settings have to be swapped when read from the pilot file which is why it crashes on the detail settings screen and will crash instantly on some missions and randomly on others.  This weekend release will have support for Linux/PPC but it still needs more testing so that support may not be final.
Title: FS2_Open Linux Discussion
Post by: Atalhlla on February 28, 2004, 04:14:07 pm
I'm still trying to figure out how to get DRI working.
But I've got an ATI Radeon... :blah:
Any ideas/insights/help, Amon? :rolleyes:

~Atal
Title: FS2_Open Linux Discussion
Post by: Kazan on February 28, 2004, 06:52:36 pm
what radeon? are you using the firegl drivers? make sure to load the kernel modules
Title: FS2_Open Linux Discussion
Post by: Atalhlla on February 28, 2004, 09:41:13 pm
AFAIK, I compiled the radeon modules into the kernel.  Should I leave them as modules?

Also, this is with a Radeon Mobility (M3 AGP 2x).  I've been reading support threads, and some people seem to have gotten their to work, but I'm none the wiser on how. :blah:

And AFAIK again, I'm pretty sure I'm not using firegl drivers...

Machine :
Titanium G4 PowerBook
YellowDog Linux with kernel 2.4.20 custom
Radeon Mobility M3 AGP 2x
Title: FS2_Open Linux Discussion
Post by: Kamikaze on February 28, 2004, 10:06:34 pm
I think the mobility radeons are M6s, while M3s are the mobility rages. Are you sure it's a radeon? (try "lspci -v")
Title: FS2_Open Linux Discussion
Post by: Atalhlla on February 29, 2004, 06:21:05 am
...Whoops, right you are.  It's a Rage 128 Mobility, not a Radeon Mobility.  Gah >.<
Title: FS2_Open Linux Discussion
Post by: taylor on March 01, 2004, 12:18:35 am
OK, here is a new code release: 20040301_fs2_open_linux.tar.bz2 (http://bellsouthpwp.net/m/t/mtrs/fs/20040301_fs2_open_linux.tar.bz2)

 - It should compile file with networking support but I still haven't tested whether or not it works.  Someone let me know.

 - The "--nograb" option has been renamed to "-nograb" (one hyphen).

 - It should build and run with Linux/PPC but please test it.

 - More DevIL support (ie. it's partially working now).  I had some major problems that I could figure out and I think some were DevIL related and some were just how the game deals with data.  For now I just use DevIL to read files and load the data into memory just the way it was done before.  This is stupid and inefficient but will have to do for now.  DDS files work but TGAs don't and neither do PCX files.  TGAs may work but some weird system thing on my end could be screwing it up.  The PCX files don't seem to be handled properly by DevIL.  This could just be something I'm doing wrong though.  DevIL support is still disabled by default.

 - Something is up with models not being visable with HT&L enabled.  I haven't changed anything here or really tried to track this down.  It could just be a problem merging with current CVS and will be something that I eventually track down during cleanup.  For now though please run the game with "-nohtl" unless you like shooting at particle trails.

 - If you get any errors when running ./configure about automake versions or AC_LOCAL something then please run ./autogen.sh first.
Title: FS2_Open Linux Discussion
Post by: HellToupee on March 01, 2004, 03:23:08 pm
Reguarding the gropengl.cpp problem, i use the nvidia 5336 drivers and it dosnt have the extensions dcc chucks out, if i use mesa 6 ill lose all hardware accleration :(
Title: FS2_Open Linux Discussion
Post by: Amon_Re on March 01, 2004, 03:26:08 pm
Quote
Originally posted by Atalhlla
I'm still trying to figure out how to get DRI working.
But I've got an ATI Radeon... :blah:
Any ideas/insights/help, Amon? :rolleyes:

~Atal


Well, DRI on PPC is an unknown to me aswell, but you need the cvs tree of Mesa 6 for DRI to work, just follow the instructions on the mesa website for getting the source from cvs, and then you need to do make linux-solo, then it compiles with DRI support (installation will be like the other mesa libs you compiled), except that you'll also have drivers to copy over, if you need help let me know.

You might have to edit the Makefile, when i did it i had to delete the R200 entry (whatever that card is).

Cheers
Title: FS2_Open Linux Discussion
Post by: Amon_Re on March 01, 2004, 03:27:00 pm
Quote
Originally posted by HellToupee
Reguarding the gropengl.cpp problem, i use the nvidia 5336 drivers and it dosnt have the extensions dcc chucks out, if i use mesa 6 ill lose all hardware accleration :(


Compile Mesa 6 with hardware accelleration (grab cvs tree of mesa & do make linux-solo)

Cheers
Title: FS2_Open Linux Discussion
Post by: HellToupee on March 01, 2004, 05:55:28 pm
i dont think mesa supports nvidia cards for hardware accleration requires open source drivers.
Title: FSO bits and DRI
Post by: Atalhlla on March 03, 2004, 08:11:40 pm
taylor : ...Eheh.. You don't still want that config.log and glxinfo output, do you? :nervous:

On the other hand, I sorta have direct rendering now.  I say sorta, since yes, it is working, but I'm using a development build of XF86.. So, predictably, when I try to do anything, it crashes : P
On the other hand, if one of the builds can run FSO (and/or a number of other things.  Some of the screen savers also cause it to blow up.) without blowing up, then woot.

Amon : Thanks.  I may see about trying a CVS build of Mesa, anyway.

~Atal
Title: FS2_Open Linux Discussion
Post by: Kazan on March 04, 2004, 10:14:16 am
taylor DevIL has no problem with PCXes
Title: FS2_Open Linux Discussion
Post by: taylor on March 04, 2004, 10:46:39 am
Quote
taylor DevIL has no problem with PCXes
Well I think it's more the code than DevIL so I'm not really passing blame.  Are you trying the code I posted or something else?  The code I posted has it turned off for PCX, uncomment the USE_DEVIL_PCX define in openil/il_func.h to turn it on.

I can't get any TGAs to load, I get an IL_FILE_READ_ERROR but I'm not sure from where.  It only happens with TGAs though and everything else will load fine.

I still have a few issues with DevIL though.  You have to load the entire image just to get width and height which just wastes resources/time the way I'm using it in the game (which may not be best but reduces the amount of DevIL code throughout the source and doesn't require rendering changes).  Also with DDS files I can't figure out how to stop DevIL from decompressing the image data, it gives a pointer to the compressed data but also decompresses it and give a pointer to that as well.  This really wastes memory.  Also ilDeleteImages() doesn't free everything and using one DDS planet will lose about 18Meg of RAM.  All of these things are known by the way (except for the TGA problem, which could be me), I've been reading the DevIL forums and bug list and these were easy complaints to find.

On a slightly unrelated note, the HT&L problems all look like merge errors.  I've got most of it fixed and models are showing up now but there is still some random flakiness that I haven't tracked down yet.
Title: FS2_Open Linux Discussion
Post by: redmenace on March 04, 2004, 11:07:10 am
hey do you get the y targeting bug in linux?
Title: FS2_Open Linux Discussion
Post by: Kazan on March 04, 2004, 11:16:28 am
i am speaking from using devil elsewhere - like PCS
Title: FS2_Open Linux Discussion
Post by: taylor on March 04, 2004, 12:30:54 pm
Quote
i am speaking from using devil elsewhere - like PCS

Must be something I'm doing wrong then.  I'll get to work on it.
Title: FS2_Open Linux Discussion
Post by: taylor on March 04, 2004, 12:31:26 pm
Quote
hey do you get the y targeting bug in linux?

Umm... no.  I tried it with a bunch of ships in the reticle and then some debris.  I tried pressing it really fast a bunch and just holding it down and letting it cycle a few dozen times.  Never crashed or slowed down.  Is there another way to try and reproduce this, certain missions maybe?
Title: FS2_Open Linux Discussion
Post by: redmenace on March 04, 2004, 12:47:51 pm
hmm looks like this is a windows specific bug. We will get it eventually.
Title: FS2_Open Linux Discussion
Post by: kasperl on March 04, 2004, 12:52:31 pm
uhm, some dude tracked it down to some assembler code, he even wrote a fix. they only need to test that and throw it in CVS, AFAIK IIRC.

do a search for assembler in this forum, it;s the second result or something.
Title: That new build...
Post by: Atalhlla on March 05, 2004, 06:06:19 pm
Humm.  I tried building it.  Even though I added `--disable-networking' in the ./configure, and the `-DNO_NETWORK' is in the flags... it /is/ supposed to be ``-DNO_NETWORK=1', right?

Here's where it errored out.
Code: [Select]
if /usr/bin/gcc -DPACKAGE_NAME=\"fs2_open\" -DPACKAGE_TARNAME=\"fs2_open\" -DPACKAGE_VERSION=\"3.5\" -DPACKAGE_STRING=\"fs2_open\ 3.5\" \
-DPACKAGE_BUGREPORT=\"\" -DNO_CD_CHECK=1 -DNO_NETWORK=1 -DNO_STANDALONE=1 -DMORE_SPECIES=1 \
-DNO_SOFTWARE_RENDERING=1 -DNDEBUG=1  -I. -I.    -fexceptions -I/c/dx8/include -Wno-missing-braces -Wno-multichar -Wno-deprecated \
-fsigned-char -DNO_DIRECT3D -DUSE_OPENGL -g -O2 -I/usr/include/SDL -D_REENTRANT -MT freespace.o -MD -MP -MF ".deps/freespace.Tpo" \
  -c -o freespace.o `test -f 'freespace2/freespace.cpp' || echo './'`freespace2/freespace.cpp; \
then mv -f ".deps/freespace.Tpo" ".deps/freespace.Po"; \
else rm -f ".deps/freespace.Tpo"; exit 1; \
fi
freespace2/freespace.cpp: In function `int game_hacked_data()':
freespace2/freespace.cpp:9547: `Om_tracker_flag' undeclared (first use this
   function)
freespace2/freespace.cpp:9547: (Each undeclared identifier is reported only
   once for each function it appears in.)
freespace2/freespace.cpp:9567: `ml_printf' undeclared (first use this function)
make[1]: *** [freespace.o] Error 1
make[1]: Leaving directory `/home/atalhlla/freespace2-ppclinux-test/fs2_open-2004-03-01/fs2_open/code'
make: *** [all-recursive] Error 1
Should I just try manually removing anything that would normally be ifdef'd out?

~Atal
Title: FS2_Open Linux Discussion
Post by: taylor on March 05, 2004, 11:33:59 pm
Oopps!  Sorry about that.  I've fixed it now and will be doing a new release this weekend with other fixes all well.  Both ml_printf() and Om_tracker_flag are provided only if built with networking support.  If you don't use --disable-networking then it should build so try that.  Networking isn't  going to work yet (with x86 machines) on PPC since I haven't brought over all of the multimsgs.cpp changes but I'm in the process of doing that now.
Title: FS2_Open Linux Discussion
Post by: taylor on March 06, 2004, 08:49:32 am
For the entertainment value:
(http://bellsouthpwp.net/m/t/mtrs/fs/fso-32bit.jpg)

This is with the TGA version of the Hi-Res planets and the 32-bit background nebula from Lightspeed.  One of the problems with the TGA loading was with one of the IL->CFILE callbacks that the TGA loader was hitting.  It was passing an illegal value to cfread() and I was "correcting" it.  After figuring out exactly what it was doing it only took a one line fix.  The other issues with PCX and TGA files not showing up correctly turned out to be the absence of 32-bit support which I somehow managed to overlook.

D3D has support for 32-bit images but with it's own version of bmpman.  The bmpman used by OpenGL didn't but then the OpenGL renderer didn't support 32-bit images anyway.  That has now changed.  OpenGL should now support whatever you throw at it and bmpman is getting a quick little facelift.  Along with 32-bit support bmpman will now load files in the following order: TGA, JPG, (if -jpgtga is used), DDS (if compression is supported), PCX, old-style TGAs.  All of these formats are available under Linux only if DevIL is used.  It's still a work in progress but after some cleanup today/tonight it should be ready for everyone to try.

DevIL supports 16-bit versions of jack **** which added to the problem as well.  I think that everything in DevIL has to be either 8, 24 or 32-bit with 16-bit files being converted to at least 24-bit.  This should all be handled correctly now.  I've removed DevIL loading of PCX files since the internal code worked fine and DevIL was actually slower in most cases.  Using TGA planets is also much better than DDS since they load faster and use less memory because of the way DevIL handles DDS files at the moment.  There also looks to be a transparency problem with DDS images but since I don't much about the format I'm not sure if that's just DDS or something that's not done right in OpenGL or my usage of DevIL.

Just thought I've give an update.  All of this should be ready tomorrow.  If this message was the highlight of your day then I suggest that you stop whatever in the hell you're doing and go outside, just like I'm fixing to do.
Title: FS2_Open Linux Discussion
Post by: kasperl on March 06, 2004, 10:11:08 am
/me is a linux n00b unable to use the command line for anything, using RH9 and Knoppix.

Is it possible for someone to tell me exactly how to install this, in instructions going as close as:
point at the bottom left of your screen, then click once.
now, go one line higher, doubleclick once.

and instructions on how to make a Knoppix disc with Freespace on it? if that would work i could destribute a bootable CD with FS on it, making it awesome at LAN parties and stuff.
Title: FS2_Open Linux Discussion
Post by: taylor on March 07, 2004, 09:02:30 pm
Everyone/Anyone:  I'm about ready for a new release but I need a couple of people to volunteer to test something for me.  DevIL support is now working fine and the -jpgtga and -pcx32 options work with the Linux version.  HT&L works much better now as well though there are a couple of small glitches that are general in nature.  The problem is that I've got a couple of crashes that I can't find a good cause for.  These crashes only happen with HT&L and on particular missions.  This problem appears to be video driver related but I need help figuring that out for sure.  If you have an non-nVIDIA card or are using older nVIDIA drivers please send me a message ([email protected] ([email protected])) and I'll tell you what you need to do.

kasperl:  If you dual boot or have a Windows machine then it's much easier to install as all you would do is install the Windows version and update it to 1.20 then copy all of the VPs and the "data" directory to a folder on your Linux box.  It gets a little more complicated after this, but you will need to download a linux release from this thread and compile it.  I recommend downloading the one I posted last week (20040301_fs2_open_linux.tar.bz2 (http://bellsouthpwp.net/m/t/mtrs/fs/20040301_fs2_open_linux.tar.bz2)) and then extracting it.  If you use a recent version of Gnome or KDE then just double-click on the file and it should open the file and have an option to extract it's contents.  Open a terminal window and change to the directory you extract the above file to, then you basically need to do this: ./autogen.sh && make

After that's done copy the file code/fs2 to the directory you copied the game VPs to and, still from the terminal window, type ./fs2 and it should run.  It's probably not as simple as you wanted but I am going to work on an installer for pre-built binaries this week so it should be a lot easier for people new to Linux to play the game.
Title: FS2_Open Linux Discussion
Post by: Bobboau on March 07, 2004, 09:10:38 pm
you have write access correct?
32bit texture suport for OGL is one of the things we realy still need, that and getting specmapping to work
Title: FS2_Open Linux Discussion
Post by: Atalhlla on March 07, 2004, 10:02:33 pm
Taylor : Heh, okay, that's cool.  And the screenie is just tantilizing.  One problem, though.  If I install XF86 from source (This time the actual 4.4.0 release, not dev builds.) (after removing the Mesa libs), I have DRI... Again, only sorta.  I did try playing the older FS2 build, but it hard crashed my computer and I had to change the font dir in the XF86 config file to make it start up correctly again for some reason I can't fathom.  I tried re-compiling it, but it dies on trying to link all the object code.  That really threw me for a loop.
I haven't figured this out, and might just spring for installing linux on my dad's desktop. If his doesn't have an ATI, that is. (And he lets me.. :P)

Also, I tried installing Mesa from the CVS source, and no beans.  I didn't have DRI.  Though, it might have to do with not trying to comment out the r200 drivers.  Unfortunately, I'm spending some time back on the Mac side of my disk since I felt the sudden urge to mess around with Photoshop.

So, I'll be glad to test as always, but I might not actually be able to provide any useful feedback, as it 'll either run really slow (softwear renderer... :< ) or most likely hardcrash.  Although I've yet to build it when not having Mesa installed, so I'll need to try that.  Ofcourse, there is the off chance that I missed something and messed it all up... I seriously hope not, though.

Cheerio!
~Atal
Title: FS2_Open Linux Discussion
Post by: taylor on March 07, 2004, 10:07:37 pm
Quote
you have write access correct?

Insuisitor was setting it up, I'm not sure if he's done or not.

Quote
32bit texture suport for OGL is one of the things we realy still need, that and getting specmapping to work

There were only a few OGL changes required but it's bmpman.cpp that needed the update.  I've moved on to bug fixing at the moment but bmpman.cpp should only need a little cleaning up to be CVS ready.  I haven't made any changes that are Linux specific in either case so it does need to be tested on Windows first.  I'm using DevIL to load Targas and Jpegs and that should work under Windows without changes.  I'm not sure if you want the Windows version using DevIL though so whatever you want to do about that is fine with me.  It does require -DUSE_DEVIL=1 to include DevIL support.

What was the deal with specmapping?  I think I've only seen bits of those conversations, something about requiring newer nVIDIA cards?  The mantis bug is all that I know of the problem so what's missing?  I could never be confused with a OpenGL expert but I'll look into this a little deeper and see if there is something I can do.
Title: FS2_Open Linux Discussion
Post by: taylor on March 07, 2004, 10:19:36 pm
Atalhlla, what Linux distro are you using?  Yellowdog has hardware 3D support for a few computer/vidcard combos.  You can get the full list from the Yellowdog website.  One of the RedHat guys does a lot of work with ATI support in the RedHat releases of XFree86 if that's an option for you.  I don't know if it would help you but it's two things that might be worth looking in to.

If you want to test then send me an e-mail and I'll get you the link for the new test release.  Reproducing the bug is easy and if you hit it then you'll never get off the interface.  One thing though is that you would have to have completed the first real (non-training) mission at least once to test.  I'm not sure if you've had it working that much yet or not though.  If your dad has a Windows desktop then you could install a current release of FSO on it and play past the first mission then copy the pilot files to your Linux/PPC box and test it that way as it should have saved your progess.
Title: FS2_Open Linux Discussion
Post by: taylor on March 10, 2004, 07:46:25 am
Don't know where it's happening, don't know why it's happening, but I now know what's causing the previously mentioned crash.  It's one of the glowmaps, Fighter01-01a-glow.pcx specifically.  'file' lists it as the only file that has 300x300dpi with the others maxing out at 256x256dpi.  Could be something to that.

Anyway, I'm going to test this a little bit more this morning and if that fixed both reproduceable crashes then I'll put out an updated release before the day is over.  There are still three (two possibly related) OGL HT&L rendering bugs that I'm going to start focusing on: jump nodes don't show correctly, full nebulas only have a fog color with the actual bitmap floating off in the corner somewhere, and the hud will sometimes disappear until you fire your primary weapons or move around enough.

It's coming together nicely though.  Won't be much longer before it's caught up with the Windows version graphically.  How many people are actually using this Linux version by the way?
Title: FS2_Open Linux Discussion
Post by: taylor on March 10, 2004, 09:22:40 pm
New release: 20040310_fs2_open_linux.tar.bz2 (http://bellsouthpwp.net/m/t/mtrs/fs/20040310_fs2_open_linux.tar.bz2)

Except for some known anomalies, HT&L should be good and playable now.  Shields are working again and 32-bit texture support, including the -jpgtga and -pcx32,  is fully functional.  Some more work on the networking side especially for PPC but this isn't complete yet.  A fix for the viewport being squashed in some places and a little better memory management are there as well.

There seems to be a bigger problem with the crashing and the glowmaps.  All glowmaps should work now but the problem is somewhere in the VBO stuff.  I have disabled that for now but will try to narrow down what is giving the video drivers hell and get a proper fix in there soon.  If whoever wrote that code has any insights I'd appreciate knowing what they are.

I think that all of the Linux stuff is there and working well now and it will just be bug hunting and fixes for the few remaining OpenGL bugs left to do.  If anyone has any problems post here or in Mantis since I'm checking it regularly now.
Title: FS2_Open Linux Discussion
Post by: Kazan on March 10, 2004, 09:25:27 pm
i don't see any reason why we shouldn't use DevIL
Title: FS2_Open Linux Discussion
Post by: Atalhlla on March 13, 2004, 06:48:03 pm
Code: [Select]
if g++ -DPACKAGE_NAME=\"fs2_open\" -DPACKAGE_TARNAME=\"fs2_open\" -DPACKAGE_VERSION=\"3.5\" \
-DPACKAGE_STRING=\"fs2_open\ 3.5\" -DPACKAGE_BUGREPORT=\"\" -DNO_CD_CHECK=1 -DNO_NETWORK=1 -DNO_STANDALONE=1 \
-DMORE_SPECIES=1 -DNO_SOFTWARE_RENDERING=1 -DNDEBUG=1  -I. -I.    -fexceptions -I/c/dx8/include -Wno-missing-braces -Wno-multichar \
-Wno-deprecated -fsigned-char -DNO_DIRECT3D -DUSE_OPENGL -g -O2 -I/usr/include/SDL -D_REENTRANT -MT freespace.o -MD -MP -MF \
".deps/freespace.Tpo" \
  -c -o freespace.o `test -f 'freespace2/freespace.cpp' || echo './'`freespace2/freespace.cpp; \
then mv -f ".deps/freespace.Tpo" ".deps/freespace.Po"; \
else rm -f ".deps/freespace.Tpo"; exit 1; \
fi
freespace2/freespace.cpp: In function `int game_hacked_data()':
freespace2/freespace.cpp:9547: `ml_printf' undeclared (first use this function)
freespace2/freespace.cpp:9547: (Each undeclared identifier is reported only
   once for each function it appears in.)
make[1]: *** [freespace.o] Error 1
make[1]: Leaving directory `/home/atalhlla/freespace2-ppclinux-test/20040310/fs2_open/code'
make: *** [all-recursive] Error 1
[atalhlla@localhost fs2_open]$


It keeps dying at this point...
config command was "./configure --disable-networking".  If I try compiling with networking, it dies on linking, complaining about some of the network things. (which is prolly cuz networking isn't working in build.)

Hope this isn't just me, although it might be good if it was...

~Atal
Title: FS2_Open Linux Discussion
Post by: taylor on March 13, 2004, 07:12:27 pm
Atalhlla: Well I had fixed the NO_NETWORK stuff before but never checked it again after a couple of cvs updates.  My fault.  I've got a couple more OpenGL fixes done so when I get done with the network swaps I'll go ahead and get that all fixed and get you a new build to try.

What are the errors that you get when building with network support?  That's something I  need to get fixed quickly so that the network swaps can get tested.
Title: FS2_Open Linux Discussion
Post by: Kazan on March 13, 2004, 07:42:15 pm
taylor: game_hacked_data() is a multi function - make a version that just returns "0" if NO_NETWORK is defined

actually i think you may be able to just ifdef out the whole function
Title: FS2_Open Linux Discussion
Post by: taylor on March 13, 2004, 11:06:38 pm
Kazan: Yep, did that before.  Only for part of it though and I think there was a conflict with some of your newer stuff when I did a cvs update.  Obviously I didn't pay enough attention when dealing with the conflict and removed some of my changes.  I normally do a fresh configure and build before posting changes so I just need to make it a point to do that with and without networking support from now on.
Title: FS2_Open Linux Discussion
Post by: taylor on March 25, 2004, 02:22:22 am
I need someone to test this:

(http://bellsouthpwp.net/m/t/mtrs/fs/setup.png)

x86 only for now so if you've got PPC don't bother asking yet.  This includes DevIL support/libs and an unstripped binary so the download size is almost 10Meg.  I don't have a place that I can put this file for any real length of time so e-mail or PM me that you want to try it and I'll send you a temporary link.  If this works out for at least one person I'll put it in the "Recent Builds" topic.  This doesn't include the ability to install the game from the CD, it's only going to copy in the libs and binaries to play the game.  This also doesn't include the media VP at this time since I don't have the hosting space to do such a thing.  If there is a demand I'll try and get together a full installer that will install and update FS2 and include all files needed to run FS2_Open.

Some small but good bug fixes have been made.  No networking builds will work correctly now and I added a few fixes to avoid problems if you mix your use of network and non-network builds.  I did some small re-working of the save screen function so that when you pause the game or minimize it the screen won't turn black and also the mouse cursor save won't be distorted.  The ability to handle multiple color depths has been greatly simplified as well.  The major goal though is that both Windows and Linux binaries can be successfully built out of the same code tree for the first time.  This is a major step in getting it ready to put in CVS.

A new source release will happen once the binary release is proven to work outside of my computer.  I'm also going to release Win32 binaries at the same time to help verify some of the OpenGL fixes and to make sure that no new bugs are going to show up.
Title: FS2_Open Linux Discussion
Post by: kasperl on March 25, 2004, 03:48:57 am
If i have root acces to a RedHat 9 machine, and FS2 installed on a dir on a mounted FAT drive, all i need to do is double click and read, right? If so, sent me the link and i'll put the file up on another FTP.
Title: FS2_Open Linux Discussion
Post by: kasperl on March 25, 2004, 01:37:10 pm
crap

i ran the executable, but had some issues. it installed ok, but i didn;t read the scree completely. anyway, when i clicked ok, it did some more stuff in the command line, then it fubared my screen settings, and gave me a CTD. i hit ctrl+alt+del and re-logged in. resolution was back to normal, but i forgot what file to run, so i looked up the dir i installed it to (the one i filled in the top path box in the installer), dir being /mnt/d/freespace/scp/linux. i found a dir called FS2_open. i ran fs2_open, 1.1k large. it did the same to me as the last time.....
Title: FS2_Open Linux Discussion
Post by: taylor on March 25, 2004, 02:34:27 pm
Try running fs2_open from a terminal window.  That should give you more detail into the problem.  Also, add -window to it and it shouldn't screw up your desktop.  It should have added a menu entry for FS2_Open as well so check that and if it didn't then I'll have to figure out why.
Title: FS2_Open Linux Discussion
Post by: HellToupee on March 25, 2004, 08:02:30 pm
where can u download it?
Title: FS2_Open Linux Discussion
Post by: taylor on March 25, 2004, 09:48:30 pm
i.o is have less disk space problems since the last time I looked (only 92% full now) so I'll go ahead and post the link.  It may vanish at any time but I'll give warning first and have a new place for the files to go before that happens.

I've included some more libs that DevIL requires so hopefully that was all that kasperl was having trouble with.  Please list success for failures here so that I can get any problems fixed and if everything works then I'll add the Linux version to "RECENT SCP BUILDS".

fs2_open-3.56-20040324-x86.run (http://icculus.org/~taylor/fso/fs2_open-3.56-20040324-x86.run)
Title: FS2_Open Linux Discussion
Post by: HellToupee on March 25, 2004, 11:36:09 pm
for me the splash screenshows and then exits with segmentation fault
Title: FS2_Open Linux Discussion
Post by: HellToupee on March 25, 2004, 11:40:50 pm
fcntl: Invalid argument
fcntl: Invalid argument
segmentation fault

after that mouse control is locked, and have to ctrl alt bckspace.
Title: FS2_Open Linux Discussion
Post by: taylor on March 26, 2004, 12:43:52 am
Damn.  Alright, I'm working on it.  It's worked on the two computers that I've tried it on but both of those were running Fedora.  I'm downloading Debian Woody now to install in VMware and do the binary builds there.  I'll update this post when I've got a new installer built and uploaded.

EDIT:  Try this one: fs2_open-3.5-20040326-x86.run (http://icculus.org/~taylor/fso/fs2_open-3.5-20040326-x86.run)
Title: FS2_Open Linux Discussion
Post by: HellToupee on March 26, 2004, 05:41:51 pm
nup no luck, i woulkdnt think differnt distros matterd, i was never able to get the source to compile past gropengl.
Title: FS2_Open Linux Discussion
Post by: taylor on March 26, 2004, 09:14:20 pm
The distro switch was only to reduce the need for the newest libs, plus I've got some newer libs than what Fedora has by default.  Also I added Mesa6 libs to it so that you don't have to install them system wide to play the game and reduced the package size by at least half without removing anything.

HellToupee, what distro and version are you running?  I'd like to try and figure out why it's not working for you and get it properly fixed.
Title: FS2_Open Linux Discussion
Post by: Atalhlla on March 26, 2004, 10:28:41 pm
Oookay, I just FUBAR'd my X11... Whoops.  Unless I find something soon, I'll prolly just back up all the vital data and re-install (and perhaps try Debian or some-such.)

Cheers!
~Atal
Title: FS2_Open Linux Discussion
Post by: HellToupee on March 28, 2004, 07:42:35 pm
im running debian testing and a bit of unstable. Might it be the mesa stuff, i use nvidias drivers which wont work with mesa i think.
Title: FS2_Open Linux Discussion
Post by: taylor on March 28, 2004, 08:22:47 pm
Strange.  I tried with debian unstable and it worked fine for me.  It will try to the system wide GL libs first (nvidia drivers) and if they don't support the needed functions then it will try the included Mesa drivers.  So basically it's only going to use the included Mesa libs if you have the default XFree86 GL libs and haven't installed nvidia's driver.  I'm going to make some changes to update to the CVS version of loki_setup and setup an update site for future use and release a new installer but that's not really going to help you any.

I've tried the installer on 5 different computers now and it's worked without incident every time.  I have no clue what the problem is.  Sacrifice a goat or something and try it again.  Also, try to build a binary yourself and replace the one from the installer and see if that works.  Make sure that you aren't using any commandline options either except for "-window -nograb" in case that's part of the problem.  Try it in gdb too.
Title: FS2_Open Linux Discussion
Post by: HellToupee on March 30, 2004, 06:21:18 am
could it be that my version is the free download rip one.
Title: FS2_Open Linux Discussion
Post by: taylor on March 30, 2004, 12:13:24 pm
Could be as I've had mixed success with that version.  Putting the files in a VP would help some but if you could get the CD version then you'd be better off.  The various issues with file case are the biggest problem with the download version so a VP has helped a lot on my tests.  If you have a FAT partition on your hard drive you could try running the game from that as well.
Title: FS2_Open Linux Discussion
Post by: HellToupee on March 31, 2004, 08:22:02 pm
whats with the eth being put on the end of words like downloaded
Title: FS2_Open Linux Discussion
Post by: ChronoReverse on March 31, 2004, 09:04:10 pm
It's April 1st
Title: FS2_Open Linux Discussion
Post by: mrduckman on March 31, 2004, 09:21:56 pm
And I wish I had another PC to try FS2 on linux :(

Quote
Rebuttal originating from the wisdom of ChronoReverse
It's April 1st
Title: FS2_Open Linux Discussion
Post by: Hirnfuhler on April 13, 2004, 01:13:28 pm
Code: [Select]
WARNING: "medals.tbl(55):
Error: Required token = [$Wavefile Base:], found [$Wavefile 1: 1_badge_a.wav] .
" at parse/parselo.cpp:397
WARNING: "medals.tbl(56):
Error: Required token = [$Wavefile Base:], found [$Wavefile 2: 3_badge_a.wav] .
" at parse/parselo.cpp:397
WARNING: "medals.tbl(58):
Error: Required token = [$Wavefile Base:], found [$Promotion Text:] .
" at parse/parselo.cpp:397
WARNING: "medals.tbl(58):
Error: Required token = [$Wavefile Base:], found [XSTR("For having attained an out] .
" at parse/parselo.cpp:397
WARNING: "medals.tbl(62):
Error: Required token = [$Wavefile Base:], found [$end_multi_text] .
" at parse/parselo.cpp:397
WARNING: "Error: Unable to find required token [$Wavefile Base:]
" at parse/parselo.cpp:504
ERROR: "Error parsing 'medals.tbl'
Error code = 1.
" at stats/medals.cpp:346


This is error code prom latest fs2 installer.

Lst installer just shows splash and dies. And locks my mouse...
Title: FS2_Open Linux Discussion
Post by: mrduckman on April 13, 2004, 03:42:20 pm
Perhaps you should try to compile it yourself.  Or perhaps is a bug in both the installer's binary and the code.

Let us know if it happens again.
Title: FS2_Open Linux Discussion
Post by: Hirnfuhler on April 14, 2004, 11:33:28 am
I tryed to compile. 2004* version - gets error while compile.

2003* doesn't work at all. :(

I tryed to build icculus CVS fs2 - works great, but it doesn't see data/ dir with WC - Saga....
Title: FS2_Open Linux Discussion
Post by: taylor on April 14, 2004, 11:50:09 am
What are the compile errors with the 2004* version?  You do need Mesa6 or NVIDIA drivers installed to not get OpenGL errors.

For the icculus.org version the directories are case sensitive and match the originals.  In other words data/ should be Data/, data/tables/ should be Data/Tables/, etc.  Basically just capitalize the first letter of each directory and you should be fine.  You could also try putting the data/ directory in a VP.  With the icculus.org version just type "make cfilearchiver" and it will make the utility to create VPs.  Remember the path to the cfilearchiver binary and then go to the game directory with data/ in it and type "/cfilearchiver mod_wcsaga data", where mod_wcsaga will be the name of the newly created VP and data will be the directory to create the VP from.  Just make sure before doing this that data/ doesn't contain any other VPs and you shouldn't have any problems.  Start the game as normal and it will use the mod data first.  If you want to return to normal FS2 then just move mod_wcsaga.vp to another directory.
Title: FS2_Open Linux Discussion
Post by: Hirnfuhler on April 14, 2004, 12:01:28 pm
I have nvidia-53.28 drivers.

20043010 compile error:
Code: [Select]
In file included from globalincs/pstypes.h:331,
                 from anim/animplay.h:118,
                 from freespace2/freespace.cpp:901:
windows_stub/config.h:164: warning: malformed `#pragma pack'
windows_stub/config.h:187: warning: malformed `#pragma pack'
freespace2/freespace.cpp: In function `int game_hacked_data()':
freespace2/freespace.cpp:9547: implicit declaration of function `int ml_printf(...)'
make[1]: *** [freespace.o] Error 1
make: *** [all-recursive] Error 1
-DNDEBUG=1  -I. -I.    -fexceptions -I/c/dx8/include -Wno-missing-braces -Wno-multichar -Wno-deprecated -fsigned-char -DNO_DIRECT3D -DUSE_OPENGL -g -O2 -I/usr/include/SDL -D_REENTRANT -c -o freespace.o `test -f 'freespace2/freespace.cpp' || echo './'`freespace2/freespace.cpp
make[1]: Leaving directory `/home/anton/1/fs2_open/code'
Title: FS2_Open Linux Discussion
Post by: Hirnfuhler on April 14, 2004, 12:07:43 pm
Well. Tryed to run cvs fs2 with Saga capitalized Data dir etc.

It writes to stderr lots of Parse mesgs and in the end writes this:
Assertion: (src/ship/ship.cpp:1627) hull_percentage_of_hits > 0.0f

FS2 shows splash, segfault and lock mouse.
Title: FS2_Open Linux Discussion
Post by: taylor on April 14, 2004, 12:23:39 pm
Edit Makefile and uncomment the "#CFLAGS+=-DNDEBUG" line to get rid of most of the stderr messages.  Also run it with the "-w -g" options and it will run in a window and shouldn't lock the mouse.  I haven't checked but if WC - Saga requires FS2_Open then it's not going to work with the icculus.org version.

Back to the 2004* version:

I really need to get a new source release out since a lot of bugs have been fixed, including this one...

Did you configure with --disable-networking?  That will cause the problem.  You can either edit freespace.cpp and in the game_hacked_data() function put "#ifndef NO_NETWORKING" after the first line (int retval=0) and "#endif" before the last line (return retval) and it should fix the problem.  You could also just do a "make clean" and then ./configure again so that networking is enabled.
Title: FS2_Open Linux Discussion
Post by: Hirnfuhler on April 14, 2004, 12:27:29 pm
Yes. i ./configured with --disable-networking.
Tryed to ifdef NO_NETWORKING.

New error appeared:
Code: [Select]

In file included from globalincs/pstypes.h:331,
                 from anim/animplay.h:118,
                 from freespace2/freespace.cpp:901:
windows_stub/config.h:164: warning: malformed `#pragma pack'
windows_stub/config.h:187: warning: malformed `#pragma pack'
freespace2/freespace.cpp: In function `int game_hacked_data()':
freespace2/freespace.cpp:9547: implicit declaration of function `int ml_printf(...)'
make[1]: *** [freespace.o] Error 1
make: *** [all-recursive] Error 1
Title: FS2_Open Linux Discussion
Post by: Hirnfuhler on April 14, 2004, 12:37:03 pm
Jeez. Forgotten that i have to enable networking. Enabled. Great. Now it looks like that:
Code: [Select]
In file included from globalincs/pstypes.h:331,
                 from graphics/gropengl.cpp:589:
windows_stub/config.h:164: warning: malformed `#pragma pack'
windows_stub/config.h:187: warning: malformed `#pragma pack'
graphics/gropengl.cpp: In function `unsigned int opengl_create_vbo(unsigned int, void **)':
graphics/gropengl.cpp:4713: implicit declaration of function `int glGenBuffersARB(...)'
graphics/gropengl.cpp:4718: `GL_ARRAY_BUFFER_ARB' undeclared (first use this function)
graphics/gropengl.cpp:4718: (Each undeclared identifier is reported only once
graphics/gropengl.cpp:4718: for each function it appears in.)
graphics/gropengl.cpp:4718: implicit declaration of function `int glBindBufferARB(...)'
graphics/gropengl.cpp:4719: `GL_STATIC_DRAW_ARB' undeclared (first use this function)
graphics/gropengl.cpp:4719: implicit declaration of function `int glBufferDataARB(...)'
graphics/gropengl.cpp: In function `void gr_opengl_destroy_buffer(int)':
graphics/gropengl.cpp:4803: implicit declaration of function `int glDeleteBuffersARB(...)'
make[1]: *** [gropengl.o] Error 1
make: *** [all-recursive] Error 1
Title: First try
Post by: mrduckman on April 16, 2004, 11:03:13 am
I've compiled the last Icculus' CVS build and tried. It works quite well.

What was odd is that I don't get the briefings voices played before the mission. I haven't checked if there are debriefings yet.
But the in-mission voices work well.

System specs:
Linux Kernel 2.6.5
processor      : Celeron (Mendocino)
cpu MHz         : 501.163
MemTotal:       252364 kB
GPU: NVidia TNT2 Pro (32Mb)
Lastest NVidia driver
SB AWE64 (without midi, I've to figure why the driver doesn't attach /dev/sequencer yet)

I will continue checking later today and see if I can get the joystick working...

I would like to ask if it would be possible to place the debug output to a file (debug.log, i.e.) instead of stdout.
There are quite a lot of debugging I'd like to do and a very short terminal buffer :P
Title: FS2_Open Linux Discussion
Post by: taylor on April 16, 2004, 11:40:54 pm
Hirnfuhler: I've seen that problem before but I'm drawing a blank as to what I did to fix it.  I think it was just some wierd change to the gl headers in NVIDIA's newest drivers and I went back a version.  Download this (http://icculus.org/~taylor/fso/testing/nv-ogl-hdr.tar.gz) and copy the two headers into /usr/include/GL.  If that isn't enough to get it going let me know.

mrduckman: Briefing/Debriefing vioces and music don't work in the Linux versions yet.  I had started on the code but moved on to other problems before getting very far.  Someday it will get done but I don't know when.  For the debug output you can either build a non-debug version (which I recomend) or just start it like this "./freespace2 &>debug.log" and that will direct all of the debug spew to debug.log.  If you need that debug spew then that's fine but debugging symbols are built into the binary and as long as you don't run "strip" on it debugging in gdb would work well.
Title: FS2_Open Linux Discussion
Post by: mrduckman on April 17, 2004, 06:49:07 am
I've to say you did a fine job anyway. The game runs quite smoothly. Too bad I couldn't get my MS Force Feedback to work on the 2.6.5. :(
Title: FS2_Open Linux Discussion
Post by: Hirnfuhler on April 17, 2004, 11:49:46 am
taylor: compiled fine (_endthread() was withaout arg, i gave it - don't remember what.. :) ).

Doesn't work.. :( I'm trying to start demo:
Code: [Select]

WARNING: "medals.tbl(55):
Error: Required token = [$Wavefile Base:], found [$Wavefile 1: 1_badge_a.wav] .
" at parse/parselo.cpp:397
WARNING: "medals.tbl(56):
Error: Required token = [$Wavefile Base:], found [$Wavefile 2: 3_badge_a.wav] .
" at parse/parselo.cpp:397
WARNING: "medals.tbl(58):
Error: Required token = [$Wavefile Base:], found [$Promotion Text:] .
" at parse/parselo.cpp:397
WARNING: "medals.tbl(58):
Error: Required token = [$Wavefile Base:], found [XSTR("For having attained an out] .
" at parse/parselo.cpp:397
WARNING: "medals.tbl(62):
Error: Required token = [$Wavefile Base:], found [$end_multi_text] .
" at parse/parselo.cpp:397
WARNING: "Error: Unable to find required token [$Wavefile Base:]
" at parse/parselo.cpp:504
ERROR: "Error parsing 'medals.tbl'
Error code = 1.
" at stats/medals.cpp:346


Same as from installer....

I've got a question: does FS2_Open work with demo?
Title: FS2_Open Linux Discussion
Post by: Christoph_Berg on May 03, 2004, 04:24:54 pm
Just compiled the Linux version and I must it works really nice. You did a fine job. It's really good to see such a nice game on Linux.

One Question: I read before that the voices are not working in the briefings, but is it normal that music is not working throughout the whole game?
Title: FS2_Open Linux Discussion
Post by: mrduckman on May 03, 2004, 04:53:03 pm
AFAIK, they've been taken "offline" from the game.
Voices and sound effects should be working well.
Title: FS2_Open Linux Discussion
Post by: taylor on May 03, 2004, 06:48:13 pm
Briefing voices and music use the same code, they are both streaming.  That code isn't finished yet but is one of a handful of things remaing on my list.

A log of bug fixes are done.  We've got some command line help now ("./fs2 -h" would print out all available options) and more things are fixed then I can count.  I'm working as hard as I can on the remaining things to do and will put out a new 3.6 build shortly after it's released (on or close to May 9th).  I'll try and get as many todo list items done as possible before the new build is released.  The Linux code should go in CVS pretty soon after 3.6 is tagged.  After that everyone can keep up-to-date by typing "cvs up" ;)

Things left to do are (in priority order): finish networking changes to be fully PPC compatible, streaming audio, code standalone server with GUI, make a GUI launcher similar to windows version that will also be OSX compatible, figure out why the installer seems to work for no one but me.
Title: FS2_Open Linux Discussion
Post by: mrduckman on May 03, 2004, 07:01:25 pm
Uh? The installer? I used the installer at work and worked well.
Send me the last one (or its URL) to my address and I'll check it next thrusday night. I'm working late.. (Actually Wed, since 0 to 8)
Title: FS2_Open Linux Discussion
Post by: taylor on May 03, 2004, 08:15:46 pm
Quote
Originally posted by mrduckman
Uh? The installer? I used the installer at work and worked well.
Send me the last one (or its URL) to my address and I'll check it next thrusday night. I'm working late.. (Actually Wed, since 0 to 8)

Hmm, all I remember hearing were problems.  If it works then great.  Just go to http://icculus.org/~taylor/fso/ to get at all of my FSO files.  The latest installer should be in that directory or under "testing" though I haven't updated since the last one.  Been too busy bug fixing :)
Title: FS2_Open Linux Discussion
Post by: taylor on May 03, 2004, 08:22:19 pm
Quote
Originally posted by Hirnfuhler
I've got a question: does FS2_Open work with demo?

I missed this question for some reason, sorry about that.

The answer is no, sort of.  It needs to be compiled specially for the demo version and there isn't a way to do that yet.  I don't know how well FSO would run as a demo version so I'll test it but you would be much better off getting the retail version.  If you don't then you won't be able to play all of the cool mods out there.

The errors you got would probably be because of demo data rather than retail.  If you got those errors with retail data then left me know so I can get it worked out.
Title: FS2_Open Linux Discussion
Post by: Christoph_Berg on May 04, 2004, 02:02:30 am
Quote
We've got some command line help now ("./fs2 -h" would print out all available options) and more things are fixed then I can count.


Well, would it be a problem for you to implement the command line options with double dashes, because most *NIX applications provide these.

I was a bit irritated that fs2 gave me "unrecognized option" when I typed --help. But a short look in the code cleared it.
Title: FS2_Open Linux Discussion
Post by: taylor on May 04, 2004, 02:34:44 am
Quote
Originally posted by Christoph_Berg
Well, would it be a problem for you to implement the command line options with double dashes, because most *NIX applications provide these.

I thought about it since I did that for the icculus.org version but in this case decided against it.  The code as is doesn't work with double dashes so would have to be changed a little.  That's not difficult, especially since I did that for icculus.org, but the options will deviate from the Windows versions and that means a lot more work for me as time goes on.  The way it's done now uses the Windows options without requiring Linux specific changes so that when a new option is added (quite often) I don't have to do any updating.  The new option would automatically appear in help and be able to be used.

And as far as -h/--help goes I'm actually cheating.  I haven't added those options, just changed the output from the "unrecognized option" thing to a formatted list of available options. Using --linustorvalds would give the same result since that isn't a valid option, for some reason. ;)

This is a compromise on the Linux side to keep the workload down as far as maintenance goes.  I'm getting on to Windows people for breaking g++ compiles, using mixed case filenames and other minor annoyances so it's a two way street.
Title: FS2_Open Linux Discussion
Post by: Christoph_Berg on May 04, 2004, 02:55:42 am
Well, then it's okay. But if I type in an unrecognized option, does the programm than still continue? In my build it starts FreeSpace, but it would perhaps be good to exit the program, because if you just make a little typo, you would need to exit the program and start again.
Title: FS2_Open Linux Discussion
Post by: taylor on May 04, 2004, 08:16:25 am
Quote
Originally posted by Christoph_Berg
Well, then it's okay. But if I type in an unrecognized option, does the programm than still continue? In my build it starts FreeSpace, but it would perhaps be good to exit the program, because if you just make a little typo, you would need to exit the program and start again.

Yeah, it exits like you would expect.  There are quite a few options printed out, but it has a similar output to regular Loki (and stuff by icculus) titles. Along with the commandline options it has links to the website, forum and mantis.
Title: FS2_Open Linux Discussion
Post by: Christoph_Berg on May 04, 2004, 03:25:13 pm
Just a little question that appeared in my mind: Is or will it be possible to specify the path where FreeSpace2 searches for the data files? It's just because I like to put my game executables in /usr/local/games folder and the data files which belong to this particular game in /usr/local/share/games/the_game_dir.
Title: FS2_Open Linux Discussion
Post by: taylor on May 04, 2004, 03:39:48 pm
Quote
Originally posted by Christoph_Berg
Just a little question that appeared in my mind: Is or will it be possible to specify the path where FreeSpace2 searches for the data files?

Nope.  The game binary has to be in the same directory as the data and that directory has to be current when the binary is run.  All you really need though is to use a shell script to change directories and run the game binary.  I do that with the stuff that's in the installer although both files are in the same directory.  The shell script can then have a symlink anywhere you want.
Title: FS2_Open Linux Discussion
Post by: taylor on May 19, 2004, 10:26:54 pm
New release is here: (Linux/Windows 20040519 test) (http://www.hard-light.net/forums/index.php/topic,23707.0.html)

Test it out and let me know how it works for everyone.
Title: FS2_Open Linux Discussion
Post by: taylor on May 30, 2004, 08:17:22 pm
Anyone with and AMD64 (x86_64) machine and 64-bit os, please send me an e-mail if you are interested.  I just might have something that you would be interested in... ;7
Title: FS2_Open Linux Discussion
Post by: Kazan on July 23, 2004, 10:09:47 am
taylor... the configure stuff, etc in the current CVS doesn't work...

help :D
Title: FS2_Open Linux Discussion
Post by: taylor on July 23, 2004, 10:51:50 am
Quote
Originally posted by Kazan
taylor... the configure stuff, etc in the current CVS doesn't work...

Under what OS?  With MinGW you need to have at least autoconf 1.8+ and automake 2.54+.  Most of the Linux code still isn't in CVS so that's not going to build, too many gcc compatibility problems.  The autoconf stuff in CVS hasn't been updated for OSX support yet either.
Title: FS2_Open Linux Discussion
Post by: Kazan on July 23, 2004, 11:11:33 am
Fedora Core 2 - kernel 2.5.5
Title: FS2_Open Linux Discussion
Post by: taylor on July 23, 2004, 01:27:54 pm
Quote
Originally posted by Kazan
Fedora Core 2 - kernel 2.5.5

2.6.5 I hope ;)

Just go to http://icculus.org/~taylor/fso/testing and grab the newest tarball (I think there is only one).  It's not current CVS even from the date I posted it but it should work for you.  I think it's missing WMCoolmon's hud stuff and Bob's index buffer code.  You might have a slight interest in the networking changes (multimsgs.cpp mainly) that allow multi-platform communications though.

That tarball was mainly for OSX testing though so there may be some problems that I've since fixed.  It does have some of the new pilot code though so backup if needed since they will break with older builds.  You can try doing a cvs update on it but you'll get lots of rejects and build errors, always happens, I've learned to live with it.
Title: FS2_Open Linux Discussion
Post by: Atalhlla on July 29, 2004, 01:55:59 am
Well, two things here.  I still haven't the darndest how to get DRI working with out the screen going all plasma-ie.

On the other hand, I do have a working (gentoo) linux install, and a working X11.  So, not all is lost, if I can tolerate 5 FPS... :P

Anyway, I'll try out the most recent on here..
Title: FS2_Open Linux Discussion
Post by: Kazan on July 29, 2004, 09:50:44 am
it was 2.6.5 - now i have 2.6.6-1 -- my freaking DGA doesn't work (X.org problem and/or radeon driver problem) so i have no access to accellerated SDL surfacves


Atalhlla: what video card
Title: FS2_Open Linux Discussion
Post by: Atalhlla on July 29, 2004, 10:41:30 am
Rage128 Mobility.  I followed the little thingy on the FAQ on the Gentoo site, but nothing happened.  Next 'll be Mesa, if I need to...
Title: FS2_Open Linux Discussion
Post by: Kazan on July 29, 2004, 10:45:30 am
it's a rage mobility.. that's your problem

go find the RAGE Faq (and stop using bloody gentoo)
Title: FS2_Open Linux Discussion
Post by: DW-Raven on November 26, 2004, 04:37:00 pm
Kazan...my medals and stats have been screwed with on the list and on scp..is there a way to restore them?  please let me know.

 DW-Raven
Title: FS2_Open Linux Discussion
Post by: Inquisitor on November 27, 2004, 09:30:00 am
DW Raven: Wrong thread. You can't jsut reply to any random thread with a question. Unless you are using a linux build?

As for your medals, when you post again, though i expect a PM might be more appropriate, you need to give me ALOT more information other than "they are screwed"

PM me your pilot name, your account names, and exactly what is wrong and when it started being "screwed."

Thanks.

-edit-

You seem to have 5 different pilots.
Title: FS2_Open Linux Discussion
Post by: theswede on November 29, 2004, 05:42:37 pm
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.
Title: FS2_Open Linux Discussion
Post by: Inquisitor on November 30, 2004, 07:58:33 am
Taylor's the man to answer that one.
Title: FS2_Open Linux Discussion
Post by: theswede on November 30, 2004, 09:01:55 am
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 ...
Title: FS2_Open Linux Discussion
Post by: taylor on November 30, 2004, 10:39:42 am
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?
Title: FS2_Open Linux Discussion
Post by: theswede on November 30, 2004, 10:53:02 am
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.
Title: FS2_Open Linux Discussion
Post by: theswede on November 30, 2004, 03:08:09 pm
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.
Title: FS2_Open Linux Discussion
Post by: castor on December 10, 2004, 01:37:34 pm
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!
Title: FS2_Open Linux Discussion
Post by: taylor on December 10, 2004, 03:15:24 pm
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. :)
Title: FS2_Open Linux Discussion
Post by: castor on December 18, 2004, 12:30:31 pm
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!
Title: FS2_Open Linux Discussion
Post by: taylor on February 03, 2005, 07:24:46 am
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.
Title: FS2_Open Linux Discussion
Post by: Christoph_Berg on February 06, 2005, 04:23:11 am
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?
Title: FS2_Open Linux Discussion
Post by: taylor on February 06, 2005, 04:41:27 am
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.
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on February 06, 2005, 07:04:17 am
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).
Title: FS2_Open Linux Discussion
Post by: taylor on February 06, 2005, 11:58:01 pm
http://www.hard-light.net/forums/index.php/topic,30339.msg622518.html#msg622518

...Get builds here.
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on February 28, 2005, 10:14:51 am
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...
Title: FS2_Open Linux Discussion
Post by: taylor on February 28, 2005, 10:28:55 am
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.
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on February 28, 2005, 12:01:54 pm
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
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on February 28, 2005, 01:47:32 pm
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...
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on March 01, 2005, 05:56:14 am
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'
Title: FS2_Open Linux Discussion
Post by: taylor on March 01, 2005, 11:48:09 am
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.
Title: FS2_Open Linux Discussion
Post by: taylor on March 01, 2005, 09:16:44 pm
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.
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on March 02, 2005, 06:12:02 am
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)
Title: FS2_Open Linux Discussion
Post by: taylor on March 02, 2005, 10:21:39 am
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...
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on March 02, 2005, 12:32:23 pm
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
Title: FS2_Open Linux Discussion
Post by: taylor on March 02, 2005, 01:41:57 pm
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.
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on March 02, 2005, 03:26:59 pm
@taylor:
You misunderstood!
The second problem is not in all NEBULA missions, it is in ALL missions...
No matter if nebula or non-nebula...
Title: FS2_Open Linux Discussion
Post by: taylor on March 02, 2005, 03:50:14 pm
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)?
Title: FS2_Open Linux Discussion
Post by: taylor on March 03, 2005, 06:12:59 pm
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).
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on March 06, 2005, 07:00:16 am
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)
Title: FS2_Open Linux Discussion
Post by: taylor on March 06, 2005, 10:44:08 am
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.
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on March 07, 2005, 06:02:06 am
Well... This quick fix didn't help...
Same error :(
Hmm... I guess I'll wait till it's fixed in CVS ;)
Title: FS2_Open Linux Discussion
Post by: taylor on March 10, 2005, 01:58:27 am
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.
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on March 14, 2005, 02:03:01 pm
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...
Title: FS2_Open Linux Discussion
Post by: taylor on March 14, 2005, 04:20:49 pm
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
Title: FS2_Open Linux Discussion
Post by: Alpha0 on March 15, 2005, 03:20:59 am
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.
Title: FS2_Open Linux Discussion
Post by: taylor on March 15, 2005, 10:50:57 am
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.
Title: FS2_Open Linux Discussion
Post by: WMCoolmon on March 19, 2005, 11:52:41 pm
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)
Title: FS2_Open Linux Discussion
Post by: taylor on March 20, 2005, 12:43:10 am
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.
Title: FS2_Open Linux Discussion
Post by: WMCoolmon on March 20, 2005, 07:00:11 pm
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
Title: FS2_Open Linux Discussion
Post by: taylor on March 20, 2005, 08:19:54 pm
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.
Title: FS2_Open Linux Discussion
Post by: WMCoolmon on March 20, 2005, 08:33:17 pm
Well, everything but gnome-vfs2 is available from the Yoper apt tree. I'm force-compiling kdevelop (make -k, woo) now, but I'm not real optimistic about it working. :p

I use KDE mostly because it looks nicer and Gnome doesn't seem to have any edge in speed/size. (From what I've heard; I haven't used it in awhile)

Although my requirements for a desktop are pretty low - a fast way to access programs, and stability/speed. I'd love a minimalist WM like Fluxbox, but with an icon list. It'd probably cut my system's startup time in half.

Actually, I guess there is one other thing - consistent style. I love consistent style, globally settable from the control panel. Most excellent at night. ;)
Title: FS2_Open Linux Discussion
Post by: taylor on March 20, 2005, 08:45:32 pm
Strangely those are the reasons I use Gnome.  In my experience it's slightly faster (in feel at least) than KDE.  The themes are great so you can make it look as strange or as clean as you want (http://art.gnome.org) and it's pretty flexible in it's layout.  The Gnome HIG helps make sure apps will have a consistent look and feel though it is voluntary and older apps never used it in the first place.  KDE has done a lot of work in the area too but without having used a recent version very much I can't give a good comparison.  KDE exposes a lot more settings to the user than Gnome does though so in it you would have to do a bit more hunting for all of those cool options.

Did you ever try Xfce (http://www.xfce.org)?  It's a lot smaller than Gnome and KDE but still follows the same basic app design and functionality guidelines (freedesktop.org).  It's sort of OSX meets CDE which has an appeal.
Title: FS2_Open Linux Discussion
Post by: mrduckman on March 20, 2005, 08:48:06 pm
Hmm. Would it be possible to have a FS2 Open Linux Forum? I think this thread got quite big.
Title: FS2_Open Linux Discussion
Post by: Darwood on March 20, 2005, 11:06:51 pm
Quote
Originally posted by taylor
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.


So how is the work going on the OS X port?  Using the CVS source I was able to get a compile done for OS X with a few issues.  OpenGl HT&L doesn't appear to compile to well (it seems ./configure doesn't like OS X's opengl since some procedures are missing from the header) which I think is the reason that other features (collisions, weapon effects, etc.) are missing (of course this could be due to how the compile from the ./configure is set up)  Another thing I noticed is I couldn't get fs to work in full screen.

I'm just interested in which of these issues are already fixed and not in CVS so I don't go about trying to fix something that is already fixed.

Thanks

Also is there a good place that OS X info is shared?  I couldn't find too much on the forums here.
Title: FS2_Open Linux Discussion
Post by: taylor on March 20, 2005, 11:45:10 pm
Quote
Originally posted by mrduckman
Would it be possible to have a FS2 Open Linux Forum?

I was thinking the same thing last week.  I've been meaning to ask Goober about that but I have pretty much zero time for FS2_Open hacking lately so it's not high on my todo list.

Quote
Originally posted by Darwood
So how is the work going on the OS X port?

There is a working version but I'm going to have it for download until after a little more testing is done.  tigital is working on it, as he's a bit more OSX friendly than I, and we have this rather strange delay between e-mails.  It's something of a long standing joke.  Since CVS keeps breaking for the Linux/OSX side it takes a bit of time for me to update him on the fixes and him to get back to me.

The only real problem at this point is Apple's OGL support.  You pretty much need 10.3.6 to get the thing to work right and that's not cool.  We're trying to work on the exact requirements and get it all tested.  Maybe tigital will respond here but if not I'll try and do a bit better job of keeping you in the loop.
Title: FS2_Open Linux Discussion
Post by: Darwood on March 20, 2005, 11:59:47 pm
Quote
Originally posted by taylor
The only real problem at this point is Apple's OGL support.  You pretty much need 10.3.6 to get the thing to work right and that's not cool.  We're trying to work on the exact requirements and get it all tested.  Maybe tigital will respond here but if not I'll try and do a bit better job of keeping you in the loop.


Great, thanks for the response.  Also let me know if there is anything that I could help with.  Unfortunately I don't know as much as I should about OS X programming and OpenGL but I need to learn.  All the java programming I do makes Darwood a dull boy.

So from your response I take it that the changes aren't in CVS yet?
Title: FS2_Open Linux Discussion
Post by: taylor on March 21, 2005, 12:32:23 am
Quote
Originally posted by Darwood
So from your response I take it that the changes aren't in CVS yet?

All but a few minor changes are already in CVS.  The main problem is that it just doesn't build properly from the makefile.  If you make a project for it in ProjectBuilder or XCode then it should run basically ok.  I'm still missing the float swaps (total of 2 lines) in CVS though I have it right in my local code tree.  The networking code is still not compatible but I think tigital might fill in the few bits that are still missing there.

If you want to make the project file for yourself then PM me and I'll get you the missing float swaps and the fixes for Linux/OSX building that I haven't put in CVS yet.  I just don't have time to get everything updated but if you want to do a little grunt work on your side then I'll get you the other changes so that you can have single player at least.  Just remember to have and up-to-date 10.3 for everything to be enabled.
Title: FS2_Open Linux Discussion
Post by: Darwood on March 21, 2005, 12:49:56 am
Quote
Originally posted by taylor
If you want to make the project file for yourself then PM me and I'll get you the missing float swaps and the fixes for Linux/OSX building that I haven't put in CVS yet.  I just don't have time to get everything updated but if you want to do a little grunt work on your side then I'll get you the other changes so that you can have single player at least.  Just remember to have and up-to-date 10.3 for everything to be enabled.


Thanks again for the response.  I have no problems with making my own project file or doing some grunt work.  Once I get things set up and running I'll PM you.
Title: FS2_Open Linux Discussion
Post by: mrduckman on March 21, 2005, 04:11:31 am
Quote
Originally posted by taylor

I was thinking the same thing last week.  I've been meaning to ask Goober about that but I have pretty much zero time for FS2_Open hacking lately so it's not high on my todo list.
 


I'll take care of this, then, taylor. :)

BTW, I'll be back online in the next ~2 hours when I'll be at work.
Title: FS2_Open Linux Discussion
Post by: tigital on March 22, 2005, 12:24:28 pm
Quote
Originally posted by taylor

All but a few minor changes are already in CVS.  The main problem is that it just doesn't build properly from the makefile.  If you make a project for it in ProjectBuilder or XCode then it should run basically ok.  I'm still missing the float swaps (total of 2 lines) in CVS though I have it right in my local code tree.  The networking code is still not compatible but I think tigital might fill in the few bits that are still missing there.


Hey ya'll!

...long time since I've been able to work on freespace, but I've managed to sneak in some time on it the last week...basically, you can build it via configure and hand editing the makefile, but that doesn't produce a very usable app:  the windows never get "focus"...so, I went ahead and made an xcode project, and it runs (thanks for the files taylor!), but I'm not seeing any models, and it crashes...

...last night I did some heavy searching, and am now focusing on the modelread code, especially the glow/vertex_buffer/speculartexture stuff:  since this is new to this project, maybe that's where the problem lies?

...anyway, taylor, which float swaps are you talking about being missed?  This could explain alot!  Also, the latest cvs has some call to auxSphereSolid(), which seems to be a windows only glaux.h call...I've just #ifdef'ed it out for the moment...

...looking forward to get this out there!
Title: FS2_Open Linux Discussion
Post by: taylor on March 22, 2005, 12:40:58 pm
Quote
Originally posted by tigital
...anyway, taylor, which float swaps are you talking about being missed?  This could explain alot!

The ones for cfread_float() and cfwrite_float().  I think that's about it.  I'll get that added to CVS later today but you can go ahead and make that change to see if it's the only model reading problem.  I got everything else that I could find.  Only had bounding box issues in my last real test build.  There are probably a few new modelread things that could need new swaps but I didn't notice anything offhand.  Most everything should be swapped already.  Everything new that I've added will use the cf* functions and so will already be swapped correctly and most everything else that's new also uses those.


Quote
Also, the latest cvs has some call to auxSphereSolid(), which seems to be a windows only glaux.h call...I've just #ifdef'ed it out for the moment...

Yeah I cringed when it hit CVS a couple of days ago.  I think that particular function is only used by FRED2 right now though so the regular game should be fine without it.  I'll try and replace it or just ifdef the whole thing out.
Title: FS2_Open Linux Discussion
Post by: Darwood on March 22, 2005, 04:15:19 pm
Quote
Originally posted by taylor
Yeah I cringed when it hit CVS a couple of days ago.  I think that particular function is only used by FRED2 right now though so the regular game should be fine without it.  I'll try and replace it or just ifdef the whole thing out.


I was just about to post this.  auxSphereSolid was giving me quite a head ache.  

Another thing I had some problems with was sounds/ogg/ogg.h.  I probably don't have my -I 's set up right but it was causing issues with the ogg.h I have from my ogg/vorbis libraries.  I wound up renaming the thing to make the compile happier.
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on March 23, 2005, 05:25:52 am
I get this error since a few days:
Quote
graphics/gropengltnl.cpp: In function `int opengl_get_new_state_block_internal()':
graphics/gropengltnl.cpp:828: Fehler: name lookup of `i' changed for new ISO `for' scoping
graphics/gropengltnl.cpp:823: Fehler:   using obsolete binding at `i'
graphics/gropengltnl.cpp: In function `void gr_opengl_draw_htl_sphere(float)':
graphics/gropengltnl.cpp:877: Fehler: `auxSolidSphere' undeclared (first use this function)
graphics/gropengltnl.cpp:877: Fehler: (Each undeclared identifier is reported only once for each function it appears in.)


The for-thing is easy to fix, but the "auxSolidSphere"...

I hope I could program in C(++) and so on...
If I could, I would be glad to help...

But ATM I can only program VERY easy stuff in C...
Title: FS2_Open Linux Discussion
Post by: taylor on March 23, 2005, 07:54:43 am
Quote
Originally posted by Mr_Maniac
The for-thing is easy to fix, but the "auxSolidSphere"...

I'm working out a few bugs in the new bmpman fixes but then I'll start merging in everything (been awake all night).  In the meantime though, since I'll probably fall asleep before I actually get to commit, I'll go ahead and post the auxSolidSphere fix.  Basically the aux stuff is long since depreciated, replaced by GLUT.  I don't want to rely on yet another API though since distros, depending on release date and policys, will have the original glut libs (non-free), no glut at all, or freeglut.  Too much of a pain.  With a tiny bit more code it can be done with just GLU.

This will get into CVS at some point today so you can wait or just use this so you can get playing now.  Please ignore the comments, I've been awake a really long time :D :

Code: [Select]
void gr_opengl_draw_htl_sphere(float rad)
{
if (Cmdline_nohtl)
return;

GLUquadricObj *quad = NULL;

// FIXME: before this is used in anything other than FRED2 we need to make this creation/deletion
// stuff global so that it's not so slow (it can be reused for multiple quadratic objects)
quad = gluNewQuadric();

Assert(quad != NULL);

if (quad == NULL)
return;

glColor3ub(gr_screen.current_color.red, gr_screen.current_color.green, gr_screen.current_color.blue);

// FIXME: opengl_check_for_errors() needs to be modified to work with this at
// some point but for now I just don't care so it does nothing
gluQuadricCallback( quad, GLU_ERROR, NULL );

// FIXME: maybe support fill/wireframe with a future flag?
gluQuadricDrawStyle( quad, GLU_FILL );

// assuming unlit spheres, otherwise use GLU_SMOOTH so that it looks better
gluQuadricNormals( quad, GLU_NONE );

// we could set the slices/stacks at some point in the future but just use 16 now since it looks ok
gluSphere( quad, (GLdouble)rad, 16, 16 );

// FIXME: I just heard this scream "Globalize Me!!".  It was really scary.  I even cried.
gluDeleteQuadric( quad );
}
Title: FS2_Open Linux Discussion
Post by: taylor on March 27, 2005, 12:21:07 am
Update to current CVS!!  Do it NOW!! :D

Thanks to a patch to the icculus.org freespace2 mailing list there is now streaming audio under Linux.  Music, briefing voices, OGG, everything.  Dude by the name of Pierre made a patch against the icculus.org CVS but with a few copy-pastes I was able to get it into the newest version of the streaming code for OpenAL.  This new code is a bit different since it's designed to replace the Windows version too at some point.  It's 64-bit compatible as well and OSX ready.  Any bugs should be reported, obviously.

Oh and the build system should be fixed now too so that you can actually build the thing from straight CVS. :)  I did forget your slowdown fix Alpha0 but I add that tonight after I grab some much needed food.  And Darwood, that ogg header problem should be fixed now as well.

EDIT:  Ok, so what got into CVS wasn't quite perfect ;)   Only WMCoolmon (and myself) has complained though so perhaps every sane person is asleep right now.  I do recommend doing a 'make distclean' after you update to current CVS if you already have a full or partial build.  This will help make sure that the correct Makefile changes get used.  Also put in your change Alpha0 though I haven't tested it myself.  If there are any problems then scream at the top of your lungs. :)
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on March 27, 2005, 06:24:33 am
Great! Music and Voice is working perfectly!
But I have a few little problems:
1. Radio-Messages are playing too fast...
Not Helium-like... I mean the delay between the messages is too short...
One message is played and before it's finished the second message is played... (overlayed).

2. Now there are a few more keys on my keyboard, that don't work... Well.. I hope it's only one, but it could be more...
Until now only the escape-button doesn't work!
So I have to exit with options>end game...

And this leads to
3. I hope it was the only time it occures, but fs2_open didn't exit...
The screen blanks but I have to kill fs2_open from another console... And this restarts my X-Server...

But for now, I can live with it :D
Title: FS2_Open Linux Discussion
Post by: taylor on March 27, 2005, 10:26:24 am
Quote
Originally posted by Mr_Maniac
Great! Music and Voice is working perfectly!
But I have a few little problems:
1. Radio-Messages are playing too fast...
Not Helium-like... I mean the delay between the messages is too short...
One message is played and before it's finished the second message is played... (overlayed).

Haven't noticed that myself though I didn't test in mission that much.  OpenAL will now be initialized with a sample rate that you can specify.  I didn't test that really well.  Edit ~/.fs2_open/fs2_open.ini and in the [Default] section add or change this line "SoundSampleRate=22050" and see if that helps or not.  You can try 44100 too.

EDIT: nope, I screwed up.  I changed snd_time_remaining() to be less stupid but it was I that was stupid.  It's checking with the wrong handle so that's why the voices are getting cut off early.  Working on a fix now.

Quote
2. Now there are a few more keys on my keyboard, that don't work... Well.. I hope it's only one, but it could be more...
Until now only the escape-button doesn't work!
So I have to exit with options>end game...

Deffinitely didn't notice that one.  Works ok for me and none of my changes affect the keyboard.  Some work was done on the keyboard stuff but I think that was just to cheat code workings.  If you get anymore info let me know, until then I'll try and figure out what might have changed.

Quote
And this leads to
3. I hope it was the only time it occures, but fs2_open didn't exit...
The screen blanks but I have to kill fs2_open from another console... And this restarts my X-Server...

Ehh, I get that too.  I thought it was just me though so I haven't really tried to fix it.  It's a race condition between pthread and the OpenAL closeout stuff.  If you don't use sound then it will work fine, but who wants that.  I'm using a slightly hacked version of OpenAL CVS, which is when it started messing up for me, so I thought that's all it was.  What backend are you using for OpenAL? (native, sdl, oss, alsa?)
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on March 27, 2005, 11:21:50 am
Okay... My Escape-Key IS working... Only this one time it wasn't...

Exiting freespace works now, too.. But it takes some time...

Quote
What backend are you using for OpenAL? (native, sdl, oss, alsa?)

Uhm... Where can I check/set this?
Title: FS2_Open Linux Discussion
Post by: mrduckman on March 27, 2005, 11:33:39 am
there should be a config.log there.
Otherwise, what cmdline for the configure did you run?
Title: FS2_Open Linux Discussion
Post by: taylor on March 27, 2005, 11:48:56 am
Quote
Originally posted by Mr_Maniac
Uhm... Where can I check/set this?

If you've got a ~/.openalrc then it's in there.  If not the it's default which I think is in order depending on what backends are enabled: native, oss, alsa, sdl.

I've left mine for several hours before waiting for it to exit cleanly but it never happened.  Anyway, I'll work on getting that to be handled better.
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on March 28, 2005, 01:04:15 pm
Okay... I've now set OpenAL to use ALSA...
Sometime FS2_Open freezes when exiting and sometimes not...
Title: FS2_Open Linux Discussion
Post by: lagnoman on March 28, 2005, 01:40:53 pm
Quote
Originally posted by Mr_Maniac
Sometime FS2_Open freezes when exiting and sometimes not...


The same issue here.
Title: FS2_Open Linux Discussion
Post by: Christoph_Berg on March 29, 2005, 07:15:39 am
I noticed problems with the German 'ß'. It doesn't display throughout the game
Title: FS2_Open Linux Discussion
Post by: Mr_Maniac on March 29, 2005, 09:20:43 am
There are some Problem with "local" Versions...
The keymap for example is english...
So I couldn't use the "default" keys because they just didn't work...
So I had to re-map some keys...
But that's just a little problem... I think it will get fixed somewhen...
But other things are more important ATM...
Title: FS2_Open Linux Discussion
Post by: lagnoman on March 29, 2005, 10:48:49 am
Quote
Originally posted by Mr_Maniac
There are some Problem with "local" Versions...
The keymap for example is english...
So I couldn't use the "default" keys because they just didn't work...
So I had to re-map some keys...
But that's just a little problem... I think it will get fixed somewhen...
But other things are more important ATM...


By a simple script I pass to US keymap before starting the game with 'setxkbmap'. Then I return to my italian keyboard.
The drawback is that you have to remember where US keys are located..
Title: FS2_Open Linux Discussion
Post by: taylor on March 29, 2005, 12:35:34 pm
Quote
Originally posted by Christoph_Berg
I noticed problems with the German 'ß'. It doesn't display throughout the game

I've got the German version of FS2 (don't speak the language just have it for testing) so point out where it's wrong and I'll have a look.  The keymap should be mostly right (unless I'm still missing stuff) for German keyboards, as long as the game detects a German version which is dependant on the root_fs2.vp or the Language setting in the ini file.  I spent 3 or 4 months for the icculus.org version just doing German related changes and fixes and it was well tested in the end.  Some of that may not have made it all the way over to FS2_Open but nothing has jumped out at me so far.

Quote
Originally posted by lagnoman
By a simple script I pass to US keymap before starting the game with 'setxkbmap'. Then I return to my italian keyboard.
The drawback is that you have to remember where US keys are located..

Send me a link or something to the key layout on the Italian keyboard and I'll if I can do anything about it.  I probably won't be able to detect it automatically but I could at least give you an option in the ini file to switch between layouts.
Title: FS2_Open Linux Discussion
Post by: lagnoman on March 29, 2005, 02:11:40 pm
Quote
Originally posted by taylor
Send me a link or something to the key layout on the Italian keyboard and I'll if I can do anything about it.  I probably won't be able to detect it automatically but I could at least give you an option in the ini file to switch between layouts.


Thank you, taylor. I was meaning that keyboard layout is not a problem to me.. If there are italians interested I can send you the italian keymap file. Otherwise let's concentrate on major issues !
Title: FS2_Open Linux Discussion
Post by: lagnoman on March 30, 2005, 07:19:23 am
Quote
Originally posted by taylor
Ehh, I get that too.  I thought it was just me though so I haven't really tried to fix it.  It's a race condition between pthread and the OpenAL closeout stuff.  If you don't use sound then it will work fine, but who wants that.  I'm using a slightly hacked version of OpenAL CVS, which is when it started messing up for me, so I thought that's all it was.  What backend are you using for OpenAL? (native, sdl, oss, alsa?)


I'm using Debian Sarge's OpenAL CVS version. I tried oss, alsa and esd (very slow) backend but fs2_open doesn't want to exit properly (it quitted cleanly only once in a hundred tries).

I'm using a debug build from the last cvs version. The non-debug build always crashes before visualizing the cockpit.
Title: FS2_Open Linux Discussion
Post by: Darwood on March 31, 2005, 03:29:46 pm
Well I got the source last night and was able to successfully compile on OSX without having to modify any files, however I'm having the same problems as before.  Without the -nohal option the game crashes as soon as I try to go into a mission, but with hal off I don't get collisions or weapons (I get the weapon sounds however).  Also fullscreen mode doesn't seem to be available, but it looks like that is disabled in a debug version?

I'm going to start looking into it some more when I get the time.

I have compiled the icculus.org version and that one works great.  I'm a little confused as to the different history of the icculus version and the fs2_open version.
Title: FS2_Open Linux Discussion
Post by: taylor on March 31, 2005, 06:11:37 pm
Quote
Originally posted by Darwood
ithout the -nohal option the game crashes as soon as I try to go into a mission, but with hal off I don't get collisions or weapons (I get the weapon sounds however).  Also fullscreen mode doesn't seem to be available, but it looks like that is disabled in a debug version?

I think that tigital is working on (or has already fixed) the HTL crash, something htl_vert related if I remember his e-mail correctly.  If that's what you are getting then I'll check with him and try and get a patch.

Fullscreen should work fine in debug mode, as long as you aren't using the -window cmdline option that is.  It should still default to fullscreen in debug mode but you can add "Fullscreen=1" to the ini file under the "[Defaults]" section for force it, even if -window is specified.

Quote
I have compiled the icculus.org version and that one works great.  I'm a little confused as to the different history of the icculus version and the fs2_open version.

The tress weren't merged so all of the CVS history didn't get carried over.  The OpenGL code is kind of a mix but has long since deviated from the icculus.org version.  If that's what you meant by "history" anyway.  If not let me know and I'll try again. :)

Oh and I think that the freeze on exit is fixed now.  I followed the OpenAL specs in my last update but apparently that wasn't the best idea.  I've got an update coming later tonight as soon as I can get a few other sound related issues resolved.  It still hangs when running in gdb for me but when not run in a debugger it exists quickly and cleanly.
Title: FS2_Open Linux Discussion
Post by: Darwood on March 31, 2005, 08:17:12 pm
Quote
Originally posted by taylor

I think that tigital is working on (or has already fixed) the HTL crash, something htl_vert related if I remember his e-mail correctly.  If that's what you are getting then I'll check with him and try and get a patch.


This is exactly the problem.  htl_vert is where it was crashing.

Quote
Originally posted by taylor
Fullscreen should work fine in debug mode, as long as you aren't using the -window cmdline option that is.  It should still default to fullscreen in debug mode but you can add "Fullscreen=1" to the ini file under the "[Defaults]" section for force it, even if -window is specified.


Interesting, I have "Fullscreen=1" in the ini file under "[Default]" (seems I don't have an s there hmmm) and that didn't affect anything.  I need to play with that some more.  At first I thought it might be my SDL but the icculus.org version does fullscreen fine and that was compiled against the same SDL.

Quote
Originally posted by taylor
The tress weren't merged so all of the CVS history didn't get carried over.  The OpenGL code is kind of a mix but has long since deviated from the icculus.org version.  If that's what you meant by "history" anyway.  If not let me know and I'll try again. :)


Yep that's what I mean.  So I can infer that the icculus.org code was merged (in one way or another) with the fs2_open code and that is the history?  So fs2_open is the current continuation of the icculus.org code?
Title: FS2_Open Linux Discussion
Post by: taylor on March 31, 2005, 09:25:16 pm
Quote
Originally posted by Darwood
Yep that's what I mean.  So I can infer that the icculus.org code was merged (in one way or another) with the fs2_open code and that is the history?  So fs2_open is the current continuation of the icculus.org code?

It's more of a branch than a continuation.  The icculus.org version is just a straight port so it's made to work that way, being comparable feature wise to the Windows version.  It's setup to be as compatible as possible to the orignal as far as pilot files go and networking.  Stability is also a primary goal.  The Linux code is added in a way that it should still be capable of building a normal Freespace2 binary for Windows.  Everything is separated.  The icculus.org code is still being worked on but just to the point that it's better, faster, more stable, rather than adding cool new features.

The fs2_open version of the code has evolved to have more features, be faster and at some point be merged together.  The Linux code has been modified to work better with the Windows code rather than trying to keep it separate.  And by merged together I mean that there is talk of replacing some Windows specific parts with SDL/OpenAL on all platforms.  The new audio code is the first pitch at that since you can compile a Windows binary with OpenAL support now rather than the older Windows only sound code.  It's not 100% but is mainly just a test at this point.  Graphics and input using SDL will be next with a working Windows version probably in the next few days.  Whether the Windows version dumps the old code and goes the SDL/OpenAL route I don't know, but the option will be there.