Linux 64bit - wrong path built into libasound.so.2

Technical support for the Linux and Mac platforms for all Trine games.
cbxbiker61
Posts: 2
Joined: Wed Apr 13, 2011 12:50 am

Linux 64bit - wrong path built into libasound.so.2

Postby cbxbiker61 » Wed Apr 13, 2011 1:05 am

I guess I'm not sure why you'd include libasound.so.2 in lib64.... pretty much all Linux's will have it.

Since you did include it though you should know that it was build with "/usr/lib" paths built in. That can (and will) create problems with 64 bit Linuxes that have their 64bits in /usr/lib64 and their 32bits in /usr/lib.

strings lib64/libasound.so.2 | grep usr/lib
/usr/lib/alsa-lib
/usr/lib/alsa-lib/smixer

Here's the rub. If the 64bit Linux has 32 bit compatibility libs installed, they may (mine does) have usr/lib/alsa-lib/libasound_module_ctl_pulse.so installed. When your local copy of libasound.so.2 loads it attempts to load /usr/lib/alsa-lib/libasound_module_ctl_pulse.so which is 32 bit so it fails to load.

So I just deleted your local copy of libasound.so.2 and sound works fine now.

The bottom line is you should either delete lib64/libasound.so.2 or rebuild it with /usr/lib64/alsa-lib built into it's path. The same recommendation goes for libdirectfb as I see it has /usr/lib paths built into it as well.

pablomme
Posts: 3
Joined: Wed Apr 13, 2011 3:38 pm

Re: Linux 64bit - wrong path built into libasound.so.2

Postby pablomme » Wed Apr 13, 2011 7:57 pm

In my case I had to remove lib64/libopenal.so.1 instead to get sound.

Wouldn't it be safer to default to using the system's libraries if present, and if not falling back to the ones distributed with the game? As in LD_LIBRARY_PATH=<system-lib>:<game-lib> instead of LD_LIBRARY_PATH=<game-lib>:<system-lib>.

alt_turo
Posts: 195
Joined: Mon Dec 13, 2010 11:06 am

Re: Linux 64bit - wrong path built into libasound.so.2

Postby alt_turo » Thu Apr 14, 2011 12:35 pm

pablomme wrote:Wouldn't it be safer to default to using the system's libraries if present, and if not falling back to the ones distributed with the game?


No because we need a very specific version of libavcodec. This is more likely to break things. Use system-provided libraries on your own risk.
Turo Lamminen
Alternative Games


Return to “Trine Technical Support for Linux & Mac”

Who is online

Users browsing this forum: No registered users and 3 guests