[fpc-pascal] FPC 3.0.X next to 2.6.4 on Linux

Michael Van Canneyt michael at freepascal.org
Fri Jan 6 21:01:20 CET 2017



On Fri, 6 Jan 2017, Krzysztof wrote:

> Hi,
>
> I have installed FPC 2.6.4 for a long time on my Linux with install.sh
> script in /usr dirs. I would like to install FPC 3.0.0 but keep 2.6.4 as
> "default" version due to a lot of company projects which I don't want
> reconfigure. I want to install FPC 3.0.0 somewhere in my home dir and
> configure only my new personal projects to use 3.0 version. Can anyone
> instruct me how to do that to not mess up current FPC configuration?
>
> What I want to do is:
> 1. Install FPC 3.0.0 in home dir
> 2. Make copy of Lazarus source and rebuild it with FPC 3.0.0. The question
> is how to force "make" command to use FPC 3.0 from home dir, not default
> 2.6.4
> 3. Use Lazarus with separated dir via "startlazarus --pcp=~/.lazarus_FPC3"

What I do is to have all installs in /usr/local/lib/fpc/$VERSION
and in /usr/local/bin I have symlinks

fpc

ppcx64-3.0.0 -> /usr/local/lib/fpc/3.0.0/ppcx64
ppcx64-2.6.4 -> /usr/local/lib/fpc/2.6.4/ppcx64

and the same for versions back to the mists of time...

In your .fpc config file you can use
#IFDEF VER3
/path/to/your/private/fpc
#else
/path/to/public/fpc
#endif

but if they're all installed in the same place, you can use the default, fpc
will figure out the correct version because of the $fpcversion macro it sets
up by default.

and when I run make, I use

make PP=ppcx64-x.y.z

Depending on the version I need. this works since years for me.

Michael.



More information about the fpc-pascal mailing list