Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: S-99 on August 24, 2010, 01:31:11 am

Title: 64 bit binary?
Post by: S-99 on August 24, 2010, 01:31:11 am
Currently running linux mint 9 64 bit.

I currently have the linux 3.6.12 binary, and everything all set up and ready to go, but 64 bit was an after thought in this case for me.

I'm not going to compile source code. What's the situation on a 64 bit executable? And is there any way to get the currently provided linux binary to run on a 64 bit platform (i'm guessing would have to do with importing 32 bit libraries)?
Title: Re: 64 bit binary?
Post by: pecenipicek on August 24, 2010, 03:45:50 am
it should run right off the bat if you got the precompiled binary. did you make a run script for it, and if so, can you post it here and any error output it might punt out when running it?
Title: Re: 64 bit binary?
Post by: S-99 on August 24, 2010, 05:01:25 am
I did not make a run script for it. I normally configure the game via wine with the windows launcher (except resolution and color depth, but that's via .fs2_open/fs2_open.ini). After that i run the linux executable directly.

I already created an .fs2_open directory with the fs2_open.ini file too.

Anyway, here's the error message when i try to run the game.

./fs2_open_3_6_12_INF_r: error while loading shared libraries: libtheora.so.0: cannot open shared object file: No such file or directory
Title: Re: 64 bit binary?
Post by: pecenipicek on August 24, 2010, 05:04:45 am
get 32-bit libraries in then (the same as you'd get for building yer own build, check wiki for that) and make a launch script by hand. its not that hard.
Title: Re: 64 bit binary?
Post by: chief1983 on August 24, 2010, 09:32:00 am
Yeah you must be missing libtheora, that or a version bump changed the filename.  But these were built on Ubuntu.  You may need 32bit libraries even if you installed the 64bit ones already.
Title: Re: 64 bit binary?
Post by: S-99 on August 24, 2010, 05:54:22 pm
I had a feeling it was about a missing 32 bit library on a 64 bit install. I used getlibs from here (http://frozenfox.freehostia.com/cappy/) with information about it from here (http://ubuntuforums.org/showthread.php?t=474790).

Good program that's kept up to date and got really popular with ubuntu and debian users. It's sole use is for installing 32 bit libraries and programs and put the files in the right places on 64 bit installations of ubuntu and debian. It does the same thing for a 32 bit installation, except only 32 bit stuff (no point on using this program on 32 bit).

It got rid of any ****edupness that may have happened if i did a force install of the 32 bit version of libtheora0 with apt (plus would have grabbed a bunch of 32 bit dependencies for libtheora0 that i don't need). Installation of 32 bit libtheora0 via getlibs solved the problem and i can play. Really i came here for confirmation since i've never installed 32 bit libraries on 64 bit linux before.
make a launch script by hand. its not that hard.
Right, except that THERE'S NOT A SINGLE REASON I NEED TO.

1. You can configure all scp parameters and flags with the windows launcher under linux via wine just fine (with the exception of resolution and color depth that you do in the .fs2_open folder). After the windows launcher configured everything, you just run the linux binary directly.

2. The launcher does this nice thing which creates a configuration file called launcher6.ini. That file holds all of your flag settings. So why exactly make an fs2 launch script when all i need is launcher6.ini? Making a launch script for fs2 in linux is made pointless because of this, and it's not like i can't simply edit launcher6.ini to the same effect as a launch script either. It's also much easier to generate launcher6.ini via the launcher than it is to make a launch script. Heck, i could use the launcher to generate a launcher6.ini that i could rip the guts out of and then make a launch script for fs2...but yet again, i don't need to.

3. I no longer maintain a launch script for fs2 in linux is because is at the end of the day i got fs2 up and running faster and easier than you did in linux.
Title: Re: 64 bit binary?
Post by: pecenipicek on August 24, 2010, 08:16:15 pm
I had a feeling it was about a missing 32 bit library on a 64 bit install. I used getlibs from here (http://frozenfox.freehostia.com/cappy/) with information about it from here (http://ubuntuforums.org/showthread.php?t=474790).

Good program that's kept up to date and got really popular with ubuntu and debian users. It's sole use is for installing 32 bit libraries and programs and put the files in the right places on 64 bit installations of ubuntu and debian. It does the same thing for a 32 bit installation, except only 32 bit stuff (no point on using this program on 32 bit).

It got rid of any ****edupness that may have happened if i did a force install of the 32 bit version of libtheora0 with apt (plus would have grabbed a bunch of 32 bit dependencies for libtheora0 that i don't need). Installation of 32 bit libtheora0 via getlibs solved the problem and i can play. Really i came here for confirmation since i've never installed 32 bit libraries on 64 bit linux before.
make a launch script by hand. its not that hard.
Right, except that THERE'S NOT A SINGLE REASON I NEED TO.

1. You can configure all scp parameters and flags with the windows launcher under linux via wine just fine (with the exception of resolution and color depth that you do in the .fs2_open folder). After the windows launcher configured everything, you just run the linux binary directly.

2. The launcher does this nice thing which creates a configuration file called launcher6.ini. That file holds all of your flag settings. So why exactly make an fs2 launch script when all i need is launcher6.ini? Making a launch script for fs2 in linux is made pointless because of this, and it's not like i can't simply edit launcher6.ini to the same effect as a launch script either. It's also much easier to generate launcher6.ini via the launcher than it is to make a launch script. Heck, i could use the launcher to generate a launcher6.ini that i could rip the guts out of and then make a launch script for fs2...but yet again, i don't need to.

3. I no longer maintain a launch script for fs2 in linux is because is at the end of the day i got fs2 up and running faster and easier than you did in linux.
at point 3, that is total and utter bull****.


and overall, do not condescend me. if you knew that there might be problems with libs, why didnt you in your great all-knowingness DO IT YOURSELF BEFORE ASKING?
Title: Re: 64 bit binary?
Post by: chief1983 on August 24, 2010, 08:36:42 pm
Hey guys can we all chill it?  Don't make me get out a Masterlock.

S-99, Wine isn't exactly a piece of cake to get going sometimes.  If you've never used it before, I guarantee it's not faster to get the Windows launcher running in Linux than it is to write a startup script.
Title: Re: 64 bit binary?
Post by: S-99 on August 25, 2010, 02:25:52 am
if you knew that there might be problems with libs, why didnt you in your great all-knowingness DO IT YOURSELF BEFORE ASKING?
I didn't ask you how to do it, i had a feeling of what it might be and came in here to ask if that was the case so i don't go on my own goose chase. Gaining confirmation from somebody to head them in the right direction because they weren't sure about something is a smart move. I also spilled the beans on how i did it, and why i did it that way for importing a 32 bit library for anyone else who runs 64 bit debian or ubuntu.

Telling me to make a script and that it's not hard is where i started pulling some tude. Sorry about that. Messing around with wine isn't that hard, and it gets the job done fantastic. I'll be a cross platform launcher user when it gets finished for sure in the future. The whole community can use just the one and only cross platform launcher and the windows and osx only launchers will be a thing of the past (unlikely to happen sadly). I also like the launcher way of doing things, so i'm going to use the best damn launcher for fs2 at the moment. At the same time, i configure and mess around with fs2 in very nearly the same fashion as someone in windows would (and i have the fso 3.6.12 windows binaries as well, and i get to use the same launcher with them on a windows box). I don't like to have to change things around too much if i really don't have or want too, and fs2 in linux is one of these cases. The other reason i use the windows launcher in linux is because we don't tell people running windows around here to make a launch script, it's not that hard.

I'd bother to write a tutorial how to run the windows launcher under linux around here, but there's a few reasons i don't.

Wine is difficult for people (overstated given how great the launcher works in wine and how not difficult it was to make work, and that's all people would be coming here to use wine for).
Making a startup script is faster and not that hard (fine but why don't we tell people who run windows the same).
Foff let's ignore this, it's not important. Equivalent to this is ludicrous, why would anyone do this (ok, but i still find the launcher to be more friendly and easier to use in the long run, why not help others who don't want to change the way they prepare the game in linux as they did in windows, or simply those who dual boot)?

There would be no gain, and no loss. Which means no point; a tutorial no one reads.

Again...
Why even bother with a startup script? Launcher6.ini does the same job, just tell people how to make one of them in the least instead. That would be the truly cross platform thing to recommend those who play fs2 in any operating system since it will work in all operating systems only difference being executables for different operating systems.
Title: Re: 64 bit binary?
Post by: chief1983 on August 25, 2010, 09:54:48 am
You're right in that the cross platform launcher should be making everyone's lives easier, but with the scripts and tips already on the wiki for manual set up on linux, it's still not that easy to get going if you've not used Wine before.

Also, people do sometimes use Wine to run the full windows FSO builds too :)
Title: Re: 64 bit binary?
Post by: castor on August 25, 2010, 02:01:29 pm
Why even bother with a startup script?
To get a game up in seconds, instead of running around tuning stuff all over the place.

Code: [Select]
SDL_LINUX_JOYSTICK="'USB HID v1.10 Joystick' 4 1 0"

cp /home/cas/.fs2_open/fs2_open_hi.ini /home/cas/.fs2_open/fs2_open.ini
cp -r /home/cas/.fs2_open/data/players /home/cas/.fs2_open/data/players_bup

echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

nvidia-settings --config=~/.nvidia-settings-rc-hi --load-config-only

cd /media/data/game/FreeSpace2
xmodmap -e 'pointer = 1 6 3 4 5 8 7 2 9 10 11 12'
#xmodmap -display $DISPLAY -e "pointer = 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 51 14 13 12 11 10 9 8 7 6 5 4 3 2 1"

./fs2_open_r -mod mediavps  -env -normal -nomotiondebris -spec -glow -mipmap -snd_preload -fps -fov 0.65 -spec_exp 7.0 -spec_tube 5.0 -spec_point 8.6 -spec_static 3.0 -ambient_factor 80
#
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

#xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7 10"
#xmodmap -e "pointer = default"

(some stuff there is outdated etc, but you get the drift)
Title: Re: 64 bit binary?
Post by: Aardwolf on August 25, 2010, 03:21:43 pm
Why even bother with a startup script?
To get a game up in seconds, instead of running around tuning stuff all over the place.

If he's got the launcher working, then he can get a game up in seconds anyway. And it's probably easier to tune stuff with the launcher, too.
Title: Re: 64 bit binary?
Post by: ni1s on August 25, 2010, 03:23:25 pm
It's probably easier to compile a 64bit binary yourself then dealing with multilib stuff. Apparently Mint rebase of Debian so the development packages are probably the same. See Linux guide on the wiki.
Title: Re: 64 bit binary?
Post by: pecenipicek on August 26, 2010, 07:47:55 am
It's probably easier to compile a 64bit binary yourself then dealing with multilib stuff. Apparently Mint rebase of Debian so the development packages are probably the same. See Linux guide on the wiki.
i do not believe it would be possible to compile a 64-bit binary, for one simple reason. the whole codebase works on the assumption that everything is 32-bit. (before you start disagreeing, i suggest you go check up on the differences between 32-bit and 64-bit from the coders side, not the users)
Title: Re: 64 bit binary?
Post by: The E on August 26, 2010, 07:55:31 am
the whole codebase works on the assumption that everything is 32-bit. (before you start disagreeing, i suggest you go check up on the differences between 32-bit and 64-bit from the coders side, not the users)

Cite example, please.

The problem for your argument is that FSO compiles natively on Linux no matter what bit-ness.
Title: Re: 64 bit binary?
Post by: chief1983 on August 26, 2010, 08:14:14 am
Yeah people do run 64bit binaries on Ubuntu and the like.
Title: Re: 64 bit binary?
Post by: pecenipicek on August 26, 2010, 08:28:48 am
the whole codebase works on the assumption that everything is 32-bit. (before you start disagreeing, i suggest you go check up on the differences between 32-bit and 64-bit from the coders side, not the users)

Cite example, please.

The problem for your argument is that FSO compiles natively on Linux no matter what bit-ness.
my mistake then. i remember being told some time in the last 6 months that it couldnt be compiled as a 64 bit app. or is this only for windozer?




as for the codebase itself, i cannot verify it in any way properly since i'm not that well versed in any part of the code...



as to the potential problems, i'm just pointing to this (http://en.wikipedia.org/wiki/64-bit#64-bit_data_models).

i do not know how much of that is even relevant to the FSO codebase, but hey, you never know with this old bugger XD
Title: Re: 64 bit binary?
Post by: chief1983 on August 26, 2010, 09:39:38 am
We haven't compiled 64bit Windows apps yet, to my knowledge.  I believe it should be possible, but there may be a few Windows-specific code paths that cause problems or something.
Title: Re: 64 bit binary?
Post by: Iss Mneur on August 26, 2010, 01:27:31 pm
To reiterate what has been said and clarify a bit, FSO when compiled for SCP_UNIX, which includes both Linux and OSX, builds and works just fine.  Also, IIRC, SCP_UNIX will run on PowerPC as well (or at least used to) , thus it has the 64-bit issues worked out for its specific codepaths and the code paths that are shared with Win32.  The issue as chief1983 pointed out, is that there are Windows specific paths that are not Win64 correct.

@S-99: I realize that I have come into this a bit late, but I don't understand what is so useful about launcher6.ini?  The reason I ask is that FSO does not read the launcher6.ini file, it is used exclusively by the windows launcher.
Title: Re: 64 bit binary?
Post by: chief1983 on August 26, 2010, 01:41:08 pm
I'm not sure our PowerPC portion of the universal binary ever build ppc64 or just ppc32.
Title: Re: 64 bit binary?
Post by: castor on August 26, 2010, 03:26:38 pm
If he's got the launcher working, then he can get a game up in seconds anyway. And it's probably easier to tune stuff with the launcher, too.
I guess you didn't notice that in addition to FSO settings, the script also reconfigured my mouse buttons, loaded the appropriate fs2 .ini file for the mod (using high resolution for SP, low resolution for multi), made backups of my pilot files, loaded GPU settings appropriate for the mod, configured the joystick, switched the CPU clock to high frequency.

To get all that done I'd anyway need a script in addition to the launcher.
Title: Re: 64 bit binary?
Post by: Aardwolf on August 28, 2010, 11:02:31 pm
True.

But that's not what S-99 asked about.
Title: Re: 64 bit binary?
Post by: S-99 on August 29, 2010, 02:31:33 am
It's true, launcher6.ini is only for windows executables; i just got around to checking. Damnit, i must have gotten confused upon the 3.6.10 launch with new mvp's and thinking that my flag settings took effect when in fact the game just looks great on defaults.

Well no point for me to use the launcher under wine anymore :D As far as wine compatibility goes, the windows executables work perfectly aside from a wonky ingame mouse issue. The launcher was easy to get working, i grabbed two dll files and tossed them in the wine system32 directory, installed windows openal, and good to go...for no reason :lol: Going to make a script for fs2 in a bit.

Getting a 64 bit executable would still be recommended, even for windows users. I'm not biting off more than i chew when i say that this could have easily not been as easy to get running under a 64 bit platform. Most things it's import 32 bit libraries, sometimes a loot of them, and sometimes a little more.

EDIT: Got me a linux startup script going on. Very easy, i took the script from the wiki, and tossed most of the flag settings from launcher6.ini that wasn't getting used into the start up script so that now they are. And now i notice a difference :D

Aside from everything else. Linux mint is an ubuntu spin off. I could care less if this executable was built on ubuntu or not. It works fine, and has worked in other linux distros fine too. I just got lucky that i only needed libtheora0 32 bit library to make it work in 64 bit linux. A 64 bit executable in the future would be great, and is definitely something to consider for the rest of the community including windows users. 64 bit windows users are currently lucky because it comes with all of the 32 bit libraries too for making 32 bit apps works flawlessly (64 bit ubuntu by default comes with most of them, not all). One of the reasons i had nary a problem with running this and many other 32 bit apps under 64 bit vista back when i experimented with it.

In the long run i doubt fso will drop 32 bit compatibility. Open source projects have a tendency to follow compatibility as opposed to platform obsolescence. Microsoft is currently still supporting 32 bit because it currently suits them and the users (yeah i've seen win7 on a p4 machine).
Title: Re: 64 bit binary?
Post by: chief1983 on September 01, 2010, 10:30:05 am
Win7 runs on almost the same hardware as XP.  It's very quick.  With that kind of hardware compatibility, I don't expect 64bit to become ubiquitous anytime soon.  But getting full 64bit builds in the near future would still be nice, and is one of the goals as we try to move to source-based libs instead of pre-compiled ones.