[fpc-devel] FPC Darwin/Linux Installations

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Nov 26 18:14:27 CET 2013


On 26 Nov 2013, at 17:52, Andrew Brunner wrote:

> Recently, I was instructed by Jonas that "fpc" was more than ppcx64 or ppc386 and it proved problematic for me to use a link to the desired compiler to "swap" versions.

There is no need to change "fpc" to swap versions, nor has there ever been one. By default, it will use the compiler binary it finds first in the path for the architecture the "fpc" binary itself was compiled. It has no hardcoded version built in. Therefore simply changing the compiler binary symlinks is enough to switch versions. It also has a -P parameter that you can use to change the architecture you want to target (e.g. fpc -Parm).

You can define a shell alias if you want it change the default target architecture for command line use, e.g. alias fpc="fpc -Px86_64" -- note that this will not influence the "fpc" use by make, which is good, because when asking for help with "make all" problems you'll still be using a default FPC setup rather than one that behaves differently from what other people will expect.

> And if "fpc" binary is different than ppcx64 than why do I have no build problems on my Linux box but am unable to build fpc on a darwin box?

Probably because you were cross-building under Darwin and not under Linux. The Makefile contains several calls to the fpc binary using "fpc"-specific parameters in that case (it may also be used in other cases, and may be used under even more circumstances in the future). This doesn't mean that cross-building will never work without an fpc binary present (it depends on which parameters you give to make), but it's not supported either.

As has been mentioned a thousand times before and as probably will have to be repeated until the end of times: building a new trunk version of FPC is only supported when starting from a complete install of the latest official release.


Jonas


More information about the fpc-devel mailing list