Sign in Join
Wiki copytemporary

Installing Lazarus on macOS: what changed

Revision 5 to 6. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11[![macOSlogo.png](/wiki-images/1/15/macOSlogo.png)](</File:macOSlogo.png>)
22
33This article applies to [macOS](</Category:macOS> "Category:macOS") only.
44
55See also: [[Multiplatform Programming Guide]]
66
77
8-****
98
109Installing 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:
1110
1211 1. Download and install Xcode (optional depending on your needs - see below for details).
1312 2. Install the global command line tools for Xcode. Definitely required.
1413 3. Download and install the Free Pascal Compiler (FPC) binaries package and the FPC source package from the [Lazarus IDE file area](<https://sourceforge.net/projects/lazarus/files/>) (**Important** do this _before_ you install the Lazarus IDE)
1514 4. Download and install the Lazarus IDE from the [Lazarus IDE file area](<https://sourceforge.net/projects/lazarus/files/>) or, perhaps more useful, download and compile Lazarus source code, eg [Lazarus Fixes 3.0](<https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/fixes_3_0?ref_type=heads>)
1615 5. Configure LLDB - the Apple supplied (and signed) debugger from within the Lazarus IDE.
1716
1817These steps are explained in more detail below.
1918
2019### Lazarus IDE - Unable to "run without debugging"
2120
2221If you are using the Lazarus IDE 2.0.10 and the _Run > Run without debugging_ menu option fails with a dialog similar to:
2322
2423[![run dialog fail.png](/wiki-images/1/19/run_dialog_fail.png)](</File:run_dialog_fail.png>)
2524
2625then you need to patch the Lazarus 2.0.10 source code ([Issue #37324](<https://bugs.freepascal.org/view.php?id=37324>) and [Issue #36780](<https://bugs.freepascal.org/view.php?id=36780>)). Specifically, patch `../ide/main.pp` as below (unpatched lines shown first, patched lines shown second):
2726```
28277243,7245c7243,7245
2928 < if RunAppBundle
3029 < and FileExistsUTF8(Process.Executable)
3130 < and FileExistsUTF8('/usr/bin/open') then
3231 ---
3332 > if RunAppBundle then
3433 > // and FileExistsUTF8(Process.Executable)
3534 > //and FileExistsUTF8('/usr/bin/open') then
3635```
3736
3837and recompile the Lazarus IDE.
3938
4039Alternatively, you can omit patching the source code and simply recompile Lazarus 2.0.10 with FPC 3.0.4.
4140
4241A 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.
4342
4443### Upgrading from Mojave (10.14) to Catalina (10.15)
4544
4645 * Run `sudo xcode-select --install`
4746
4847 * To enable Lazarus to locate the `crt1.10.5.o` file change in `/etc/fpc.cfg` the -Fl behind "#ifdef cpux86_64" from
4948
5049```
5150-Fl/Applications/Xcode.app/Contents/Developer/Toolchain...
5251```
5352
5453to
5554```
5655-Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
5756```
5857
5958### Building the FPC compiler from Mojave (10.14) onwards
6059
6160 * To find the crt1.10.5.o file when building a later Free Pascal Compiler version from source, you need to specify:
6261
6362```
6463OPT="-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/"
6564```
6665
6766on the make command line because FPC ignores the `/etc/fpc.cfg` configuration file during builds of itself.
6867
6968### Mac Installation FAQ
7069
7170 * 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.
7271
7372## Uninstalling Lazarus and Free Pascal
7473
7574Refer to [[Uninstalling Lazarus on macOS]] for uninstallation options.
7675
7776## Legacy Information
7877
7978See [[Legacy Information: Installing Lazarus on Mac|Legacy Information]] for details of:
8079
8180 * Installing Lazarus on Mac OS X 10.4 (Tiger), Mac OS X 10.5 (Leopard), OS X 10.8 (Mountain Lion)
8281 * Installing Lazarus 2.0.8, 2.0.10 with FPC 3.2.0 for macOS 10.10 and earlier
8382 * Installing Lazarus 2.0.8 with FPC 3.2.0 for macOS 10.11+
8483 * Installing Lazarus on PowerPC-based Macs
8584 * Old Xcode versions
8685 * Installing the gdb debugger
8786 * Compatibility matrix for Lazarus 1.0.0 through 1.6.4 and FPC 2.6.0 through 3.0.2.
8887
8988## See also
9089
9190 * [[Xcode]].
9291 * [[Other macOS installation options]].
9392 * [[Multiple Lazarus|Installing multiple Lazarus versions]].
9493 * [[Portal:Mac|Mac Portal]] for an overview of development for macOS with Lazarus and Free Pascal.
9594 * [[Mac Installation FAQ]] for solutions to the most frequent problems that may arise during (and after) installation of Lazarus and Free Pascal on macOS.
9695
9796## External links
9897
9998 * [Lazarus daily development version download](<https://sourceforge.net/projects/macos-lazarus-snapshots/files/intel/>) (Intel x86_64)
10099 * [Lazarus + FPC daily development version downloads](<https://sourceforge.net/projects/macos-lazarus-snapshots/files/arm64/>) (M1, ARM64, aarch64)
101100 * [GIT Succinctly](<https://www.syncfusion.com/succinctly-free-ebooks/git>) \- Free Ebook (PDF, MOBI, EPUB) from SyncFusion.
102101
103102---
104103*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](/wiki-contact).*

Back to history