[fpc-pascal] The strange case of arm-linux-ld: skipping incompatible

Sven Barth pascaldragon at googlemail.com
Sat Nov 26 12:02:06 CET 2011


On 26.11.2011 09:05, Felipe Monteiro de Carvalho wrote:
> Compiling resource
> /home/felipe/Programas/lazarus-ccr/examples/androidlclv2/lib/arm-linux/androidlcltest.or
> Linking /home/felipe/Programas/lazarus-ccr/examples/androidlclv2/android/libs/armeabi/libmain.so
> /usr/bin/arm-linux-ld: warning:
> /home/felipe/Programas/lazarus-ccr/examples/androidlclv2/android/libs/armeabi/link.res
> contains output sections; did you forget -T?
> /usr/bin/arm-linux-ld: skipping incompatible /usr/lib//libc.so when
> searching for -lc
> /usr/bin/arm-linux-ld: skipping incompatible /usr/lib/crtn.o when
> searching for /usr/lib/crtn.o
> /usr/bin/arm-linux-ld: cannot find /usr/lib/crtn.o
> androidlcltest.lpr(24) Error: Error while linking
> androidlcltest.lpr(24) Fatal: There were 1 errors compiling module, stopping
>
> arm-linux-ld seams to have a fixed idea about where to find libc and
> it refuses to search in my path from -Fl, but it finds libandroid.so
> correctly in the provided path, which is even more confusing.

You could try to experiment with the "-L" argument of the linker (look 
at the man page of ld for info about it).

To experiment with the linker directly you can tell FPC to generate a 
link script using the option "-sh". Then you can modify the command line 
that is passed to the linker. After you've found what does you need to 
add you can pass the commands to FPC by using "-k", e.g. 
"-k-L/dir/to/your/libs" (no space between "-k" and the linker's options!).

I'm sorry that I can't help you more, but I'd first need to get my own 
ARM system running again (which I plan nevertheless, but not currently).

Regards,
Sven



More information about the fpc-pascal mailing list