[fpc-devel] Issue with Compiling FPC and MacOS Big Sur

Michael Ring mail at michael-ring.org
Sat Nov 14 16:51:25 CET 2020


Hi Jonas, thank you for your answer!

I cannot say if I did see a warning or not when installing fpc-package 
but I did not reinstall commandline tools before or after installing the 
3.2.0 compiler. They have been on all of my Macs for years.

What are you doing in the installer that creates that dependency?

My guess would be that you rewrite /etc/fpc.cfg (I think I saw on one of 
my Macs that the timestamp of that file changed), but this will not help 
for compiling the compiler as the compiler is beeing compiled with the 
flag -n which effectively turns off reading /etc/fpc.cfg.

I made compilation work by adding an OPT parameter to the build:

make clean all OPT="-Fl$(xcrun --show-sdk-path)/usr/lib -Ff$(xcrun 
--show-sdk-path)/System/Library/Frameworks"

or, without using $():

make clean all 
OPT="-Fl/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib 
-Ff/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"

So I guess the best solution would be to change the compiler Makefiles 
to add the Fl/Ff parameter to the compile when on a Mac. I am currently 
investigating this, what do you think, could that solve the issue once 
and for all? (We have already had this kind of conversation several 
times over the last years, usually on crt1.o

Fixing the Makefile will make this work for already existing compilers, 
I'd still propose to add this path from within fpc, when the linker 
commands are generated.

Or am I missing something ?

I am updating now my older Mac that is still on Catalina to latest 
XCode, will be interesting to see how this computer behaves after the 
update, with older xcode installed I can do 'make clean all' without any 
issue...

I can also run my build command there, on this machine XCode is 
installed so the Path to CommandlineTools points to some other place, 
but things still seems to work fine.

Michael

Am 14.11.20 um 15:10 schrieb Jonas Maebe:
> On 2020-11-14 11:03, Michael Ring via fpc-devel wrote:
>
>> I recently upgraded to Big Sur on two devices and tried to compile
>> trunk based on official 3.2.0 compiler freshly downloaded from
>> sourceforge but compilation fails:
> That looks like you did not install the Xcode command line tools
> *before* installing FPC. The installer should warn you about this if it
> detects that is the case. Previous FPC versions refused to install at
> all in this case, but I changed it into a warning because Apple kept
> changing things that broke this detection. It should function correctly
> on macOS 11.0/Big Sur though.
>
>
> Jonas


More information about the fpc-devel mailing list