[fpc-devel] fpcmkcfg invocation for two versions (linux)

Marco van de Voort marcov at stack.nl
Mon Oct 20 11:47:13 CEST 2014


In our previous episode, Gennadiy Poryev said:
> I've got two FPC versions installed on my Linux x64 box: 2.6.4 as a 
> bootstrap and 2.7.1 for building Lazarus. Both were installed through 
> 'make zipinstall' from svn and untaring to /usr, hence they reside under 
> /usr/lib64/fpc/2.6.4/ and /usr/lib64/fpc/2.7.1/ accordingly. The 
> switching is done by force-resymlinking /usr/bin/ppcx64 to the correct 
> ppcx64 in their corresponding locations so that /usr/bin/fpc may invoke 
> needed binary. Now Lazarus does not build, complaining about RegisterFCL 
> and I know this is because of missing fpc.cfg.
> What is the proper way of generating fpc.cfg in such case? I'm 
> particularly concerned about how do define 'basepath'. I did that on 
> Windows easily since bin directory was also located under version 
> directory, which is not the case in Linux.

A solution for the ppc* binary is to make a symlink for one of the binaries
(typically trunk) to ppx64-2.7.1, and to call "fpc" with -P2.7.1 

This still assumes 2.6.x and 2.7.x can use the same "fpc" binaries, and is
no solution for the rest.

I don't know fpcmkcfg that well, but the idea is that all paths in fpc.cfg
for this are done using $FPCVERSION for the versionnumber.

I made the setup for cmdline use (not lazarus), and I use a small
shellscript "fpcx" that adds the -P parameter, (fpc -P2.7.1 $*) and call
fpcx if I want to compile with trunk. 

Generally I have projects that *must* use trunk, and the rest uses stable,
so I've no need to clean my application dirs before switching, since I never
do.





More information about the fpc-devel mailing list