Lazarus

Installation => macOS / Mac OS X => Topic started by: pedgarcia on February 17, 2021, 03:30:38 am

Title: Macbook M1 with Lazarus up and running but cannot build app
Post by: pedgarcia on February 17, 2021, 03:30:38 am
Hi,

I am very new to Lazarus (although I used Delphi from 1995 to 2008) and I am trying to run it in my Macbook with M1 CPU.

I managed to compile the native FPC for Apple Arm, and also was able to build Lazarus using the laz_fixes branch (grabbed via git). When I run Lazarus, everything seems fine, however, when I try to run an empty application I get the error:

Compile package LCL 2.0.11: Exit code 1, Errors: 2
cocoautils.pas(128,23) Error: No matching implementation for interface method "hasMarkedText:Boolean;" found
cocoautils.pas(134,13) Error: Objective-C messages require their Objective-C selector name to be specified using the "message" directive.

I've searched here and the "Internets" but the very few references to this error are old (2+ years) and with no clear instructions/solutions to follow. Maybe I am missing the obvious but does anyone know what could that be?

My versions:
Free Pascal Compiler version 3.3.1 [2021/02/16] for aarch64
The laz_fix branch was updated today (Feb 16)

Thanks

Paulo

Title: Re: Macbook M1 with Lazarus up and running but cannot build app
Post by: trev on February 17, 2021, 05:44:52 am
I've not tried Lazarus fixes, bit I just built Lazarus trunk successfully on an M1 Mac mini and it seems to happily compile applications as well as an empty project.

Note: due to what I'm assuming is a recently introduced bug, if you build the IDE with the bigide option it fails when attempting to link lhelp because of a missing Xorg library (there being no Xorg installed in Big Sur or  indeed several previous macOS versions). Just omit bigide from the build arguments and it will build successfully. You can install any of the bigide packages from the Online Package Manager, maybe even lhelp but I have not tried as I don't use it.
TinyPortal © 2005-2018