[Lazarus] Cross Compile: from 64 to i386 on linux

Torsten Bonde Christiansen tc at epidata.dk
Wed Sep 15 20:12:24 CEST 2010

> Error Message:
> /usr/bin/ld: warning: link.res contains output sections; did you 
> forget -T?
> /usr/bin/ld: skipping incompatible 
> /usr/lib/gcc/x86_64-linux-gnu/4.4.3/crtbegin.o when searching for 
> /usr/lib/gcc/x86_64-linux-gnu/4.4.3/crtbegin.o
> /usr/bin/ld: cannot find /usr/lib/gcc/x86_64-linux-gnu/4.4.3/crtbegin.o
> ycv.lpr(23,1) Error: Error while linking
This is probably because you havn't set up the fpc.cfg correctly. Check 
that there is a part that looks like this:

#ifdef cpui386

It informs the compiler to skip the regular library paths, but to search 
the 32-bit ones instead.

Also beware that you may need to manually create som symbolic link for 
some of the gcc lib files, fpc expects older version not present in 
ubuntu 10.04, but creating symbolic links does the trick.

Hope that helps as a start.

Kind regards,
Torsten Bonde Christiansen.

More information about the Lazarus mailing list