Installing Lazarus on macOS
한국어 · English · Español · Русский
This article applies to macOS only.
See also: Multiplatform Programming Guide
Installing Lazarus on a Mac is not particularly difficult but it is critical that you do the install in the correct order. Skipping steps will almost certainly end in tears. In brief, here is what you need to do:
- Download and install Xcode (optional depending on your needs - see below for details).
- Install the global command line tools for Xcode. Definitely required.
- Download and install the Free Pascal Compiler (FPC) binaries package and the FPC source package from the Lazarus IDE file area (Important do this before you install the Lazarus IDE)
- Download and install the Lazarus IDE from the Lazarus IDE file area or, perhaps more useful, download and compile Lazarus source code, eg Lazarus Fixes 3.0
- Configure LLDB - the Apple supplied (and signed) debugger from within the Lazarus IDE.
These steps are explained in more detail below.
Lazarus IDE - Unable to "run without debugging"
If you are using the Lazarus IDE 2.0.10 and the Run > Run without debugging menu option fails with a dialog similar to:
then you need to patch the Lazarus 2.0.10 source code (Issue #37324 and Issue #36780). Specifically, patch ../ide/main.pp as below (unpatched lines shown first, patched lines shown second):
7243,7245c7243,7245
< if RunAppBundle
< and FileExistsUTF8(Process.Executable)
< and FileExistsUTF8('/usr/bin/open') then
---
> if RunAppBundle then
> // and FileExistsUTF8(Process.Executable)
> //and FileExistsUTF8('/usr/bin/open') thenand recompile the Lazarus IDE.
Alternatively, you can omit patching the source code and simply recompile Lazarus 2.0.10 with FPC 3.0.4.
A similar patching exercise and recompiling, or simply recompiling with FPC 3.0.4, needs to be done for Lazarus 2.0.8 if it has been compiled with FPC 3.2.0.
Upgrading from Mojave (10.14) to Catalina (10.15)
- Run
sudo xcode-select --install
- To enable Lazarus to locate the
crt1.10.5.ofile change in/etc/fpc.cfgthe -Fl behind "#ifdef cpux86_64" from
-Fl/Applications/Xcode.app/Contents/Developer/Toolchain...to
-Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/Building the FPC compiler from Mojave (10.14) onwards
- To find the crt1.10.5.o file when building a later Free Pascal Compiler version from source, you need to specify:
OPT="-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/"on the make command line because FPC ignores the /etc/fpc.cfg configuration file during builds of itself.
Mac Installation FAQ
- See the Mac Installation FAQ for solutions to other common problems that may arise during (and after) installation of Lazarus and Free Pascal on macOS.
Uninstalling Lazarus and Free Pascal
Refer to Uninstalling Lazarus on macOS for uninstallation options.
Legacy Information
See Legacy Information for details of:
- Installing Lazarus on Mac OS X 10.4 (Tiger), Mac OS X 10.5 (Leopard), OS X 10.8 (Mountain Lion)
- Installing Lazarus 2.0.8, 2.0.10 with FPC 3.2.0 for macOS 10.10 and earlier
- Installing Lazarus 2.0.8 with FPC 3.2.0 for macOS 10.11+
- Installing Lazarus on PowerPC-based Macs
- Old Xcode versions
- Installing the gdb debugger
- Compatibility matrix for Lazarus 1.0.0 through 1.6.4 and FPC 2.6.0 through 3.0.2.
See also
- Xcode.
- Other macOS installation options.
- Installing multiple Lazarus versions.
- Mac Portal for an overview of development for macOS with Lazarus and Free Pascal.
- Mac Installation FAQ for solutions to the most frequent problems that may arise during (and after) installation of Lazarus and Free Pascal on macOS.
External links
- Lazarus daily development version download (Intel x86_64)
- Lazarus + FPC daily development version downloads (M1, ARM64, aarch64)
- GIT Succinctly - Free Ebook (PDF, MOBI, EPUB) from SyncFusion.
From the Free Pascal wiki, page "Installing Lazarus on macOS", as the Internet Archive kept it on 2025-06-16, last changed on 2025-05-01. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

