Wiki copymirror

This is a mirror of the wiki at pascal.chat. Editing, history and sign-in are there.

Installing Lazarus on macOS

한국어 · English · Español · Русский

macOSlogo.png

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:

  1. Download and install Xcode (optional depending on your needs - see below for details).
  2. Install the global command line tools for Xcode. Definitely required.
  3. 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)
  4. 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
  5. 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:

run dialog fail.png

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

pascal
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') then

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

pascal
-Fl/Applications/Xcode.app/Contents/Developer/Toolchain...

to

pascal
-Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/

Building the FPC compiler from Mojave (10.14) onwards

pascal
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

Uninstalling Lazarus and Free Pascal

Refer to Uninstalling Lazarus on macOS for uninstallation options.

Legacy Information

See Legacy Information for details of:

See also

External links


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.

Revision 6, last changed by WikiArchive .