[fpc-pascal] Cross-compiling from 64-bit Linux to 32-bit Linux

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Feb 9 07:56:52 CET 2010

Patrick Chevalley wrote:
> Install the ia32-libs package.

I already had this installed and had many libraries available in /usr/lib32/

> also check if your fpc.cfg contain the following lines, I not remember
> if I add them:
> #ifdef cpui386
> -Fl/usr/lib32
> -Xd
> #endif

I added this and the problem was still the same. It seems the linker can't
find the libX11 library to link against. Your reply about 'locate crti.o'
gave me an idea.

I did the following...

$ locate libX11.so
/usr/lib32/libX11.so.6          <-- missing unversioned libX11.so

I noticed the "unversioned" libX11.so is missing from the /usr/lib32/
directory. I manually added a symbolic link and it solved the linking -lX11
problem, but then prompted about -lXft.  I did a another locate and it had
the same problem. Added another "unversioned" symbolic for libXft.so and
now my project successfully links!!!  :-)

Thanks for getting me onto the right track.

What location in the wiki will be appropriate for such information, in case
somebody else gets stuck with cross-compiling and a similar linking problem?

I used packages.ubuntu.com to search for packages that contain libX11.so. I
noticed that only from Ubuntu 9.04 (Jaunty) does the ia32-libs include the
unversioned symbolic link. I made a mistake in my original post, I am
actually running Ubuntu 8.04.2 (Hardy) 64-bit.

  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the fpc-pascal mailing list