[fpc-pascal] Issue with Linking

Chris Moody inquiry at greensnakedesign.com
Fri Aug 21 01:59:52 CEST 2015

On 08/20/2015 03:16 PM, Jonas Maebe wrote:
> Chris Moody wrote:
>> To further add to the confusion, I found my Raspberry did not have
>> locate installed, so I asked apt-get to get a copy and it obtained:
>> Unpacking locate (from .../locate_4.4.2-4_armhf.deb) ...
>> I did locate https://blogs.oracle.com/jtc/entry/is_it_armhf_or_armel and
>> going by Jim's blog I'm running an armhf system.
>> So I don't know what I have :(.
> That indeed suggests you have an armhf system. I really don't get why 
> it's installing an ARMEL compiler. Please file a bug with Raspbian 
> about that.
> You can bootstrap an armhf 3.0 compiler on an armel system, but it's a 
> bit tricky:
> 1) install the armel compiler (you already did that
> This last parameter removes the libc dependency from fpmake, so it 
> won't need the _init and _fini symbols. It does not remove threading 
> support from the RTL itself, so that's fine.
> This way, FPC 3.0 should build successfully, and you should end up 
> with an FPC 3.0 ARMHF compiler. You can verify it by running 
> "./fpcsrc/compiler/ppcarm -l nonexisting.pp" afterwards and checking 
> that it says it targets ARMHF.
> If that is the case, install it in a subdirectory of your home 
> directory (make ... install INSTALL_PREFIX=$HOME/somedir), create a 
> symbolic link from $HOME/somedir/bin/ppcarm to 
> $HOME/somedir/lib/fpc/3.0/ppcarm, add $HOME/somedir/bin to the front 
> of your path, and finally add the following lines to ~/.fpc.cfg
> #ifdef VER3_0
> -Fu/home/pi/somedir/lib/fpc/$fpcversion/units/$fpctarget/*
> -Fu/home/pi/somedir/lib/fpc/$fpcversion/units/$fpctarget/rtl
> #endif
> That should enable you to use both "fpc" and "ppcarm" to compile 
> programs using this newly built FPC 3.0.
> Jonas

Seems it compiles but still complains about linking.

Free Pascal Compiler version 3.0.0rc1 [2015/08/20] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Linux for ARMHF
Assembling dentist
Linking Dentist
Dentist.pas(106) Warning: "crtbegin.o" not found, this will probably 
cause a linking failure
Dentist.pas(106) Warning: "crtend.o" not found, this will probably cause 
a linking failure
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
10358 lines compiled, 8.9 sec
10 warning(s) issued
2 note(s) issued

Thanks for the help Jonas and others!


More information about the fpc-pascal mailing list