lib32: libX11.so.6 (32-bit compatibility)

I need to run a 32-bit X11 application on a 64-bit system. I do not have access to the source code (which is not 64-bit clean) so I cannot recompile.

Code:
$ file x11
x11: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs),
 for FreeBSD 8.2, stripped

It calls libX11.so.6, so I blindly copied this shared library from a 32-bit system to /usr/local/lib32 on my 64-bit system. This is not a solution as libX11.so.6 calls other shared libraries found in /usr/local/lib. Of course, it is not enough to copy 32-bit versions of these shared libraries to /usr/local/lib32 without somehow modifying the /usr/local/lib prefix compiled into libX11.so.6.

Must I run my 32-bit X11 application under a 32-bit chroot environment? Or can someone suggest a way to build and install libX11.so.6 and dependencies as a 32-bit compatibility?

Thank you
 
Thank you. Of course I had installed the 32-bit compatibility libraries. libX11.so.6 is a port (x11/libX11) and is located in /usr/local/lib. It does not get built and installed by the procedure that you indicated above. Is there an equivalent procedure for ports?
 
Code:
$ ./x11
/libexec/ld-elf.so.1: Shared object "libX11.so.6" not found, required by "x11"

Copying libX11.so.6 to /usr/local/lib32 from a 32 bit system, and updating ldconfig
Code:
$ ldconfig -32 -r
...
	104:-lX11.6 => /usr/local/lib32/libX11.so.6

Code:
$ ./x11
/libexec/ld-elf.so.1: /usr/local/lib/libxcb.so.2: unsupported file layout

and libX11.so.6 also depends on
Code:
librpcsvc.so.5
libc.so.7
libXcursor.so.1
Am I misunderstanding something?
 
Back
Top