Lazarus
Installation => macOS / Mac OS X => Topic started by: mrmaxmusterman 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).
-
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.
-
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".
-
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
-
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?
-
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.
-
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.
-
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.
-
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.
-
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!
-
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.
-
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.
-
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 (https://wiki.lazarus.freepascal.org/macOS_Big_Sur_changes_for_developers#ARM64.2FAArch64.2FApple_Silicon_Support) 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.