Recent

Author Topic: Macbook M1 with Lazarus up and running but cannot build app  (Read 176 times)

pedgarcia

  • Newbie
  • Posts: 1
Macbook M1 with Lazarus up and running but cannot build app
« 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


trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1272
  • Former Delphi 1-7, 10.2 User
Re: Macbook M1 with Lazarus up and running but cannot build app
« Reply #1 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.
Lazarus 2.1 r64368 FPC 3.3.1 r48100 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r64455 3.3.1 r48688  macOS 11.2 aarch64 Xcode 12.4
Lazarus 2.1 r61574 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 3.2.0 Win10 Parallels VM

 

TinyPortal © 2005-2018