Bo Berglund wrote
I went ahead and followed the tutorial for installing Lazarus/FPC but did it on Raspbian-Jessie.
It failed at the first make step....
These were the steps I took following the configuration of the Pi2 including setting swap to 1000 MB and rebooting:
Install Subversion:
--------------------
sudo su
apt-get update
apt-get install -y subversion
Retrieve the boot version of FPC:
------------------------------------
mkdir /usr/local/fpc
cd /usr/local/fpc
wget
http://sourceforge.net/projects/freepascal/files/Linux/2.6.4/fpc-2.6.4.arm-linux.tar tar xvf fpc-2.6.4.arm-linux.tar
cd fpc-2.6.4.arm-linux
./install.sh (Reply /usr/local to the first question)
Download latest FPC sources:
-------------------------------
cd /usr/local/fpc
svn co http://svn.freepascal.org/svn/fpc/trunk source cd source
Compile the FPC compiler:
-------------------------
make all OPT=-dFPC_ARMHF
This is the step that fails after some considerable time and the message displayed at the bottom of the screen is:
[ 53%] Compiled package utils-fprcp
Start compiling package utils-h2pas for target arm-linux. Executing command "/usr/local/bin/plex h2pas/scan.l h2pas/scan.pas" The installer encountered the following error:
External command "/usr/local/bin/plex h2pas/scan.l h2pas/scan.pas" failed with exit code 256. Console output:
TP Lex Version 4.1a [April 2000], Copyright (c) 1990-2000 Albert Graef
FATAL: cannot open file /usr/lib/fpc/lexyacc/yylex.cod
Makefile:2403: recipe for target 'all' failed
make[2]: *** [all] Error 1
make[2]: Leaving directory '/usr/local/fpc/source/utils' Makefile:2650: recipe for target 'utils_all' failed make[1]: *** [utils_all] Error 2
make[1]: Leaving directory '/usr/local/fpc/source' Makefile:2895: recipe for target 'build-stamp.arm-linux' failed make: *** [build-stamp.arm-linux] Error 2
What could I do to get over this error so the make can complete?? Obviously the make in the source dir should work, but maybe not with the FPC version 2.6.4?
If that is the case, how could I get an ARM7 version of the compiler to use for compiling the trunk version of fpc?
Bo Berglund
Developer in Sweden