I installed all the required libraries mentioned in the official openSUSE readme that ships with the game, yet since I switched to a 64 bit system I couldn't get the sound to work. It had previously worked when I still used the 32-bit version of openSUSE 12.1. So where is the problem at? Following the instructions further down in the readme, I executed Trine2 from Konsole to get a good view of the bash output. I had to look really fast, since the entire bash was filled up with "Cannot open stream" messages. The key error was that the game failed to open "/dev/dsp".
Code: Select all
AL lib: oss.c:169: Could not open /dev/dsp: No such file or directory
What's /dev/dsp ? It's the sound device that is used by OSS, the Open Sound System. OSS is deprecated, here's the story on Wikipedia:
The project was initially free software, but following the project's success, Savolainen was contracted by the company 4Front Technologies and made his support for newer sound devices and improvements proprietary. In response, eventually the Linux community abandoned the OSS/free implementation included in the kernel and development effort switched to the replacement Advanced Linux Sound Architecture (ALSA). Linux distributions, such as Ubuntu, have chosen to disable OSS support in their kernels and ignore any bugs filed against OSS4 packages. (while this may be re-enabled ).
Major distributions no longer use OSS and instead rely on ALSA. However, you still want to be able to play old applications that rely on OSS. To achieve this, the command "padsp" is used, a compability mechanism for running OSS applications within the ALSA environment. So why is that not working when running Trine2 on a 64-Bit system?
Because a 64-bit system will only come with padsp support for 64-bit applications, but Trine2 is a 32-bit application.
When I ran Trine2 from the command prompt adding the crucial padsp in front of the binary like this:
Code: Select all
LD_LIBRARY_PATH=./lib/lib32 padsp bin/trine2_linux_32bit
I will now get the problem that the required binary for OSS emulation is not found:
Code: Select all
ERROR: ld.so: object '/usr/lib64/libpulsedsp.so' from LD_PRELOAD cannot be preloaded: ignored.
What's LD_PRELOAD? Basically, the code of padsp boils down to locating libpulsedsp.so on your system and preloading it before the application starts. I found the relevant information explaining this here: http://forums.opensuse.org/english/get-technical-help-here/multimedia/463179-padsp.html
padsp will search for the libpulsedsp.so in your /usr/lib folder if you're on a 32 bit system and in /usr/lib64 if you have a 64 bit system. And indeed, if I kick off Dolphin and search through my /usr folder, I only find libpulsedsp.so in my /usr/lib64 folder, it is absent from /usr/lib where the 32 bit libraries are held. But Trine2 is 32 bit and depends on the 32 bit version of the library. Time to install it.
Or so it seems. It is not possible to install libpulsedsp.so from YaST - it doesn't simply come in a separate "libpulsedsp-32bit" package that you could install easily. It is part of the "pulseaudio" package and that can only be installed in one architecture at one time - either you're going full 32 bit or full 64 bit. I couldn't accept that and found a solution: Download the .rpm for the 32-bit package of PulseAudio from the homepage of your distribution (NEVER INSTALL PACKAGES FROM DISTRIBUTIONS THAT ARE NOT YOUR OWN).
If you're using openSUSE just like me, find the "pulseaudio" package in SUSE's web package search: http://software.opensuse.org/package/pulseaudio. Download the RPM for the 32 bit version that you need, but don't open it with YaST or the KDE package kit, but rather with an archiving tool like KDE Ark or Gnome File-Roller. In the archive, navigate to /usr/lib and extract the libpulsedsp.so to somewhere in your /home directory. Then open the terminal and enter:
Code: Select all
$ sudo cp /home/path/to/file/libpulsedsp.so /usr/lib/libpulsedsp.so
Now you can enjoy Trine2 with sound!
If you're interested on who is to blame for this error, a blog comment over here might interest you:
I just had a similar problem, and padsp almost solved the problem:
In my case it was an old 32bit game, and I do have a 64bit system.
Now padsp doesn't do much more than LD_PRELOADing libpulsedsp.so
Just that there is no 32bit version of libpulsedsp.so in the libpulse0-32bit
package (or anywhere else).
I had to manually fetch the i586 pulseaudio package, extract the lib and place
it in /usr/lib/ After that, the game ran with sound using padsp
This wouldn't be so annoying if this were not an error that is present since
(at least) OS 11.1 (that was what one of the google hits talked about). From
the bug list I conclude that the bug is reported every new OS release, pushed
to the PA maintainer - and obviously ignored!?
Isn't this what a distribution should take care of? At least if they decide
to have this package installed and used by default?