[fpc-devel] Issue with Compiling FPC and MacOS Big Sur
Michael Ring
mail at michael-ring.org
Sat Nov 14 11:03:11 CET 2020
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:
make all
....
/usr/local/bin/ppcx64 -Ur -Xs -O2 -n -Fux86_64 -Fusystems
-Fu/Users/ring/devel/fpc/rtl/units/x86_64-darwin -Fix86_64
-FEx86_64/bin/x86_64-darwin -FUx86_64/units/x86_64-darwin -dRELEASE
-dx86_64 -dGDB -dBROWSERLOG -Fux86 -Fix86 pp.pas
ld: library not found for -lc
An error occurred while linking
pp.pas(280,36) Error: Error while linking
pp.pas(280,36) Fatal: There were 1 errors compiling module, stopping
Same thing happens when trying to compile from within fpcupdeluxe,
Developer Tools are installed and up to date.
This may be related to a change in MacOS Big Sur, found a few comments
on the possible issue:
https://github.com/dotnet/msbuild/issues/5454
there it says:
This will stop working in the next version of macOS:
New in macOS Big Sur 11 beta, the system ships with a built-in
dynamic linker cache of all system-provided libraries. As part of
this change, copies of dynamic libraries are no longer present on
the filesystem. Code that attempts to check for dynamic library
presence by looking for a file at a path or enumerating a directory
will fail. Instead, check for library presence by attempting to
|dlopen()| the path, which will correctly check for the library in
the cache. (62986286)
In Linker script -lc is last entry:
ring at MacBook-Pro-1 x86_64-darwin $ cat link.res
-arch
x86_64
-macosx_version_min
10.8
-L/usr/lib/
-L./x86_64/
-L./systems/
-L/Users/ring/devel/fpc/rtl/units/x86_64-darwin/
-L./x86/
-L/usr/local/bin/
-lc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20201114/9e4efce8/attachment.htm>
More information about the fpc-devel
mailing list