Recent

Author Topic: Current State of Lazarus on Apple Silicon + Future Plans ?  (Read 13127 times)

mrmaxmusterman

  • New Member
  • *
  • Posts: 18
Current State of Lazarus on Apple Silicon + Future Plans ?
« on: June 03, 2021, 09:26:46 pm »
So my question is how the current state of Lazarus on Apple Silicon (e.g. Apple M1) looks like and how the future looks like when talking about a native ARM64 version for apple silicon.
IMO (someone that will switch from windows to macos), the install of lazarus (native) on Apple M1 looks quite difficult compared to the windows side of things (+ linux) and therefore should be made easier (e.g. by publishing a native version).

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Current State of Lazarus on Apple Silicon + Future Plans ?
« Reply #1 on: June 03, 2021, 09:30:39 pm »
The first version of FPC with macOS/ARM64 support was only recently released, so it's normal that existing Lazarus releases aren't built with it yet. The next release will probably include it, since there are no known (major) problems.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Current State of Lazarus on Apple Silicon + Future Plans ?
« Reply #2 on: June 05, 2021, 11:20:33 am »
You can download a daily snapshot of the Lazarus and FPC development versions from https://sourceforge.net/projects/macos-lazarus-snapshots/ for M1 Macs.

Sample scripts for running Lazarus and installing FPC are provided on that page. I'm not sure if you would consider that "quite difficult".

ChristianH

  • New Member
  • *
  • Posts: 46
Re: Current State of Lazarus on Apple Silicon + Future Plans ?
« Reply #3 on: June 11, 2021, 08:41:49 pm »
You might try https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases.

What you have to do on an M1 is also to sign the build by hand. Depending where you put your binary is stored it looks like this:

sudo codesign --force --deep --sign - /fpcupdeluxe/fpcupdeluxe-aarch64-darwin-cocoa.app

Then you can select the git trunk for fpc and Lazarus. SVN will require homebrew and a few additional downloads.

Cheers
Christian

mrmaxmusterman

  • New Member
  • *
  • Posts: 18
Re: Current State of Lazarus on Apple Silicon + Future Plans ?
« Reply #4 on: July 18, 2021, 03:52:05 pm »
The next release will probably include it, since there are no known (major) problems.

What about the new Lazarus 2.2 Update and it‘s Release candidate? Will there be a stable / native installer of Lazarus + fpc in a complete Package?
« Last Edit: July 18, 2021, 04:12:52 pm by mrmaxmusterman »

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Current State of Lazarus on Apple Silicon + Future Plans ?
« Reply #5 on: July 19, 2021, 11:21:28 am »
The next release will probably include it, since there are no known (major) problems.

What about the new Lazarus 2.2 Update and it‘s Release candidate? Will there be a stable / native installer of Lazarus + fpc in a complete Package?
I assume so, but I don't know. I'm not a Lazarus developer.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Current State of Lazarus on Apple Silicon + Future Plans ?
« Reply #6 on: July 19, 2021, 02:10:00 pm »
The last info I had is that there currently is no one with an M1 in the team. So until that changes, there wont be an installer.

I don't know if the Mac-relevant team members are all regularly reading the forum. So it may be hard to get more info here. If there are no answers, I recommend to try the mail list.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Current State of Lazarus on Apple Silicon + Future Plans ?
« Reply #7 on: July 19, 2021, 08:23:16 pm »
The last info I had is that there currently is no one with an M1 in the team.
Dmitry has one. You also don't need an M1 to create M1 binaries, you can cross-compile from Intel.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5444
  • Compiler Developer
Re: Current State of Lazarus on Apple Silicon + Future Plans ?
« Reply #8 on: July 20, 2021, 10:09:48 am »
The last info I had is that there currently is no one with an M1 in the team. So until that changes, there wont be an installer.

Maybe you can ask trev for help? He has set up a nightly build for the M1 after all.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Current State of Lazarus on Apple Silicon + Future Plans ?
« Reply #9 on: August 02, 2021, 05:12:41 pm »
I use FPC and Lazarus on Mac Mini M1 since March. And earlier I used trunk versions of FPC/Lazarus on Apple DTK since July 2020.

New official FPC 3.2.2 has an installer with native compilers for Intel and ARM code. It's a very simple installation process now.

I compiled Lazarus Trunk from source code (it's really simple - just one command in Terminal). And I hope to see official Lazarus 2.2.0 for Intel and ARM soon.

My product for Mac is Universal Binary. I compiled Intel and ARM versions and merged them with lipo command line tool to create a single universal binary.

So my product works fine on Intel and M1 Macs already 4 months.

Many thanks to FPC and Lazarus teams!
« Last Edit: August 02, 2021, 05:15:39 pm by Igor Kokarev »

mrmaxmusterman

  • New Member
  • *
  • Posts: 18
Re: Current State of Lazarus on Apple Silicon + Future Plans ?
« Reply #10 on: August 02, 2021, 05:52:21 pm »
It's a very simple installation process now.
...
I compiled Lazarus Trunk from source code (it's really simple - just one command in Terminal).
...

Could you go into further detail as far as installation goes? I know that there is a forum post about installing on macOS with some annotations for Apple Silicon but I think that a "install script" or at least an Apple Silicon only guide would help a lot of users out.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Current State of Lazarus on Apple Silicon + Future Plans ?
« Reply #11 on: August 02, 2021, 07:59:30 pm »
I recently installed FPC 3.2.2 on M1 Mac from this SF page (Lazarus 2.2.0 RC1):
https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%202.2RC1/
Firstly, I installed FPC compiler and then FPC sources package. Then you'll have FPC compilers for Intel and M1 Macs.

2. Lazarus. I installed earlier Trunk version of Lazarus. In a new folder in Terminal I typed:
git clone https://gitlab.com/freepascal.org/lazarus/lazarus
Then compiled it:
make bigide
Now lazarus.app can be launched in Finder.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Current State of Lazarus on Apple Silicon + Future Plans ?
« Reply #12 on: August 03, 2021, 01:00:51 am »
Could you go into further detail as far as installation goes? I know that there is a forum post about installing on macOS with some annotations for Apple Silicon but I think that a "install script" or at least an Apple Silicon only guide would help a lot of users out.

* Lazarus 2.2 RC1 has proper installation packages for the macOS Installer. It installs universal binaries for FPC, but currently an Intel Lazarus binary. I expect/hope a universal Lazarus binary will be in the next release candidate or the official release of 2.2. The only issue with the Intel Lazarus binary is that it produces Intel binaries by default - you need to change the target CPU family from Default to aarch64 for each new project.

* Jonas has had detailed steps to compile a native aarch64 FPC from source in the Wiki since July last year.

* I have a daemon script to build native aarch64 FPC and Lazarus binaries from source which is currently inoperative while both FPC and Lazarus transition from using svn to git.

So, by far the easiest path currently is to simply install the Lazarus 2.2 RC1 packages. You can then compile a native Lazarus IDE from within the IDE using the installed FPC or keep using the Intel Lazarus IDE.


 

TinyPortal © 2005-2018