Recent

Author Topic: Mac M1 version (ARM64)  (Read 4698 times)

marcelloh

  • Newbie
  • Posts: 2
Mac M1 version (ARM64)
« on: January 25, 2022, 11:03:28 am »
I can't find the compiled version for a Mac M1. Any hint on where to get it.
(And no: don't want to compile it myself)

mischi

  • Full Member
  • ***
  • Posts: 170
Re: Mac M1 version (ARM64)
« Reply #1 on: January 25, 2022, 11:12:24 am »
macports (https://www.macports.org) has it and chances are good that it just downloads the binary. Even if not, "sudo port install fpc" does all tricks required.

MiSchi

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Mac M1 version (ARM64)
« Reply #2 on: January 25, 2022, 11:34:34 am »
If you just want FPC, then the official installer includes a universal binary for both aarch64 and x86_64: https://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/3.2.2/fpc-3.2.2.intelarm64-macosx.dmg/download

If you also want the Lazarus IDE, the official installers include the same FPC universal binary, but the Lazarus IDE is an Intel binary: https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%202.2.0/

After installation you can rebuild Lazarus from within itself from the menu to get a native aarch64 version (but note that you will need to fix some issues - see this post.

I also make daily automated snapshots of the compiled development version of both FPC and the Lazarus IDE for aarch64 available at https://sourceforge.net/projects/macos-lazarus-snapshots/
« Last Edit: January 27, 2022, 05:46:01 am by trev »

marcelloh

  • Newbie
  • Posts: 2
Re: Mac M1 version (ARM64)
« Reply #3 on: February 06, 2022, 08:56:43 am »
Hmmm.. Didn't get any notification from the boards that there where answers. Thanks for this answer. I did not see it was a combined package.
I'm installing the Xcode tools now and see if the library is installed after that. :-)
The installation was successful, so that's a win.

However when I try something, I get errors.

ld: warning: object file (/var/folders/2j/sl_kv1311vggqj0m8jy3_w7w0000gn/T/go-link-2730612095/000011.o) was built for newer macOS version (12.0) than being linked (11.0)
ld: warning: object file (/var/folders/2j/sl_kv1311vggqj0m8jy3_w7w0000gn/T/go-link-2730612095/000012.o) was built for newer macOS version (12.0) than being linked (11.0)
dlopen err: dlopen(liblcl.dylib, 0x0009): tried: 'liblcl.dylib' (no such file), '/usr/local/lib/liblcl.dylib' (no such file), '/usr/lib/liblcl.dylib' (no such file), '/Users/marcelloh/data/go-private/Test/liblcl.dylib' (no such file), '/usr/local/lib/liblcl.dylib' (no such file), '/usr/lib/liblcl.dylib' (no such file)
panic: dlopen("liblcl.dylib"), failed.
« Last Edit: February 06, 2022, 09:07:28 am by marcelloh »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Mac M1 version (ARM64)
« Reply #4 on: February 06, 2022, 10:24:31 am »
You did install the Xcode command line tools BEFORE installing FPC, correct?

You are trying to compile for Darwin, correct?

Did you install FPC or FPC + Lazarus?

Which installation method did you use?
« Last Edit: February 06, 2022, 10:37:27 am by trev »

 

TinyPortal © 2005-2018