Author Topic: [Solved] Trying to run it under FreeBSD :)  (Read 26704 times)

0 Members and 1 Guest are viewing this topic.

Offline nbspjr

  • 24
  • FreeBSD user
    • Fogged Blog
[Solved] Trying to run it under FreeBSD :)
I was courious if I could play this game under FreeBSD, so I downloaded distribution and followed README.txt instructions. After sorting out some dependencies and includes related stuff I managed to successfully build it. Wel, I guess it was successfull.

However the launcher segfaults when I'm trying to run it with arguments that are listed in README.txt. I can request usage help from the launcher:
Code: [Select]
$ ./wxlauncher/build/wxlauncher --help
Usage: wxlauncher [--session-only] [--add-profile] [--select-profile] [--profile <str>] [--file <str>] [-h] [--verbose]
  --session-only        Do not remember the profile that is selected at exit
  --add-profile         Add profile PROFILE from FILE. If PROFILE already exists it will not be overwritten. *Operator*
  --select-profile      Make PROFILE the that wxLauncher will use on next run. *Operator*
  --profile=<str>       The name of a profile to operate on. Operand PROFILE.
  --file=<str>          The path to a file to operate on. Operand FILE.
  -h, --help            show this help message
  --verbose             generate verbose log messages

But this command causes launcher to segfaults with zero output:
Code: [Select]
$ ./wxlauncher/build/wxlauncher --add-profile --profile=Diaspora --file=pro00099.ini --verbose
Trying to run it from GDB:
Code: [Select]
(gdb) run --add-profile --profile=Diaspora --file=pro00099.ini --verbose
Starting program: /media/tmp/Diaspora/wxlauncher/build/wxlauncher --add-profile --profile=Diaspora --file=pro00099.ini --verbose
[New LWP 100488]
[New Thread 80d407400 (LWP 100488/wxlauncher)]

Program exited with code 01.
(gdb) bt
No stack.

However, when I run ./fs2_open_diaspora from the game's folder, I could see a Free Space 2 window with intro movie & text like "Diaspora development presents", then the window goes black and nothing seems to happen.

Here is my system's info:
Code: [Select]
$ uname -srm
FreeBSD 9.1-RC1 amd64

$ dmesg |grep nvidia
nvidia0: <GeForce GTS 450> on vgapci0

$ pkg info -x nvidia
nvidia-driver-304.43           NVidia graphics card binary drivers for hardware OpenGL rendering

pkg info wxgtk2
wxgtk2-2.8.12_1                The wxWidgets GUI toolkit with GTK+ bindings

Does anyone have a guess what's happening and how could I fix that? Is there any additional information I should provide?
« Last Edit: October 18, 2012, 11:44:38 am by nbspjr »

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Trying to run it under FreeBSD :)
debug log, however you linux/bsd guys go about compiling a debug build... then run that and attach fs2_open.log Instructions in my sig.

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: Trying to run it under FreeBSD :)
Interesting. Thoughts:

- Try running wxlauncher with no arguments under gdb and see if you can get a stack trace that way.

- To at least get the game running without the launcher, create a text file called fs2_open.ini in ~/.fs2_open/ with these contents:
Code: (fs2_open.ini) [Select]
[Default]
VideocardFs2open=OGL -(<width>x<height>)x32 bit
TextureFilter=1
OGL_AnisotropicFilter=0
OGL_AntiAliasSamples=0
CurrentJoystick=99999
NetworkConnection=None
ConnectionSpeed=None
where <width>x<height> is your monitor's resolution (for example, 1920x1080).

Then create a text file called cmdline_fso.cfg in /<path/to/your/Diaspora/folder>/data/ with these contents:
Code: (cmdline_fso.cfg) [Select]
-post_process -soft_particles -fxaa -cache_bitmaps -snd_preload -ship_choice_3d -weapon_choice_3d -warp_flash -ambient_factor 90 -spec_exp 0.7 -spec_tube 1.0 -spec_point 0.7 -spec_static 1.0 -ogl_spec 15 -bloom_intensity 20

You can then run the fs2_open build without any arguments to run the game.

@jr2: the crash in this case is with the launcher rather than FSO. :)

A launcher log might still be useful, though. You can find it at ~/.wxlauncher/wxLauncher.log.

Hope that helps.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Trying to run it under FreeBSD :)
Err, right... I skimmed the post and saw that he got Diaspora to load, but failed to notice the part where he launched it on its own without the launcher.

* jr2 makes note to himself to stop speed reading when troubleshooting.  :nono:

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: Trying to run it under FreeBSD :)
Well, strictly speaking, FSO did crash (or at least it didn't work), although that was probably because of a missing fs2_open.ini file (equivalent of Windows registry data on OS X/Linux). If the game still doesn't work after nbspjr adds those two files, then a debug log would indeed be useful.

 

Offline nbspjr

  • 24
  • FreeBSD user
    • Fogged Blog
Re: Trying to run it under FreeBSD :)
Thank you both for replies! I'm going to try your suggestions today and then will report in this topic.

Update: I request a really HUGE facepalm smile to be added to the curent smileys pack on the forum so I could use it :)

I just looked into ~/.wxlauncher/wxLauncher.log and noticed that it complaining about profile duplication:
Code: [Select]
12277144155:WARN :New profile 'Diaspora' already exists!
12277144155:INFO :saving global profile before exiting.
12277144155:INFO :Current profile Default has no unsaved changes. Exiting.
12277144155:INFO :wxLogger shutdown complete.

It's a shame that I tried to run the launcher with --add-profile option all the time. So I've read README.txt more carefully and did this:
Code: [Select]
./wxlauncher/build/wxlauncher --select-profile --profile=DiasporaNow I can start launcher with no issue. Except that it couldn't find openAL, but then it detects openAL successfully (according to ~/.wxlauncher/wxLauncher.log)
Code: [Select]
12278090944:INFO : Found 1 FS2 Open executables in '/media/tmp/Diaspora'
12278090945:ERROR:Shared object "OpenAL32.so" not found, required by "wxlauncher"
12278090945:ERROR:OpenAL gave NULL for list of devices.
12278090945:ERROR:IsEFXSupported: playback device name is empty
12278090945:ERROR:OpenAL:329: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:333: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:338: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:346: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:352: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:358: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:384: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:395: Unknown error number 0x0000a004
12278090945:INFO :Detected OpenAL version: 1.1 ALSOFT 1.14
12278090949:INFO :FreeSpace 2 Open is now running...

FreeSpace starts but it's still goes black and eating 100% of one CPU core after displaying large "DIASPORA" text in the intro. I tried config suggestions for fs2_open.ini and cmdline_fso.cfg, but it didn't help. It is time to build fs2open with debugging support I suppose.
« Last Edit: October 04, 2012, 04:27:14 am by nbspjr »

 

Offline nbspjr

  • 24
  • FreeBSD user
    • Fogged Blog
Re: Trying to run it under FreeBSD :)
Cheers!
Allright, I've disabled all sounds and some graphical effects in the launcher settings window and managed to proceed to the game's main menu. I created a profile and started first mission.

Probably it's indeed a sound related issue. I'm going to take a look at it later.

PS: should I write a HOWTO describing building and running the game under FreeBSD?

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Trying to run it under FreeBSD :)
PS: should I write a HOWTO describing building and running the game under FreeBSD?

I'm sure the team would appreciate this :)
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Trying to run it under FreeBSD :)
Definitely. We'd be more than happy to get more BSD users.

We don't support BSD because we don't have anyone capable of supporting it. Otherwise we'd be more than happy to do it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline nbspjr

  • 24
  • FreeBSD user
    • Fogged Blog
Re: Trying to run it under FreeBSD :)
Definitely. We'd be more than happy to get more BSD users.
I'm happy to hear it.

We don't support BSD because we don't have anyone capable of supporting it. Otherwise we'd be more than happy to do it.
To be honest, I experienced only few issues while compiling the game:
  • There is no FreeBSD defined in configure.ac so I added it with linux x86_64 build flags (however, it should be ARCH dependent, I just don't know how to write it)
  • Configure scripts couldn't find some libraries and includes, because all third-party stuff goes inder /usr/local instead of just /usr, so I had to pass these paths via ENV variables
  • Configure script was trying to find lua5.1 while the LUA package installs lua-5.1 (note the hyphen in filename)
  • Also I've set env variable WX_CONFIG=/usr/local/bin/wxgtk2-2.8-config otherwise it couldn't find the wxgtk config utility
  • And, ofcourse, there was some missing packages like python modules or wxgtk :)
I'm not familiar with configure scripts so I tried to fix most of these issues using environment variables. So I'm going bring all of this info together and write a quick HOWTO soon.

As it was noted before, the compilation process run smoothly with no issues for both the launcher and fs2open. The problems are mostly dependencies-related in not-GNU environment.

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: Trying to run it under FreeBSD :)
Some notes on the wxLauncher log you posted:

As for
Code: [Select]
12278090945:ERROR:Shared object "OpenAL32.so" not found, required by "wxlauncher"

The error message is deceptive. What's happening is that the launcher is going through a list of likely names for the OpenAL library and trying them one by one until it finds one. So the error means that the launcher couldn't find a library by that name (I think it's the one Creative uses on Windows). But since the error is triggered by wxWidgets, I don't think we can suppress it.

Code: [Select]
12278090945:ERROR:OpenAL:329: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:333: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:338: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:346: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:352: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:358: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:384: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:395: Unknown error number 0x0000a004

This is a known issue that I haven't had a chance to look much into, other than to learn that 0x0000a004 refers to AL_INVALID_OPERATION. Seems to be Linux-only (EDIT: Well, *nix-only but not in OS X). I think you can safely ignore it.

Code: [Select]
12278090945:ERROR:OpenAL gave NULL for list of devices.
12278090945:ERROR:IsEFXSupported: playback device name is empty

This one looks pretty serious. It suggests that the launcher couldn't get a list of sound devices on your system from OpenAL. Unfortunately, the first error message doesn't indicate whether it's playback devices or capture devices (need to fix that), but the second line suggests that it was playback. A debug log from fs2_open would likely be helpful here.

Were there any options for playback and capture devices in the launcher's basic settings tab?


Agreed that sound is most likely at least part of the problem, if not actually the problem. Do you know what sound devices your system has?

Thanks.
« Last Edit: October 06, 2012, 09:19:59 pm by jg18 »

 

Offline nbspjr

  • 24
  • FreeBSD user
    • Fogged Blog
Re: Trying to run it under FreeBSD :)
jg18, thank you for response. I'll try to look at it this weekend. At this moment I could say that OpenAL library installed here: /usr/local/lib32/libopenal.so.1, here is package's info:
Code: [Select]
Port:   openal-soft-1.14
Path:   /usr/ports/audio/openal-soft
Info:   A software implementation of the OpenAL specification

There is one item in the "Capture device" list (OSS Default) under the "Basic settings" launcher's tab. However, "Playback device" list is empty.

How to compile and run Diaspora under FreeBSD 9.1
Please note: I'm not familiar with all of this stuff, I'm just a regular user. If you notice something wrong in this HOWTO please drop me a line in this topic :)
Original instructions was taken from http://linuxgamecast.com/2012/09/l-g-c-how-to-install-diaspora-shattered-armistice-on-ubuntu-12-04/

1. Dependencies
Since I already had most dependencies installed on my desktop, I couldn't provide a full list at this time. I had to install some additional ports:
Code: [Select]
x11-toolkits/wxgtk28
databases/py-sqlite3
textproc/py-markdown

2. Configure FreeSpace2
Enter fs2_open directory:
Code: [Select]
$ cd fs2_open
configure.ac knows nothing about FreeBSD so configure will fail when detecting OS. You should solve some issues in order to create a target for FreeBSD:
  • Let the script search /usr/local/lib and /usr/local/include for libs and headers.
  • Allow PKG_CHECK_MODULES macros to find lua since library name is lua-5.1, not the lua5.1 (not the hyphen)
I am totally new to configure files so I'm pretty sure it's not the right way to fix these issues (see the patch below). Tested only with FreeBSD9.1-amd64:
Code: [Select]
--- configure.ac.orig   2012-09-02 03:00:14.000000000 +0300
+++ configure.ac        2012-10-12 12:38:21.298848660 +0300
@@ -136,6 +136,17 @@
                echo "Using Solaris 10 defines (for $host_os)"
                fs2_os_solaris="yes"
                ;;
+       *freebsd*)
+               # FreeBSD
+               echo "Using Unix defines (for $host_os $host_cpu)"
+               fs2_os_unix="yes"
+               if test "$host_cpu" = "amd64" ; then
+                       D_CFLAGS="$D_CFLAGS -m64 -march=athlon64 -ansi"
+               fi;
+               D_CFLAGS="$D_CFLAGS -DLUA_USE_LINUX"
+               LDFLAGS="$LDFLAGS -L/usr/local/lib"
+               CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+               ;;
        *)
                # Unknown
                echo "fs2_open does not support $host_cpu-$host_os"
@@ -387,11 +398,14 @@
 
 dnl LUA
 ## Checking for lua.pc and if that fails lua5.1.pc
+## If lua5.1 also fails, check for lua-5.1 (BSD)
 PKG_CHECK_MODULES(
        [LUA],
        [lua >= 5.1.3],
        [], ## do nothing special
-       [PKG_CHECK_MODULES([LUA], [lua5.1 >= 5.1.3], [])])
+       [PKG_CHECK_MODULES([LUA], [lua5.1 >= 5.1.3], [], [
+               PKG_CHECK_MODULES([LUA], [lua-5.1 >= 5.1.3], [])
+       ])])
 D_CFLAGS=$D_CFLAGS" $LUA_CFLAGS"
 FS2_LIBS=$FS2_LIBS" $LUA_LIBS"
 

Configure fs2:
Code: [Select]
$ ./autogen.sh
3. Build FreeSpace2 engine
Code: [Select]
$ make
And then move compiled code:
Code: [Select]
$ mv code/fs2_open_3.6.13 ../fs2_open_diaspora
4. Configure and build wxLauncher
Change directory to wxlauncher/build
Code: [Select]
$ cd ../wxlauncher/build
Use ENV variable WX_CONFIG to point to correct wxgtk2-config path (source):
Code: [Select]
$ env WX_CONFIG=/usr/local/bin/wxgtk2-2.8-config cmake -D USE_OPENAL=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo -D DEVELOPMENT_MODE=1 ../
Build it (you could specify a number of jobs like -j2)
Code: [Select]
$make
5. Create configuration files
Return to game's directory:
Code: [Select]
$ cd ../..
Copy default template:
Code: [Select]
$ cp pro00099.template.ini pro00099.ini
$ chmod 644 pro00099.ini

Edit pro00099.ini, change the default path from
Code: [Select]
folder=/PATH/TO/YOUR/DIASPORA/FOLDER/HEREto
Code: [Select]
folder=/home/<your_username>/Diaspora_location
Add Diaspora profile
Code: [Select]
$ ./wxlauncher/build/wxlauncher --add-profile --profile=Diaspora --file=pro00099.ini
$ ./wxlauncher/build/wxlauncher --select-profile --profile=Diaspora

6. Launch Diaspora
Code: [Select]
$ ./wxlauncher/build/wxlauncher
If the game show only black screen after displaying intro text you should enable "Disable video playback" under the launcher's "Advanced settings tab".

PS: sorry for my English :)
« Last Edit: October 19, 2012, 01:44:52 am by nbspjr »

 

Offline nbspjr

  • 24
  • FreeBSD user
    • Fogged Blog
Re: Trying to run it under FreeBSD :)
Looks like the sound issue isn't related to Diaspora since OpenAL can't recognize any playback device. It may be my local problem:
Code: [Select]
$ openal-info
Available playback devices:
    !!! none !!!
Available capture devices:
    OSS Default
Default playback device:
Default capture device: OSS Default
ALC version: 1.1

** Info for device "OSS Default" **
ALC version: 1.1
ALC extensions:
    ALC_ENUMERATE_ALL_EXT, ALC_ENUMERATION_EXT, ALC_EXT_CAPTURE,
    ALC_EXT_DEDICATED, ALC_EXT_disconnect, ALC_EXT_EFX,
    ALC_EXT_thread_local_context, ALC_SOFT_loopback
OpenAL vendor string: OpenAL Community
OpenAL renderer string: OpenAL Soft
OpenAL version string: 1.1 ALSOFT 1.14
OpenAL extensions:
    AL_EXT_ALAW, AL_EXT_DOUBLE, AL_EXT_EXPONENT_DISTANCE, AL_EXT_FLOAT32,
    AL_EXT_IMA4, AL_EXT_LINEAR_DISTANCE, AL_EXT_MCFORMATS, AL_EXT_MULAW,
    AL_EXT_MULAW_MCFORMATS, AL_EXT_OFFSET, AL_EXT_source_distance_model,
    AL_LOKI_quadriphonic, AL_SOFT_buffer_samples, AL_SOFT_buffer_sub_data,
    AL_SOFTX_deferred_updates, AL_SOFT_direct_channels, AL_SOFT_loop_points
EFX version: 1.0
Max auxiliary sends: 4
Supported filters:
    Low-pass
Supported effects:
    EAX Reverb, Reverb, Echo, Ring Modulator, Dedicated Dialog, Dedicated LFE

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Trying to run it under FreeBSD :)
I have taken the liberty of commiting your changes to configure.ac to the FSO trunk.

Code: [Select]
12278090945:ERROR:OpenAL:329: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:333: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:338: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:346: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:352: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:358: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:384: Unknown error number 0x0000a004
12278090945:ERROR:OpenAL:395: Unknown error number 0x0000a004

This is a known issue that I haven't had a chance to look much into, other than to learn that 0x0000a004 refers to AL_INVALID_OPERATION. Seems to be Linux-only (EDIT: Well, *nix-only but not in OS X). I think you can safely ignore it.
This string of messages is from wxLauncher getting the OpenAL version. There is an issue we see with certain OpenAL implementations that result in error codes not being cleared correctly and that is what appears to be happening here as well, because we seem to be able to get the version of OpenAL even though it complains of errors throughout.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline nbspjr

  • 24
  • FreeBSD user
    • Fogged Blog
Re: Trying to run it under FreeBSD :)
I have taken the liberty of commiting your changes to configure.ac to the FSO trunk.
Thank you!

Update: sound is working now. It was openal-soft bug (OSS related). I applied the patch and I can play the game with sound! Also, now the game doesn't hang after playing intro video, so I don't have to disable it in the launcher's settings.

Thanks everyone for assistance.
« Last Edit: October 18, 2012, 11:44:19 am by nbspjr »

 

Offline nbspjr

  • 24
  • FreeBSD user
    • Fogged Blog
Re: [Solved] Trying to run it under FreeBSD :)
Is there any chance to add FreeBSD to the supported OS list in the Diaspora release topic? Do you want more testing or some more information, like system's hardware for example?

Currently I'm playing Diaspora under FreeBSD-9.1RC1 x86_64. My hardware somewhat outdated:
CPU: AMD Athlon X2 3800+
Videocard: nVidia 450GTS DDR5 512MB
M.board: ASUS M2n-E
RAM: 4GB
Sound: on-board HDA AD1988B
Code: [Select]
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <Analog Devices AD1988B (Analog 8ch/2.0)> (play/rec) default
pcm1: <Analog Devices AD1988B (Front Analog Headphones)> (play)
pcm2: <Analog Devices AD1988B (Rear Digital)> (play)
pcm3: <NVIDIA (0x0011) (HDMI/DP 8ch)> (play)
pcm4: <NVIDIA (0x0011) (HDMI/DP 8ch)> (play)
pcm5: <NVIDIA (0x0011) (HDMI/DP 8ch)> (play)
pcm6: <NVIDIA (0x0011) (HDMI/DP 8ch)> (play)

Game runs perfectly smooth with sound. However, I do not have a joystick so I don't know if it work.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: [Solved] Trying to run it under FreeBSD :)
Or perhaps, if not supported, classified as "working with BSD but needs more testing"?

 

Offline Iss Mneur

  • 210
  • TODO:
Re: [Solved] Trying to run it under FreeBSD :)
Nah, its mostly you got to talk to the right people :D.  I have pm'd Karajorma.

I would say "at least one user has reported that it works on FreeBSD.  Please let us know if you are on that platform".
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline nbspjr

  • 24
  • FreeBSD user
    • Fogged Blog
Re: [Solved] Trying to run it under FreeBSD :)
Nah, its mostly you got to talk to the right people :D.  I have pm'd Karajorma.

I would say "at least one user has reported that it works on FreeBSD.  Please let us know if you are on that platform".
Thank you.
I'll try to learn how to create a port to FreeBSD portstree. I believe the Diaspora will be more popular in FreeBSD world if there's will be a port for it.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: [Solved] Trying to run it under FreeBSD :)
Nah, its mostly you got to talk to the right people :D.  I have pm'd Karajorma.

I would say "at least one user has reported that it works on FreeBSD.  Please let us know if you are on that platform".

Sounds good. I'll add that now.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]