A whilke ago I have proposed a fix in fpc-devel in Thread: "MacOS Mojave beta - crt1.o not installed to /usr/lib"
Using the CommandLineTools directory (and not the XCode directory) makes it possible to use fpc without the need to have the very huge xcode installed, I deleted it a while ago and am happy since then.
Can you please check if this path also exists in your installation?
@CoreDevelopers, any change to merge this fix to trunk?
Michael
Index: compiler/systems/t_bsd.pas
=================================================================== --- compiler/systems/t_bsd.pas (revision 39358) +++ compiler/systems/t_bsd.pas (working copy) @@ -377,7 +377,10 @@
if startupfile'' then
begin
if not librarysearchpath.FindFile(startupfile,false,result) then - result:='/usr/lib/'+startupfile
+ if sysutils.fileexists('/usr/lib/'+startupfile) then + result:='/usr/lib/'+startupfile
+ else if
sysutils.fileexists('/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/'+startupfile) then
+
result:='/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/'+startupfile
end
else
result:='';
