Page 1 of 1

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is most likely no translated for the post!

Clear all

Lazarus - MacOS - Install Lazarus SVN under Catalina (32bit issue)

Noble Member Admin
Joined: 8 years ago
Posts: 1773
Topic starter  

At the moment that I'm posting this, Lazarus Pascal for MacOS is distributed as a 32bit application, which will not work unde Catalina.
So here the instruction on how to get Lazarus installed and running anyway (64bit). On my 12" MacBook this took about 10 minutes, but obviously this depends on your Internet Connection speed and the speed of your Mac.

1) Install Xcode from the App Store.

2) Install Xcode command line utilities

In Terminal:

 xcode-select --install

3) Download and install the 32 bit version of Lazarus.

This involves the IDE (Lazarus), FPC (compiler) and FPC SRC (compiler sources).

First install FPC, then FPC SRC, and finally Lazarus.

* A warning that files will be install in the system files has to be answered with "Install Anyway"

We're still at 32 bit so Lazarus will not work yet.
Myself I use the SVN or Trunk version of Lazarus, so here how we can install that after installing the initial version (FPC is required).

4) Install Lazarus from trunk

In Terminal:

 mkdir ~/freepascal
 mkdir ~/freepascal/lazarus
 cd ~/freepascal

Next downloaden Lazarus from trunk:

 svn co  lazarus

** If an update is needed, go to the ~/freepascal/lazarus directory en run:

 svn up

* I usually update only if things do not work, a new fix has been released, or if I haven't updated Lazarus in quite a while.

The same can be done for FPC, but I'm not sure if this is really needed;:

 mkdir ~/freepascal/fpc
 cd ~/freepascal
 svn co fpc

** For future updates run in the ~/freepascal/fpc directory:

 svn up

5) Compile Lazarus for Cocoa 64-bit

In Terminal:

 cd ~/freepascal/lazarus
 make LCL_PLATFORM=cocoa CPU_TARGET=x86_64 clean all

Here we compile for cocoa and 64bit. "clean all" is not really needed at the initial install, but it's a good habit to do it this way, especially after future updates. Just to clean old stuff.

When done you'll see something like this:

Free Pascal Compiler version 3.0.4 [2018/09/30] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Darwin for x86_64
(3104) Compiling startlazarus.lpr
(3104) Compiling redirect_stderr.pas
(9001) Assembling (pipe) ../units/x86_64-darwin/cocoa/redirect_stderr.s
(3104) Compiling lazarusmanager.pas
/Users/hans/freepascal/lazarus/ide/lazarusmanager.pas(138,35) Hint: (5024) Parameter "Sender" not used
(9001) Assembling (pipe) ../units/x86_64-darwin/cocoa/lazarusmanager.s
(9001) Assembling (pipe) ../units/x86_64-darwin/cocoa/startlazarus.s
(9022) Compiling resource ../units/x86_64-darwin/cocoa/startlazarus.or
(9015) Linking ../startlazarus
(1008) 720 lines compiled, 1.7 sec
(1022) 3 hint(s) issued

Lazarus is now ready for use (unless you had error messages).

6) Star Lazarus Trunk

Open Finder and go to ~/freepascal/lazarus. You'll see a “Lazarus”  alias - double click it and Lazarus will start.

You can make an alias from that "Lazarus" and move it to your Application. Do NOT move the original alias - it won't work.

And that's all ... Lazarus runs now under Catalina.

Topic Tags

Like what you see and you'd like to help out? 

The best way to help is of course by assisting others with their questions here in the forum, but you can also help us out in other ways:

- Do your shopping at Amazon, it will not cost you anything extra but may generate a small commission for us,
- send a cup of coffee through PayPal ($5, $10, $20, or custom amount),
- become a Patreon,
- donate BitCoin (BTC), or BitCoinCash (BCH).