Hard Light Productions Forums

General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: Miramor on March 25, 2009, 05:52:37 pm

Title: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 25, 2009, 05:52:37 pm
When I try to run FS2-open (or more specifically The Babylon Project) in Wine, it fails to launch, giving an error about openal32.dll not existing. The thing is, Wine has its own openal32.dll in .wine/drive_c/windows/system32. I've also tried installing the package from openal.org, and that still doesn't fix the error.

Help?
Title: Re: Freespace in Wine: problems with OpenAL
Post by: The E on March 25, 2009, 05:55:44 pm
Have you tried the Linux-native executables? They aren't part of the TBP install package, but can be found here (http://www.hard-light.net/forums/index.php/topic,61891.0.html).
Title: Re: Freespace in Wine: problems with OpenAL
Post by: FUBAR-BDHR on March 25, 2009, 06:12:08 pm
You'll only need the Inferno build for TBP. 
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 25, 2009, 08:03:10 pm
Okay I'll try that... Thanks.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 25, 2009, 08:13:41 pm
I get this on trying to execute the binary:

Code: [Select]
$ ./fs2_open_3_6_10_RC1_INF
bash: ./fs2_open_3_6_10_RC1_INF: cannot execute binary file

Yeah, BASH is being really helpful there...

Edit: Sigh, Linux builds are 64-bit only. I am using 32-bit. Has anyone posted 32-bit builds?
Title: Re: Freespace in Wine: problems with OpenAL
Post by: chief1983 on March 25, 2009, 08:38:29 pm
I was afraid of that, I didn't know if 64bit Ubuntu would build 64bit binaries if I set it up the same as 32bit Ubuntu.  I'll have to fix that.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 25, 2009, 08:42:13 pm
Glad I found a problem...

FWIW, I  found some builds that worked (nightly builds), but the game crashes now with this error message:

Code: [Select]
ERROR: "Could not load exp04 anim file" at fireball/fireballs.cpp:785
AL lib: ALc.c:1346: exit(): closing 1 Device
AL lib: ALc.c:1323: alcCloseDevice(): destroying 1 Context
AL lib: alSource.c:2340: alcDestroyContext(): deleting 3 Source(s)
AL lib: alBuffer.c:1081: exit(): deleting 9 Buffer(s)

Any way to fix this?
Title: Re: Freespace in Wine: problems with OpenAL
Post by: karajorma on March 26, 2009, 09:12:16 am
What graphics card and drivers do you have?
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 26, 2009, 12:00:08 pm
Intel 945GM onboard, using the xf86-video-intel 2.4.3 driver. Can't upgrade that driver because I'm using XOrg 1.4.2.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: captain-custard on March 26, 2009, 12:16:06 pm
maybe  im being stupid but is it really neccesary to run fsopen through wine? even tbp , cant you just install it onto you hard drive (copy and paste and then use an fsopen linux binary?) i know i did.........
Title: Re: Freespace in Wine: problems with OpenAL
Post by: The E on March 26, 2009, 12:22:18 pm
Which is what he did, actually. Read the thread. :rolleyes:
Title: Re: Freespace in Wine: problems with OpenAL
Post by: captain-custard on March 26, 2009, 12:47:16 pm
no  ;)
Title: Re: Freespace in Wine: problems with OpenAL
Post by: castor on March 26, 2009, 03:11:05 pm
Intel 945GM onboard, using the xf86-video-intel 2.4.3 driver. Can't upgrade that driver because I'm using XOrg 1.4.2.
Direct rendering works? (glxinfo)
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 26, 2009, 04:05:45 pm
Yup, DRI definitely works. And the crash occurs whether I'm using EXA or XAA.

Somehow, I don't think this is a problem with DRI. I mean, it's saying it can't load an image that the game needs.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 26, 2009, 04:54:41 pm
Okay, I did a bit of searching and it looks like this is a symptom of corrupted game data. Except... I know my game data isn't corrupted.

Could this problem be due to using normal as opposed to Inferno builds?

Could someone please help me out? Please?
Title: Re: Freespace in Wine: problems with OpenAL
Post by: FUBAR-BDHR on March 26, 2009, 05:48:01 pm
Either should work with TBP you just won't get the ships above 130 with regular builds.  Run the debug build and post the FS2_Open.log from your data folder.  You'll get a bunch of warnings but if you can continue do so until you get to one that you can't get past.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 26, 2009, 09:20:52 pm
How do I get fs2_open.log? I've run both the r and d builds (the d one works fine except for the crash, the r one is insanely slow) but neither produce that log.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: FUBAR-BDHR on March 26, 2009, 09:36:12 pm
The d one should produce the log in your data folder and it should be slower then the r one. 

How exactly do you have your directory set up?  How are you running the program?
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 26, 2009, 10:08:17 pm
I have the directory set up as the TBP installer (run in Wine) created it. I run the binary by clicking on it, or doing cding into the directory and doing ./fs2_open_foo in a terminal.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: FUBAR-BDHR on March 26, 2009, 10:26:37 pm
I'm not familiar with Wine but it's possible you aren't running with the necessary flags for TBP.  I suggest you check this forum for a launcher:  http://www.hard-light.net/forums/index.php/board,113.0.html

Once you have that you will need the following on   -spec -glow -env -mipmap -nomotiondebris -missile_lighting -dualscanlines -targetinfo -orbradar -rearm_timer -ship_choice_3d -3dwarp -warp_flash -tbp -snd_preload  -ambient_factor 65

I guess you could just type all that in. 
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 26, 2009, 11:26:41 pm
Both the d and r executables are unusably slow with those settings - I get literally one frame per second, and that's just on the intro/options screen.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: FUBAR-BDHR on March 26, 2009, 11:33:15 pm
But do you crash?  Slow is one thing and there isn't much we can do about that.  Crash is another.  Although I will say that Intel chipsets and FS2_Open have a history of not liking each other. 

Which leads me to the question can you play FS2?
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 27, 2009, 07:55:54 am
It appears that the crash still happens.

As for playing FS2, I've done it before on this machine... Could be that driver updates have changed things though.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: castor on March 27, 2009, 02:44:20 pm
As for running it on linux, make sure there aren't any .ini files hiding in install folder hierarchy, then try to run it with the bare bones ./fs2_open_r (i.e. without any cmd line options).
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 27, 2009, 06:30:04 pm
Well, that makes fs2_open_r run at the speed it ought to, but it still crashes.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: FUBAR-BDHR on March 27, 2009, 06:37:06 pm
Did you get a log when you tried to run the debug version last time?
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 27, 2009, 08:42:17 pm
Nope, no log. Does it require some kind of option? Perhaps --force-make-log-dammit?
Title: Re: Freespace in Wine: problems with OpenAL
Post by: FUBAR-BDHR on March 27, 2009, 10:18:40 pm
No debug should make a log if the program starts at all.

Screenshot of listing of your TBP directory then?  With file sizes.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 27, 2009, 10:31:24 pm
Code: [Select]
[The Babylon Project]$ du -h *
90M B5-C-sp-EMW-3_0.vp
267M B5-C-sp-RW-3_0.vp
1.3G B5-Core-3_4.vp
980K B5-M-MultiPack-1_0.vp
248K Launcher.exe
4.0K Root_fs2.vp
88K UninstallTBP.exe
16K data/missions
304K data/strips
80K data/tables
4.2M data/documentation
848K data/Misc
192K data/freddocs/Charts_files
2.1M data/freddocs
100K data/cache
20K data/links
7.6M data
544K devil.dll
28M emwintro.ogg
3.0M fred2_open_3_6_9.exe
3.0M fred2_open_3_6_9_INF.exe
10M fred2_open_3_6_9_debug.exe
10M fred2_open_3_6_9_debug_INF.exe
3.2M fs2_open_3_6_9.exe
3.2M fs2_open_3_6_9_INF.exe
7.4M fs2_open_3_6_9_INF_debug.exe
7.4M fs2_open_3_6_9_debug.exe
17M fs2_open_d-20090318_r5106
16M fs2_open_r-20090318_r5106
4.0K fs2open_pxo.cfg
64K ilu.dll
28K ilut.dll
41M intro.ogg
11M rwcredits.ogg
6.2M rwlogo.ogg
4.0K sparky_fs2.vp
4.0K sparky_hi_fs2.vp
4.0K stu_fs2.vp
Title: Re: Freespace in Wine: problems with OpenAL
Post by: FUBAR-BDHR on March 27, 2009, 11:01:43 pm
There should be data\players\single and data\players\multi.  You might not be getting far enough for those to be created though.  No harm in creating them manually.

Have you tried opening the B%-Cored-3_4.VP and seeing if the file it is crashing on is in there? 
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on March 27, 2009, 11:43:44 pm
Okay, I created those dirs manually... How do I open the .vp file though? XArchiver says the format isn't recognized. Is it LZMA or something exotic like that?

(Remember, I'm on Linux... Windows archive formats *should* all be supported, but some may not be.)
Title: Re: Freespace in Wine: problems with OpenAL
Post by: FUBAR-BDHR on March 28, 2009, 12:40:40 am
VPView or similar utility but I don't know where to get a version for your OS.  You can try Kara's FAQ or the modding forum. 
Title: Re: Freespace in Wine: problems with OpenAL
Post by: castor on March 28, 2009, 10:32:50 am
VPView works with Wine, but you'll need to find a few DLLs to get it to run.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on April 08, 2009, 11:28:40 pm
Alright, I tried the latest Linux build (3.6.10 RC2) with WC Saga, and this is what I get on the console...

Code: [Select]
Unrecognized command line parameter "-2d_poof".  Ignoring...
ERROR: "Could not load in ChoosePilot-m!" at ui/window.cpp:237
AL lib: ALc.c:1302: exit() 1 device(s) and 1 context(s) NOT deleted
AL lib: alSource.c:2291: alcDestroyContext(): 1 Source(s) NOT deleted
AL lib: alBuffer.c:1097: exit() 1 Buffer(s) NOT deleted

Following this, the game immediately crashes.

Help?
Title: Re: Freespace in Wine: problems with OpenAL
Post by: chief1983 on April 09, 2009, 01:32:58 am
Maja I believe is crossplatform since it's Java and can view and edit VP files.  I'm not sure what's up with that error, did you have to create a libopenal symlink?
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Wanderer on April 09, 2009, 01:35:07 am
Or is it crashing due missing low reso pilot selection screen?

Debug build (and the log, might help)
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on April 09, 2009, 08:24:38 am
Maja I believe is crossplatform since it's Java and can view and edit VP files.  I'm not sure what's up with that error, did you have to create a libopenal symlink?

Thanks, and nope, I didn't make the symlink.

Quote from: Wanderer
Or is it crashing due missing low reso pilot selection screen?

Debug build (and the log, might help)

Maybe... It is crashing when it should display the selection screen.

Again, the debug build doesn't create a log. I'm starting to think that might be a bug.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on April 09, 2009, 08:27:15 am
Yup, the lack of a low-res screen was the cause of the crash.

Unfortunately, the game also crashes at the same point as the Windows one, once I get past the selection screen... Again, no log, and this time no error messages. *sigh*
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on April 11, 2009, 01:50:26 pm
Okay, I seem to have solved the OpenAL problem by using the stable version of Wine... However, I now get this when running the launcher:

Code: [Select]
err:ole:CoGetClassObject class {96749377-3391-11d2-9ee3-00c04f797396} not registered
err:ole:CoGetClassObject class {96749377-3391-11d2-9ee3-00c04f797396} not registered
err:ole:create_server class {96749377-3391-11d2-9ee3-00c04f797396} not registered
err:ole:CoGetClassObject no class object {96749377-3391-11d2-9ee3-00c04f797396} could be created for context 0x7
proteus@skylark:~/Games/Freespace$ nano -w launcher6.ini
proteus@skylark:~/Games/Freespace$ wine start /unix Launcher.exe
proteus@skylark:~/Games/Freespace$ fixme:win:EnumDisplayDevicesW ((null),0,0x33ccb4,0x00000000), stub!
err:ole:CoGetClassObject class {96749377-3391-11d2-9ee3-00c04f797396} not registered
err:ole:CoGetClassObject class {96749377-3391-11d2-9ee3-00c04f797396} not registered
err:ole:create_server class {96749377-3391-11d2-9ee3-00c04f797396} not registered
err:ole:CoGetClassObject no class object {96749377-3391-11d2-9ee3-00c04f797396} could be created for context 0x7
wine start /unix Launcher.exewine: Call from 0x40c0f5 to unimplemented function MFC42.DLL.6888, aborting
wine: Unimplemented function MFC42.DLL.6888 called at address 0x40c0f5 (thread 0017), starting debugger...
wine: Call from 0x40c0f5 to unimplemented function MFC42.DLL.6888, aborting

Where oh where can I find a version of mfc42.dll that actually works for the launcher? Failing that, what do I edit so that fs2_open can run without me running the launcher first?

(For the record, I can't use the Linux version of 3.6.9, because it instantly segfaults on start. No idea why.)
Title: Re: Freespace in Wine: problems with OpenAL
Post by: castor on April 11, 2009, 02:59:29 pm
I tried the WCS mod under Wine, and following was enough to get it to run: wine fs2_open_3_6_10_RC2.exe -wcsaga -mod wcs
(wcs is the folder where I have all the files that came with the mod)

Its constantly *****ing about something network related though.
Quote
fixme:ras:RasEnumConnectionsA (0x33cf98,0x33cecc,0x33cec0),stub!
fixme:ras:RasEnumConnectionsA RAS support is not implemented! Configure program to use LAN connection/winsock instead!

Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on April 11, 2009, 03:38:46 pm
I get a popup window saying:

Code: [Select]
Can't understand 'VideocardFs2open' registry entry!
And another exhorting me to run the launcher first.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: Miramor on April 11, 2009, 07:24:35 pm
On the other hand, WCSaga works... With the bloody stupid 3.6.9 artifacting bug. Bleh.
Title: Re: Freespace in Wine: problems with OpenAL
Post by: chief1983 on April 11, 2009, 10:03:44 pm
There is a network setting the windows launcher configures, FS2 doesn't like having it not set.  It's stored in the registry.  If you can't run the launcher, I'm not sure how you're going to get all of that set up.  This may be another case where the usage of HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER is causing problems, I don't know if Wine likes that or not.