[Lazarus] Lazarus Release 2.2.6

Martin Frb lazarus at mfriebe.de
Thu Mar 16 20:00:02 CET 2023

On 16/03/2023 18:46, Bo Berglund via lazarus wrote:
> But it also seems like on each system there is only one version of fpc that can
> be "active" (at least on Linux) because its config is stored outside of the pcp
> dir in a user global fashion.
> How can I make the fpc compiler versions co-exist and be recognized by the
> respecive versions of Lazarus?

As for Lazarus:
Lazarus takes an argument --pcp=
So each version can be pointed to its own config.

That option can be put into a file called lazarus.cfg which is to reside 
in the directory of your lazarus exe file
(or the startlazarus file if you use that / you only need that if you 
have non-writable root installs, and/or for restarting after build)
Mind that if you have root installs, then the lazarus exe eventually 
ends up in the pcp, and the lazarus.cfg must be with the startlazarus 
that would start the lazarus.

As for FPC:
Either use scripts to start lazarus and set the $PATH for each fpc.

Or start the ppc directly // configure lazarus to use the ppc.

Mind that you also need the fpc.cfg to be found (so that can have ifdefs 
based on the version)

 From my setup script

this sets a folder for each fpc, and creates some symlinks
- The IDE must be pointed to use the ppc in the lib/fpc/3.2.2/ folder.
- there must be no global fpc.cfg (/etc or /home/name/.fpc or the like)

compiling with -va allows to check what is used.

$INSTPATH can be whatever.


mkdir -p /home/m/fpc/$INSTPATH/
mkdir -p /home/m/fpc/$INSTPATH/gl
mkdir -p /home/m/fpc/$INSTPATH/gw
mkdir -p /home/m/fpc/$INSTPATH/def
mkdir -p /home/m/fpc/$INSTPATH/o4

cd /home/m/fpc/$INSTSRC/source

make clean
make all    OPT="-gw -O-1  "
make install INSTALL_PREFIX=/home/m/fpc/$INSTPATH/gw

mkdir -p /home/m/fpc/$INSTPATH/gw/lib/fpc/etc
mkdir -p /home/m/fpc/$INSTPATH/gw/etc

cd /home/m/fpc/$INSTPATH
gw/bin/fpcmkcfg -d basepath=/home/m/fpc/$INSTPATH/gw/lib/fpc/$INSTVERS > 
gw/bin/fpcmkcfg -d basepath=/home/m/fpc/$INSTPATH/gw/lib/fpc/$INSTVERS > 

ln -s /home/m/fpc/$INSTPATH/gw/lib/fpc/$INSTVERS/ppcx64 

More information about the lazarus mailing list