<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Problem is more simple, path to SDK tools is missing in linker
script:</p>
<p>-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>
<b>-L/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/</b><br>
-lc</p>
<p><br>
</p>
<p>A permanent solution could be to add a call to xcrun to the link
process to make sure (hopefully once and for all) that the SDK
path is set in the linker-script:<br>
</p>
<p>ring@MacBook-Pro-1 compiler $ xcrun
--show-sdk-path
(master)fpc<br>
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk</p>
<p>ring@MacBook-Pro-1 compiler $ ls -l
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
(master)fpc<br>
lrwxr-xr-x 1 root wheel 15 10 Dez 2019
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk ->
MacOSX10.15.sdk<br>
</p>
<p><br>
</p>
<p>shall I try to create a patch?</p>
<p>Michael<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Am 14.11.20 um 11:03 schrieb Michael
Ring via fpc-devel:<br>
</div>
<blockquote type="cite"
cite="mid:de637751-17df-5c23-6634-d292610ad45e@michael-ring.org">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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"
moz-do-not-send="true">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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
fpc-devel maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
</pre>
</blockquote>
</body>
</html>