<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>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:</p>
<p>make all</p>
<p>....</p>
/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<br>
ld: library not found for -lc<br>
An error occurred while linking<br>
pp.pas(280,36) Error: Error while linking<br>
pp.pas(280,36) Fatal: There were 1 errors compiling module, stopping<br>
<p><br>
</p>
<p>Same thing happens when trying to compile from within
fpcupdeluxe, Developer Tools are installed and up to date.<br>
</p>
<p>This may be related to a change in MacOS Big Sur, found a few
comments on the possible issue:</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/dotnet/msbuild/issues/5454">https://github.com/dotnet/msbuild/issues/5454</a><br>
</p>
<p><br>
</p>
<p>there it says:</p>
<p><br>
</p>
<p>This will stop working in the next version of macOS:</p>
<blockquote>
<p>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 <code>dlopen()</code> the path, which
will correctly check for the library in the cache. (62986286)</p>
</blockquote>
<p><br>
</p>
<p>In Linker script -lc is last entry:</p>
ring@MacBook-Pro-1 x86_64-darwin $ cat link.res<br>
-arch<br>
x86_64<br>
-macosx_version_min<br>
10.8<br>
-L/usr/lib/<br>
-L./x86_64/<br>
-L./systems/<br>
-L/Users/ring/devel/fpc/rtl/units/x86_64-darwin/<br>
-L./x86/<br>
-L/usr/local/bin/<br>
-lc
<p> <br>
</p>
</body>
</html>