Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2013-11

FPC Darwin/Linux Installations

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Brunner

I wanted to see if it is possible to put in a feature request to modify the present installation of FPC to include the actual binary "fpc" program into the directory where ppc386, ppcppc, and ppcx64 binaries.

Presently, under linux I am able to use symbolic links to make my system point to 32bit or 64bit compiler ../lib/fpc/2.6.2/ppc386 ../lib/fpc/2.6.2/ppcx64. I've been doing this for a long time with no problems.

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.

I have a "reset-fpc.sh" script that replaces symbolic links to fpc, ppc386 and ppcx64. But now that I know fpc binary needs to be "restored" instead of point to. So, I realize that there is no "fpc" binary copy placed into the library folder. Which leads me to proposing that it should be.

I wonder what actually builds "fpc" binary and included (fp*) tools presently shipped...

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?

Thanks for any input,

Andrew Brunner

Reply by email

Marco van de Voort
to Andrew Brunner

In our previous episode, Andrew Brunner said:

I wanted to see if it is possible to put in a feature request to modify the present installation of FPC to include the actual binary "fpc" program into the directory where ppc386, ppcppc, and ppcx64 binaries.

An alternate approach might be to simply manipulate the package system to install the package in a different prefix. I do that on FreeBSD, and then employ a similar symlinking scheme to link them from a directory in the global path to the prefix/bin that holds the relevant version.

Reply by email

Jonas Maebe
to Andrew Brunner: I wanted to see if it is possible to put in a feature request to modify the present…
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

Reply by email