A half year ago I succeeded in building Freepascal and Lazarus on my Raspberry Pi. With ARMHF support.
With a new Raspberry 3 and new versions I tried to replicate that. After some strugling (the seed compiler now required is 3.0 for whch no binaries are available, but I found a minimal compiler on getlazarus.org and that was sufficient to bootstrap Freepascal.
What I did was
install the minimal compiler from getlazarus.org
get
http://svn.freepascal.org/svn/fpc/tags/release_3_0_0_rc2/ into temporary directory
make all OPT=-dFPC_ARMHF
make install OPT=-dFPC_ARMHF PREFIX=/usr/local
make install sourceinstall OPT=-dFPC_ARMHF PREFIX=/usr/local
rm -f "/usr/local/bin/ppcarm"
ln -sf "/usr/local/lib/fpc/3.0.0/ppcarm" "/usr/local/bin/ppcarm"
Recreated fpc.fg with
/usr/local/bin/fpcmkcfg -d basepath=/usr/local/lib/fpc/3.0.0 -o /usr/local/bin/fpc.cfg
Now Freepascal compiler runs fine, I have 3.0.0rc2. Simple command line program 'Hello world' works.
But Lazarus refuses to build.
My recipe is:
install dependencies
apt-get install -y libgtk2.0-dev libcairo2-dev libpango1.0-dev libgdk-pixbuf2.0-dev libatk1.0-dev libghc-x11-dev
apt-get install -y libx11-dev libgdk-pixbuf2.0-dev libcairo2-dev gir1.2-coglpango-1.0 libpangox-1.0-dev xorg-dev libgtk2.0-dev libpango1.0-dev
Get the source from
http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_6_RC2 into temporary directory
make all OPT=-dFPC_ARMHF
Next would be:
make install OPT=-dFPC_ARMHF PREFIX=/usr/local
But make all fails immediately with as output:
make -C packager/registration
make[1]: Entering directory '/usr/local/lazarus/lazarus_1_6_RC2/packager/registration'
/bin/rm -f ../units/arm-linux/fcllaz.ppu
/usr/local/bin/ppcarm -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Fu. -Fu/usr/local/lib/fpc/3.0.0/units/arm-linux/rtl -FE. -FU../units/arm-linux -darm fcllaz.pas
Free Pascal Compiler version 3.0.0rc2 [2016/07/06] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: Linux for ARMHF
(3104) Compiling fcllaz.pas
(3104) Compiling registerfcl.pas
/usr/local/lazarus/lazarus_1_6_RC2/packager/registration/registerfcl.pas(45,22) Fatal: (10022) Can't find unit process used by RegisterFCL
Fatal: (1018) Compilation aborted
Makefile:2702: recipe for target 'fcllaz.ppu' failed
make[1]: *** [fcllaz.ppu] Error 1
make[1]: Leaving directory '/usr/local/lazarus/lazarus_1_6_RC2/packager/registration'
Makefile:3050: recipe for target 'registration' failed
make: *** [registration] Error 2
I suppose I need to inform somehow about the whereabouts of units like 'process', but my knowledge and skills fail to see where and how?
I did find unit process in /usr/local/lib/fpc/3.0.0/units/arm-linux/fcl-process/process.ppu
In FPC.CFG I have
# searchpath for units and other system dependent things
-Fu/usr/local/lib/fpc/3.0.0/units/$fpctarget
-Fu/usr/local/lib/fpc/3.0.0/units/$fpctarget/*
-Fu/usr/local/lib/fpc/3.0.0/units/$fpctarget/rtl
Now if fpctarget = arm-linux ?