[fpc-pascal] Issue with Linking

Chris Moody inquiry at greensnakedesign.com
Wed Aug 19 22:15:26 CEST 2015

On 08/19/2015 01:12 PM, Jonas Maebe wrote:
> On 19/08/15 22:02, Chris Moody wrote:
>> So I reset up my Pi and I was able to get the current version of FPC to
>> get as far as the linking stage, at which point it shows this:
>> /usr/bin/ld: warning: link.res contains output sections; did you forget -T?
>> /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
>> function `_haltproc_eabi':
>> (.text+0x88): undefined reference to `_fini'
>> /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
>> function `_haltproc_eabi':
>> (.text+0x90): undefined reference to `_init'
>> Dentist.pas(106) Error: Error while linking
>> Dentist.pas(106) Fatal: There were 1 errors compiling module, stopping
>> Fatal: Compilation aborted
>> Error: /home/pi/fpc-2.6.4/bin/ppcarm returned an error exitcode (normal
>> if you did not specify a source file to be compiled)
>> I'm not sure how to fix this. If anyone can assist, it would be greatly
>> appreciated.
> As mentioned several times before, the standard FPC 2.6.4 does not
> support the Linux distributions for the Raspberry Pi. You get the linker
> error because FPC has been compiled for ARM EABI (aka "armel") and is
> looking for the symbols in the ARM EABI startup code (which is probably
> not installed on your system), while the Raspberry Pi uses ARM EABIHF.
> The solution is to use the FPC 2.6.4 from the package repository of your
> Raspberry Pi Linux distribution, or to compile FPC 3.x instead of FPC
> 2.6.4 (with OPT=-dFPC_ARMHF while building FPC).
> Jonas

Okay I will try to get the 2.6.4, as I'm not sure how to compile the 3.x 
if I can't compile on the Pi.

More information about the fpc-pascal mailing list