Re: [Hampshire] 32-bit apps on 64-bit Linux (Debian Etch)

Top Page
Author: Adam Trickett
Date:  
To: Hampshire LUG Discussion List
CC: 
Subject: Re: [Hampshire] 32-bit apps on 64-bit Linux (Debian Etch)

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x56ef5100.hantslug.org.uk.29334': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Mon Jan 1 15:15:12 2007 GMT
gpg: using DSA key 019AD0D8166C4BF0
gpg: Can't check signature: No public key
On Monday 01 January 2007 14:12, Hugo Mills wrote:
> On Mon, Jan 01, 2007 at 01:53:02PM +0000, Adam Trickett wrote:
> [snip]
>
> > There are two approaches to dealing with 64/32-bit on the same
> > Debian system:
> >
> > * Run 32-bit apps in a 32-bit chroot.
> > * Run 32-bit apps in a 64-bit environment, but provide 32-bit
> > compatabilitiy libraries.
>
> (I assume you mean 64-bit apps in a 64-bit environment here)


Er, I mean 32-bit on a 64-bit system with 32-bit compatibility via the ia32-libs package.

>    The only thing I can suggest is running ldd on the executable,
> working out what libs it really wants, and supplying them. I can't
> remember exactly where the 32-bit libs should go, but that shouldn't
> be hard to work out (dpkg -L on the compatibility package will tell
> you). You'll probably have to unpack the 32-bit packages by hand with
> dpkg-deb -x, and then copy the .so files you want into the right
> place.


Thanks useful hint. The realplay executable is a link to a shell script, which does all sorts of stuff. An ldd on the actual binary gives:

$ ldd realplay.bin
linux-gate.so.1 => (0xffffe000)

libgdk_pixbuf-2.0.so.0 => /usr/lib32/libgdk_pixbuf-2.0.so.0 (0xf7e8e000)
libpangoxft-1.0.so.0 => /usr/lib32/libpangoxft-1.0.so.0 (0xf7e86000)
libpangox-1.0.so.0 => /usr/lib32/libpangox-1.0.so.0 (0xf7e7b000)
libpango-1.0.so.0 => /usr/lib32/libpango-1.0.so.0 (0xf7e41000)
... lots ...

Which looks mostly okay, the linker has correctly linked everything to a 32-bit library - all do exist.

Executing the binary directly gives lots of errors like this:

(realplay.bin:3897): Pango-WARNING **: /usr/lib/pango/1.5.0/modules/pango-basic-fc.so: cannot open shared object file: No such file or directory

Both this file and the lib32 version exist and are readable. If Pango/RealPlayer is trying to link to the wrong version, then I can imaging it isn't going to work. RealPlayer it's self functions correctly, it's just got no usable text.

However a fresh Google search for Pango and 32 and 64 bit came up with this, which works a treat: http://www.xaraxtreme.org/download/ see the section on AMD64. Basically you do:

* Create a 32 bit pixbuf loaders file:

# sed 's:/usr/lib/:/usr/lib32/:' < /etc/gtk-2.0/gdk-pixbuf.loaders > /etc/gtk-2.0/gdk-pixbuf.loaders32

* Create /etc/pango32/pangorc with the following in

[Pango]
ModuleFiles=/etc/pango32/pango.modules
[PangoX]
AliasFiles=/etc/pango/pangox.aliases

* Create a script to launch 32 bit applications, in /usr/bin, called 32bit, containing the following

#/!bin/sh
export GTK_PATH=/usr/lib32/gtk-2.0/
export PANGO_RC_FILE=/etc/pango32/pangorc
export GDK_PIXBUF_MODULE_FILE=/etc/gtk-2.0/gdk-pixbuf.loaders32
$*

* Launch the application from the appopriate directory with

    32bit ./XaraLX


Actually I'll do something else directly in the realplay start shell, but it seems to work perfectly!

--
Adam Trickett
Overton, HANTS, UK

Any technology distinguishable from magic is insufficiently advanced
    -- anon