[fpc-devel] [fpc-pascal] MacOSX Mojave

Michael Ring mail at michael-ring.org
Sat Oct 6 16:37:23 CEST 2018

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?


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
       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 


Am 06.10.18 um 16:01 schrieb C Western:
> Possibly unwisely, I updated by Mac to Mojave. I found that things 
> (including 32 bit apps) worked, but:
> I had to add
> -Fl/Applications/Xcode.app/Con
> tents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib 
> to my fpc.cfg to avoid "/usr/lib/crt1.o not found" errors. It seems as 
> though the startup files are no longer in /usr/lib
> The gdb from MacPorts also didn't seem to work. I had some success 
> using lldb - I notice an alpha package for this can be installed in 
> lazarus, and this seemed to work, at least on the basic test I did.
> Colin
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

More information about the fpc-devel mailing list