I want to give a big credit to Jonas!
Jonas..I have uploaded a new installer for FPC 3.0.4 (called FPC 3.0.4a) that will install on macOS 10.14. The compiler has not changed, only the installer and the default fpc.cfg file (and fpcmkcfg, the program that generated the fpc.cfg file).
I have spent all day today, after upgrading from Sierra to Mojave, trying to get Lazarus 1.8.4 to work as it did before in Sierra. I uninstalled and re-installed Lazarus countless times, changed all manner of settings. I was about to wipe my Mac when I found this thread. And most significantly, Jonas mention of FPC 3.0.4a which I discovered is here if anyone is trying to find it (
ftp://ftp.hu.freepascal.org/pub/fpc/dist/3.0.4/i386-macosx/fpc-3.0.4a.intel-macosx.dmg).
So what did I do (for the benefit of others trying to get Lazarus 1.8.4 and FPC 3.0.4 on the new Mojave OSX):
1) Dragged Lazarus to trash from the Applications folder in Finder.
2) Deleted the /Users/Username/.lazarus folder (rm -R /Users/YourUsername/.lazarus at terminal)
3) Deleted FPC (rm -R /usr/local/lib/fpc/ at terminal)
4) Deleted other fpc entries such as /usr/local/share/src/fpc-3.0.4 and /usr/local/share/src/fpc-3.0.2 (e.g. rm -R /usr/local/share/src/fpc-3.0.4)...try using 'locate fpc' for other areas.
5) Ensured Xcode was installed (I am using Xcode 10, for info, as of 23rd Oct 2018) from the App Store
6) Executed the following at terminal: sudo xcode-select --install
5) Downloaded FPC 3.0.4e from the link above that Jonas has provided and installed it
6) Re-downloaded Lazarus 1.8.4 as available from the main site (
http://www.lazarus-ide.org/index.php?page=downloads)
Success! All existing and old projects now compile and build and launch. :-)
Thanks Jonas. Superstar.