[Lazarus] Cross Compile: from 64 to i386 on linux
Osvaldo Filho
arquivostcf at gmail.com
Thu Sep 16 00:08:44 CEST 2010
The same problem! :-(
-----
/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
ycv.lpr(23,1) Fatal: There were 1 errors compiling module, stopping
-----
My fpc.cfg
---
# set binutils prefix
#IFNDEF CPUI386
#IFNDEF CPUAMD64
#DEFINE NEEDCROSSBINUTILS
#ENDIF
#ENDIF
#ifdef cpui386
-Xd
-Fl/usr/lib32
-Fl/lib32
#endif
#IFNDEF linux
#DEFINE NEEDCROSSBINUTILS
#ENDIF
#IFDEF FPC_CROSSCOMPILING
#IFDEF NEEDCROSSBINUTILS
-XP$fpctarget-
#ENDIF NEEDCROSSBINUTILS
#ENDIF
---
2010/9/15 Torsten Bonde Christiansen <tc at epidata.dk>
>
> 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
> -Xd
> -Fl/lib32
> -Fl/usr/lib32
> #endif
>
> 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.
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100915/a6d74ca9/attachment-0004.html>
More information about the Lazarus
mailing list