Recent

Author Topic: M1 MacOS V13.1 Tool Setup  (Read 2274 times)

Bigendshell

  • Newbie
  • Posts: 6
M1 MacOS V13.1 Tool Setup
« on: December 14, 2022, 04:04:27 pm »
I followed the instructions about installing the fpc packages before the lazarus ones. These are the ones I used
Lazarus-2.2.4-0-x86_64-macosx.pkg
fpc-3.2.2.intelarm64-macosx.dmg
fpc-src-3.2.2-20210709-macosx.dmg

I started the IDE and went to configure the output to use carbon rather than cocoa. When trying to save the options, I got the following message

Compiler "/usr/local/bin/fpc" does not support target aarch64-macos

That seems to be a bit of a show stopper. Have I missed a step (or three)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
Re: M1 MacOS V13.1 Tool Setup
« Reply #1 on: December 14, 2022, 10:43:08 pm »
The name of the target OS is Darwin. "macos" is classic MacOS in FPC (because it was being worked on back when the current macOS was still called Mac OS X).

Bigendshell

  • Newbie
  • Posts: 6
Re: M1 MacOS V13.1 Tool Setup
« Reply #2 on: December 15, 2022, 07:45:08 am »
Ok. I set the Target OS to Darwin and the CPU family to 'arm'. When I save the options, I get the message

Compiler "/usr/local/bin/fpc" does not support target arm-darwin

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2023
  • Former Delphi 1-7, 10.2 user
Re: M1 MacOS V13.1 Tool Setup
« Reply #3 on: December 15, 2022, 08:01:03 am »
A couple of things:

1) You can no longer use Carbon as Apple have removed most if not all 32 bit libraries from macOS after macOS 10.15 (Catalina), you must use Cocoa.

2) If you have an Apple Silicon Processor (eg M1 or M2 and variants) then the arhitecture to choose is not arm but aarch64.

Bigendshell

  • Newbie
  • Posts: 6
Re: M1 MacOS V13.1 Tool Setup
« Reply #4 on: December 15, 2022, 09:01:11 am »
Thanks for that. I set the value to Cocoa. I get a whole load of errors and warnings when I compile the project
"Compile package LCL 2.2.4: Success, Errors 108, Warnings: 35, Hints: 470"

Then at the end, I get the line
"Compile Project, CPU: aarch64, Target /Users/me/tmp/project1: success"

Something does not seem right. I've been using Lazarus on MacOS with Cocoa for years and Delphi before that. It looks like I'll have to run it under a Linux VM in future.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2023
  • Former Delphi 1-7, 10.2 user
Re: M1 MacOS V13.1 Tool Setup
« Reply #5 on: December 16, 2022, 12:40:37 am »
All is perfectly normal - Lazarus seems to classify some FPC messages as errors but as all compiles successfully they're obviously not actual errors. From memory, I don't get those "errors" when compiling my own applications.

Bigendshell

  • Newbie
  • Posts: 6
Re: M1 MacOS V13.1 Tool Setup
« Reply #6 on: December 17, 2022, 08:29:45 pm »
Ok, thanks for that. It is IMHO, very messy as it does not happen with X86/64 etc.
I may stay on Intel for my app development.

 

TinyPortal © 2005-2018