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



## braslau (Sep 7, 2011)

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.


```
$ 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


----------



## SirDice (Sep 7, 2011)

`# cd /usr/src && make build32 install32 && ldconfig -v -m -R /usr/lib32`


----------



## braslau (Sep 7, 2011)

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?


----------



## SirDice (Sep 7, 2011)

It shouldn't need it.


----------



## braslau (Sep 8, 2011)

```
$ ./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

```
$ ldconfig -32 -r
...
	104:-lX11.6 => /usr/local/lib32/libX11.so.6
```


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

and libX11.so.6 also depends on

```
librpcsvc.so.5
libc.so.7
libXcursor.so.1
```
Am I misunderstanding something?


----------



## DutchDaemon (Sep 8, 2011)

braslau, start formatting your posts. Thanks.


----------

