The discovery of Lazarus Mac malware, produced by a threat actor known as the Lazarus Group, has breathed new life into an infrequently discussed topic in Mac security: advanced persistent threats (APT).
![]()
This article applies to only.See also:│ English (en) │ │ │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 lead to tears. In brief, here is what you need to do:. Download and install Xcode. Install the global command line tools for Xcode.
Download and install Free Pascal Compiler and FPC Source ( Important do this before you install the Lazarus IDE). Download and install the Lazarus IDE. Configure LLDB - the Apple supplied (and signed) debugger from within the Lazarus IDE. Contents.InstallationThe detailed instructions assume a recent version of macOS on your Mac, a recent version of Xcode from Apple and a recent version of Lazarus. Further down the page, under, you will see older information that may be relevant if you are using older components.
You can assist by replacing out of date info, either deleting it, or, if it may help someone working with a legacy project, moving it to the bottom of the page.In general, this is about using both the Carbon and Cocoa Widget Set. While Carbon may still be seen as a little more stable, as of release 2.0.0 the 64 bit Cocoa is very close and certainly should be considered.
Sudo xcode-select -installsudo xcodebuild -license acceptStep 3: FPC, FPC SourceDownload and install the Free Pascal Compiler (FPC) and source. A compatible FPC (and source) must be installed before you install Lazarus. You have a number of options.Source ForgeDownload the Free Pascal Compiler (FPC) and FPC source from the. When you arrive at that file area, choose the correct version of your operating system. The vast majority of Mac users should now choose the 64 bit packages in the Lazarus macOS x86-64 directory. Every Mac computer since late 2006 has been 64 bit capable. The fact that Apple has completely dropped all 32 bit support from macOS 10.15 Catalina (released in October 2019) is another reason to choose the 64 bit packages.These binary install kits are built by the FPC/Lazarus developers and track formal releases.
As these install kits are not approved by Apple, you need to hold down the Control key, click the package and choose Open and confirm you want to install from an Unknown Developer.You might like to apply a simple and quick test of FPC at this stage -.Other FPC Options fpcupdeluxeYou could also consider using to install FPC and, perhaps Lazarus.finkAlternatively, you can use, a package manager for macOS to install FPC. Note at the time of writing (Early 2020) fink offers Lazarus 2.0.6. The extra bonus of fink is easy installation as well as clean removal of a huge number of other open source software packages, including for many processors and systems. The choice for Lazarus is between a Carbon or Cocoa look, a gtk2 look, a Qt4-based and a Qt5-based version.
![]()
$ fink install lazarus-aqua// or$ fink install lazarus-cocoa// or$ fink install lazarus-gtk2// or$ fink install lazarus-qt4// or$ fink install lazarus-qt5You will be asked, whether to install a number of dependencies, including the Free Pascal Compiler, the Lazarus sources. Simply hit RETURN at the prompt and go for a coffee. It may take quite some time to build all packages, in particular on older Macs.After installation, Lazarus can be started from the folder /Applications/Fink/.
The actual details of FPC and Lazarus are in subdirectories of /swWith any Lazarus package from fink, these widget sets are supported for your program on macOS:carbon (Aqua), cocoa, gtk2, qt4 (Aqua), qt5 (Aqua), nogui, win32, win64 and wince.If you install FPC from fink, you will be fine downloading Lazarus source and compiling as detailed below. However, its possibly not a good idea to mix fink FPC with the Sourceforge binary install of Lazarus.MacPortsMacPorts has also a package description of the cocoa-64 bit version of lazarus 2.0.6. Install it with. $ port install lazarusStep 4: Install the Lazarus IDEDownload and install the Lazarus IDE from the.
When you arrive at that file area, choose the correct version of your operating system. The vast majority of Mac users should now choose the 64 bit packages in the Lazarus macOS x86-64 directory. Every Mac computer since late 2006 has been 64 bit capable.
The fact that Apple has completely dropped all 32 bit support from macOS 10.15 Catalina (released in October 2019) is another reason to choose the 64 bit packages.Non-release versions of the Lazarus IDE Fixes 2.0There are a number of reasons why you may be better off using a non release version of Lazarus, specifically, fixes20. Particularly:. You almost certainly need to target Cocoa, macOS 10.15 Catalina does not support 32 bit Carbon at all. The Cocoa widget set is steadily improving and the lldb debugger interface has rapidly improved since even v2.0.0. Fixes20 is a safer and more stable than trunk, but gets the new features much faster than the release version.Precompiled binaries based on fixes20 are not available from SourceForge but can be obtained from. But here we will discuss downloading source and building.
A little slow initially but very reliable and a great test of your compiler install! You will need svn (its not preinstalled on early macOS, use brew or fink to install). Cd mkdir -p bin/lazaruscd bin/lazarussvn checkout lazfixes//-wait some time.cd lazfixesmake LCLPLATFORM =cocoa CPUTARGET =x8664 bigide//-wait some time.open startlazarus.app -args '-pcp=/.lazfixes'. Note I pass a parameter to use a config directory that is based on the name of the actual install directory. It makes some scripting easy. It is also quite feasible (and perhaps a touch safer) to build a 32 bit Carbon Lazarus IDE and use it to build 64 bit Cocoa applications unless you are running macOS 10.15 Catalina which has removed support for 32 bit Carbon. Replace above make line with ' make LCLPLATFORM=carbon CPUTARGET=i386 bigide ' and setup your project as mentioned in the section below.You might like to put a small script in your $HOME/bin directory and even set a path to it (very UNIX!).
Cd /bin/lazarus/laztrunksvn update.//-wait some time.svn cleanup -remove-unversionedmake distclean all LCLPLATFORM =cocoa CPUTARGET =x8664 bigide//-wait some time.open startlazarus.app -args '-pcp=/.laztrunk' Step 5: Configure the DebuggerIn versions of Lazarus 1.8.4 and earlier, you needed to use gdb as a debugger, slow to install and hard to sign. Since Lazarus 2.0.0 you can (and should) use LLDB, a debugger provided by Apple, no signing required.Assuming you have installed what is necessary and started Lazarus, all that remains is configuring the debugger. If you don't do this now, Lazarus will try to use GDB and fail.First, click Tools-Options-Debugger. Top right of the window now open has a label, 'Debugger type and path', you must set both. Select 'LLDB debugger (with fpdebug) (Beta)'.
If it is not show in the selection list, see below (Installing LazDebuggerFpLLdb'.) Note that the image above has a path to LLDB that may well be different to yours, depends on where the XCode tools were installed, in my case /Library. Save those settings and you can now try to compile the almost nothing program that Lazarus has kindly provided for you (click the small green triangle near top left).Next you see a puzzling question, see image below. Choose a 'Debug Format' from one of the offered. Martinfr, the person who has given us this interface between Lazarus and LLDB, suggests you use 'dwarf3'. Then, you need to enter your password, a macOS cuteness because one application appears to be interfering with another.
In this case, that's fine!When running the debugger from time to time you will be asked for your password to allow debugging. This is for your own safety.Extra Information on using LLDBA great deal of information about using LLDB appears in this forum thread Here is a few gems, again, from Martinfr:In the unexpected case of problems, it may be worth trying 'dwarf with sets' instead of just 'dwarf3'.The 'debug info' setting only affects the units directly in your project. However units in packages may have debug info too. This can be:. set per package.
for many, but not all packages in menu Tools Configure build Lazarus. project settings If you change settings for a package, you may as well check into which package you expect to step.
Packages you do not step into, do not need debug info.If you use a type from a package (such as TForm from LCL) it is enough that your unit (in which you declare the variable / must declare and use a variable to include the type) has debug info. Reducing the number of packages with debug info (including those that default to have debug info), can shorten the debuggers start-up time.Also it may be worth comparing (it has not been tested) the debuggers start up time for the same settings, only changing the checkbox 'use external debug info'.This needs to be only set in your project. If set in your project it will affect all packages. (If set in a package it will do nothing / at least should.)Installing LazDebuggerFpLLdbIf you installed from source and used the bigide parameter to make, then the correct debugger will be installed, as a package, and ready to go.
If, however, you installed in another way, it may, or may not be there. From the main IDE screen, click Packages-Install/UninstallPackages. Shown is two lists of packages, the list on the left is installed, the list on the right is available to install. Look for LazDebuggerFpLldb (exactly that, there are some similar named but less suitable packages).
If it is on the right hand side, click it, press 'Install Selection' and then 'Save and rebuild IDE'. This will take a little time, the IDE will shutdown and restart and all should be well. Now jump back up the page and continue configuring the debugger.CompatibilityNot every combination of Lazarus and Free Pascal is compatible with every installation of macOS. Fink remove -recursive fpc-configFor the removal of the Lazarus preference folder and files in your home directory, see below.Installed from packages or sourceNormally you uninstall an application on macOS simply by dragging it from the Applications folder to the trash.
But because Lazarus and Free Pascal are development tools, they're installed in several folders that you don't normally see in Finder.You can copy and save the commands below to file uninstallLaz.sh and run it if you need to uninstall Lazarus and Free Pascal. You can usually install newer versions of Lazarus and Free Pascal over older versions, but as with most software it's not a bad idea to clean out everything before you install a newer version. This list of commands should also give you a sense of where the various pieces of Lazarus and Free Pascal are located. Chmod +x uninstallLaz.shsudo./uninstallLaz.shThen enter your password when prompted.Lazarus preference folder.lazarus in the home directoryNote: Lazarus also creates a.lazarus folder in your home directory where it stores environment settings and a list of recently opened projects and files.
You can leave this folder alone if you want the new version of Lazarus you're installing to use your old settings. MacOS normally doesn't show files or folders whose names start with a dot (.). To see this folder and its contents, enter the following in a terminal window. Cd /rm -rv.lazarusKnown issues.
FPC 2.4.4 has a bug. You can not compile the IDE with the range check flag -Cr. On OS X 10.4 you have to manually uninstall any previous version before installing a new dmg.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |