Recent

Author Topic: Is there a "known good" combination of macOS silicon + FPC + Lazarus  (Read 1484 times)

coda

  • New Member
  • *
  • Posts: 18
For me, the current 4.2 release works "out of the box" for both Windows and Linux.  For macOS, not so much, because of the 15.6.1 update no doubt.

Is there a stable combination of Lazarus/FPC and macOS. One that will build and run the sample projects without any issues?

Thaddy

  • Hero Member
  • *****
  • Posts: 18521
  • Here stood a man who saw the Elbe and jumped it.
Re: Is there a "known good" combination of macOS silicon + FPC + Lazarus
« Reply #1 on: August 31, 2025, 04:19:37 pm »
No, you have to manually set 15.6.1 ( 12 would do) as linker target as I already explained. The good news is: that's about it..
I would have proposed a merge request, but my mac mini M4 is just a toy (Way further down the line compared to my RPi toys) and I use Apple hardware just too little to be comfortable.

Frankly, I intend to sell it. In my household nobody but me uses it. It is a 2024 model.
« Last Edit: August 31, 2025, 04:30:16 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

coda

  • New Member
  • *
  • Posts: 18
Re: Is there a "known good" combination of macOS silicon + FPC + Lazarus
« Reply #2 on: August 31, 2025, 10:32:54 pm »
Hi,

so just to be clear.  You're saying that there is no earlier version of silicon macOS that when combined with some specific release of Lazarus will just 'work'? 

By work I mean you download, install, start the ide, load one of the sample projects and build it and and it will run. Much like what the current Linux/Windows releases do.

Not trying to knock anything here.  I know it's not trivial to develop for a target that's constantly moving and what's been achieved so far is a major and imo very much unappreciated accomplishment.  And thanks for that.

Just looking for a known good combination that can be reverted to.

Jeff_t

  • New Member
  • *
  • Posts: 17
Re: Is there a "known good" combination of macOS silicon + FPC + Lazarus
« Reply #3 on: September 28, 2025, 09:24:53 am »
aplogies for postig about this in a couple of different posts.
I have a Mac M2, and struggled after downloading the latest Lazarus.
At first, nothing would run in debug.
I was eventually advised to add compiler options (which are not obvious to a newbie like me)
You find that in

Project/ Project Options /Custom Options
In there, adding -WM10.15   got me to a point where I could run Hello World level apps in debug.

But as soon as I tried to compile a stand alone version, that failed, and I almost deleted the whole thing as a bad job.
However, on a whim, I changed the option to say -WM10.14 and it now builds.
Give that a try?

(Despite the widespread posts about how it is possible to cross compile for Mac, Windows, Android... I can find no way to achieve that yet, but baby steps...)

rossh_lz

  • New Member
  • *
  • Posts: 27
Re: Is there a "known good" combination of macOS silicon + FPC + Lazarus
« Reply #4 on: October 31, 2025, 03:44:17 am »
I have just gone through the update experience from older versions.  This is what I have now:

MacOS 15.7.1
XCode 26.1
Lazarus 4.2
On an M1

Then edit and add to the /etc/fpc.cfg
Code: Pascal  [Select][+][-]
  1. #IFDEF Darwin
  2. #ifdef cpuaarch64
  3. -WM10.15
  4. #else
  5. -WM10.11
  6. #endif
  7. #ENDIF

That works everywhere for me.

The 10.15 actually gets adjusted by the linker to 11.0 because all AARCH code starts at API 11.  But due to some fpc compiler issue for AARCH, it doesn't like specifying 11.0

The 10.11 is for compiling x86_64 code.   This 10.11 is a min API version for the file signing process of older x86 programs.

I installed fpc 3.2.4rc1, but that didn't seem to help any with this issue
« Last Edit: October 31, 2025, 03:46:28 am by rossh_lz »

mischi

  • Full Member
  • ***
  • Posts: 189
Re: Is there a "known good" combination of macOS silicon + FPC + Lazarus
« Reply #5 on: November 14, 2025, 02:18:20 pm »
The idea of the lazarus package in MacPorts (https://www.macports.org/) is to do exactly what you are asking for.

With

  sudo port install lazarus

lazarus and its dependences fpc-sources and fpc are installed and Lazarus can be executed from the folder /Applications/MacPorts.



MiSchi

swissbob

  • Newbie
  • Posts: 3
Re: Is there a "known good" combination of macOS silicon + FPC + Lazarus
« Reply #6 on: November 18, 2025, 02:36:53 am »
I set up the MacPorts specifically for this and it ended up with the same compile errors when trying to compile the default little project after the installation completed successfully.  fpcupdeluxe works with the latest fixes versions.  So that is where I am.

Thaddy

  • Hero Member
  • *****
  • Posts: 18521
  • Here stood a man who saw the Elbe and jumped it.
Re: Is there a "known good" combination of macOS silicon + FPC + Lazarus
« Reply #7 on: November 18, 2025, 09:17:46 am »
  sudo port install lazarus
Yeah, right...
USING PORT FORCES AN INTEL BASED FPC/LAZARUS INSTALL ON AARCH64 not native aarch64.
Now I know where this came from. It is rosetta 2 code.

Nice advice. <sarcasm on>

Use fpcupdeluxe, which installs native aarch64.

If you'd like me to do so I can write-up the steps I took for my M4 to do that manually.
Use fpcupdeluxe: the native aarch64 is much faster in the extreme.
</sarcasm>
I know you are busy to fix this...and respect that.
« Last Edit: November 18, 2025, 09:38:50 am by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

dergen

  • New member
  • *
  • Posts: 8
Re: Is there a "known good" combination of macOS silicon + FPC + Lazarus
« Reply #8 on: November 18, 2025, 10:23:09 am »
Mac mini M4
macOS 26.1
Xcode 26.1
FPC 3.2.2
Lazarus 4.4
Using Fpcupdeluxe to install FPC and Lazarus

So far, I'm debugging all the personal projects I've tested on this Mac without any problems.

swissbob

  • Newbie
  • Posts: 3
Re: Is there a "known good" combination of macOS silicon + FPC + Lazarus
« Reply #9 on: November 20, 2025, 07:44:56 am »
Mac mini M4
macOS 26.1
Xcode 26.1
FPC 3.2.2
Lazarus 4.4
Using Fpcupdeluxe to install FPC and Lazarus

So far, I'm debugging all the personal projects I've tested on this Mac without any problems.

Yep, another vote for this approach.  The only way I got it all working.

mischi

  • Full Member
  • ***
  • Posts: 189
Re: Is there a "known good" combination of macOS silicon + FPC + Lazarus
« Reply #10 on: November 20, 2025, 02:47:09 pm »
Yeah, right...
USING PORT FORCES AN INTEL BASED FPC/LAZARUS INSTALL ON AARCH64 not native aarch64.
Now I know where this came from. It is rosetta 2 code.

...

Not quite. Initially, I used ppcx64 in the first step of bootstrapping the native ppca64 compiler, but only there. I considered this a fair solution, which worked as intended upto macOS 26. With the absence of Rosetta 2 on macOS26 as default, a aarch64 bootstrap compiler was required. Once I had this achieved, I backported this for all aarch64 versions of macOS.

Current situation: Lazarus 4.4 cocoa is ready. Pull requests for qt5 and qt6 variants are accepted, too. Feedback welcome.
« Last Edit: November 23, 2025, 02:04:41 pm by mischi »

Thaddy

  • Hero Member
  • *****
  • Posts: 18521
  • Here stood a man who saw the Elbe and jumped it.
Re: Is there a "known good" combination of macOS silicon + FPC + Lazarus
« Reply #11 on: November 20, 2025, 04:55:10 pm »
The "not quite", I forgive you, it is a Trumpian way to express truth, but thanks for the good work.  ;)
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12566
  • FPC developer.
Re: Is there a "known good" combination of macOS silicon + FPC + Lazarus
« Reply #12 on: November 20, 2025, 05:13:35 pm »
The "not quite", I forgive you, it is a Trumpian way to express truth, but thanks for the good work.  ;)

The port is native, just the bootstrap isn't.

 

TinyPortal © 2005-2018