I have a RaspberryPi4 where I have installed several versions of Lazarus/Fpc over some time.
The latest versions are (fpc from Tools/Options/Compiler_executable):
Laz 2.0.8 with Fpc 3.0.4 set to use fpc: fpc
Laz 2.0.10 with Fpc 3.2.0 set to use fpc: /home/pi/lib/fpc/3.2.0/ppcarm Laz 2.0.12 with Fpc 3.2.0 set to use fpc: /home/pi/lib/fpc/3.2.0/ppcarm
Now I wanted to add a new Lazarus version and update my FPC to 3.2.2 as well.
So I have done what I always do, gotten the fpc sources from GitLab into a new dir ~/dev/fpc/3.2.2, then executed inside that dir using fpc 3.2.0 as seed:
make clean FPC="/home/pi/dev/fpc/3.2.0/compiler/ppcarm" make all FPC="/home/pi/dev/fpc/3.2.0/compiler/ppcarm"
And then after that succeeded:
make install prefix="$HOME" FPC="$HOME/dev/fpc/3.2.2/compiler/ppcarm" which throws an error! So I tried without $HOME:
make install prefix="/home/pi" FPC="/home/pi/dev/fpc/3.2.2/compiler/ppcarm" which also throws the error, it displays this sequence:
make installbase FPC=/home/pi/dev/fpc/3.2.2/compiler/ppcarm ZIPDESTDIR=/home/pi/dev/fpc/3.2.2
FPCMAKE=/home/pi/dev/fpc/3.2.2/utils/fpcm/bin/arm-linux/fpcmake make[1]: Entering directory '/home/pi/dev/fpc/3.2.2' /usr/bin/install -m 755 -d /usr/local/lib/fpc/3.2.2 /usr/bin/install: cannot create directory /usr/local/lib/fpc: Permission denied
make[1]: *** [Makefile:2858: installbase] Error 1
make[1]: Leaving directory '/home/pi/dev/fpc/3.2.2' make: *** [Makefile:2875: installall] Error 2
This has *never* happened before to me and I do not understand why it brings up /usr/bin/ and /usr/local/lib/, the whole point of my use of the argument prefix="/home/pi"
is to install *locally* below the home dir and not to a global location where you nhave to be sudo to do anything...
Note:
my $HOME/.fpc.cfg from 2019 contains exclusively paths looking like this:
#ifndef VER2
-FM/home/pi/lib/fpc/../../share/fpc/$fpcversion/unicode/ #endif
# searchpath for units and other system dependent things -Fu/home/pi/lib/fpc/$fpcversion/units/$fpctarget
-Fu/home/pi/lib/fpc/$fpcversion/units/$fpctarget/* -Fu/home/pi/lib/fpc/$fpcversion/units/$fpctarget/rtl
Is this a new behaviour for Fpc 3.2.2 different from that of Fpc 3.2.0 where it did not happen???
If not, what could have happened and in both cases how do I fix it?
