Mac Installation FAQ

From Lazarus wiki
Revision as of 11:06, 23 April 2016 by Jwdietrich (talk | contribs) (→‎Other questions: Typo fixed)
Jump to navigationJump to search

This page lists solutions to the most fequent problems that may arise during installation of Lazarus and Free Pascal on Mac OS X. Please read Installing Lazarus on MacOS X first and pay special attention to the sections that apply to your versions of Mac OS X, Xcode, Lazarus, Free Pascal.

Compilation aborts with weird messages

I have correctly installed Lazarus and FPC, but compiling a simple demo program stops with the Free Pascal exit code 256 and the "Lazarus Panic /bin/sh: clang: command not found".

Solution: This behaviour may arise from a too old Xcode version installed. Generally, you should use the newest Xcode version that is available for your operating system. Lazarus 1.6 requires, e.g. Xcode 3.2.6, or newer.

Debugger not found

I have installed the latest version of Lazarus on a new Mac. My program is built fine, but when I try to run it I get a message that the debugger "/usr/bin/gdb" doesn't exist or isn't runnable.

Solution: In newer versions of Xcode GDB is no longer globally available. See GDB on OS X Mavericks or newer and Xcode 5 or newer for possible solutions.

Form not shown after moving to Mac

My application works well on Windows and Linux, but after changing to Mac my forms are invisible. I tried to re-scan the FPC source directory, and I clicked "Create Bundle", but this didn't solve the problem. Unlike my app, a very simple demo application works well.

Solution: This may result from a wrong position setting of your form. Your Windows machine may have a multi-monitor setup, so that the forms are now outside the visible area, if your Mac has only one monitor. You should check and correct the top and left properties of your forms in the object inspector. (Of course, this only applies in the other direction, i.e. if you have a multi-monitor Mac and a single-monitor Windows or Linux machine).

fpcsrc not present

After installing and first running Lazarus, the welcome window complains that the directory /usr/local/share/fpcsrc is not found.

Solution: You have to install fpcsrc. This is a Lazarus-specific installer package that comes with your distribution of Lazarus. If you have downloaded Lazarus from SourceForge you find fpcsrc in the same directory as your Lazarus package.

Unit XY not found

I have freshly installed a new version of Lazarus on my machine. Trying to compile an application results in the error message "Error: unit not found: XY". (XY is a place holder for any unit name.)

Solution: Try to re-scan your FPC source directory via the Tools... menu of the IDE.

Other questions

I didn't find my issue here.

Answer: You might find a possible solution at the Lazarus and Free Pascal Forum. Otherwise, you might ask your question there.