2008-05-15 16:37:27 |
Daniel A. Freer |
description |
ZSNES cannot be compiled as a 64-bit binary, and therefore uses 32-bit libraries on 64-bit systems. A 64-bit package could be made of the 32-bit binary relatively easy (whether it would violate Debians packaging standards or not IDK).
Among others, it uses libao for sound output. In Hardy+ only, libao is available in the package ia32-libs (before Hardy, one had to download the 32-bit libao and install it manually). ia32-libs correctly places libao packages at the following path:
From http://packages.ubuntu.com/hardy/amd64/ia32-libs/filelist
/usr/lib32/ao/plugins-2/libalsa09.so
/usr/lib32/ao/plugins-2/libarts.so
/usr/lib32/ao/plugins-2/libesd.so
/usr/lib32/ao/plugins-2/libnas.so
/usr/lib32/ao/plugins-2/liboss.so
/usr/lib32/ao/plugins-2/libpulse.so
However, zsnes currently seems to only look for the 32-bit libraries in /usr/lib/ao/plugins-2/, leading to a segfault within zsnes when compiled with --enable-libao and run using the OSS driver like so:
./zsnes -ad oss
A fix that works is to symbolically link the 32-bit libs in /usr/lib32/ao/plugins-2/ to /usr/lib/ao/plugins-2/, making sure not to overwrite the already existing 64-bit libs. Most of this information I believe I've covered in detail on the ubuntu forums thread I created:
http://ubuntuforums.org/showthread.php?t=588744 |
libao2 currently hard codes the paths to it's plugins, located in /usr/lib/ao/plugins-2/.
This can be shown by running this command:
[code]strings /usr/lib/libao.so.2 | grep / [/code]
This becomes a problem when the 32-bit version of libao is used on a 64-bit system. It'll check /usr/lib/ao/plugins-2/ instead of /usr/lib32/ao/plugins-2/, which causes a segfault in zsnes (a 32-bit only binary).
This can temporarily be fixed on user's systems by symbolically linking the 32-bit plugins located in /usr/lib32/ao/plugins-2/ to /usr/lib/ao/plugins-2/. A better fix would be to use a relative path such as ./ao/plugins-2/ instead of the absolute path of /usr/lib/ao/plugins-2/.
This affects ia32-libs in hardy especially, since it now contains libao2. |
|