Recent

Author Topic: Which version of free pascal for Mac Big Sur?  (Read 6749 times)

PDN777

  • New member
  • *
  • Posts: 8
Which version of free pascal for Mac Big Sur?
« on: June 02, 2021, 03:58:46 pm »
Hi,

I am on a Macbook Pro with an Intel Core i7 chip.  I was looking at the download page for Free Pascal v. 3.2.2 and I did not see a choice for this chip.  I am running Big Sur 11.2.3.  Which package (if any) will work on my machine?  Thanks!

--PDN


Hansaplast

  • Hero Member
  • *****
  • Posts: 612
  • Tweaking4All.com
    • Tweaking4All
Re: Which version of free pascal for Mac Big Sur?
« Reply #1 on: June 02, 2021, 04:08:00 pm »
For intel you'll pick the x86_64 version.
If you want to make GUI applications (not commandline), then for Big Sur you'll need to use the Cocoa widgetset.
Assuming this is what you mean (FPC+Lazarus): Lazarus macOS x86-64.

ChrisR

  • Full Member
  • ***
  • Posts: 219
Re: Which version of free pascal for Mac Big Sur?
« Reply #2 on: June 02, 2021, 04:10:54 pm »

PDN777

  • New member
  • *
  • Posts: 8
Re: Which version of free pascal for Mac Big Sur?
« Reply #3 on: June 02, 2021, 04:26:53 pm »
Thank you both!  :-)

PDN777

  • New member
  • *
  • Posts: 8
Re: Which version of free pascal for Mac Big Sur?
« Reply #4 on: June 02, 2021, 04:47:24 pm »
I would get  3.2.2 from here
  https://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/3.2.2/

Chris - excuse me for being daft, but on that page, which?  powerpc-macosx; intelarm64-macosx; intel-macosx.cross.powerpc-macosx; or intel-macosx.cross.jvm? 

Thanks!

willbprog9933

  • Jr. Member
  • **
  • Posts: 72
  • Big guy, tiny brain :P
    • BrainOut!
Re: Which version of free pascal for Mac Big Sur?
« Reply #5 on: June 02, 2021, 06:30:46 pm »
Chris - excuse me for being daft, but on that page, which?  powerpc-macosx; intelarm64-macosx; intel-macosx.cross.powerpc-macosx; or intel-macosx.cross.jvm? 

You're not daft at all -- it's a little confusing at first.  According to the readme "fpc-3.2.2.intelarm64-macosx.dmg : FPC for 32 and 64 bit Intel, and for ARM64 (M1 and later)" appears to be the one you want.

:D
macOS, Linux, FreeBSD and sometimes OpenIndiana.

Blessed, loved and forgiven! :D

Tim Kieu

  • New member
  • *
  • Posts: 5
Re: Which version of free pascal for Mac Big Sur?
« Reply #6 on: June 12, 2021, 09:12:39 pm »
You can cross-compile MacOs App for intel and Arm with FPC 3.2.2 intel-arm version!

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 349
Re: Which version of free pascal for Mac Big Sur?
« Reply #7 on: June 17, 2021, 01:31:10 pm »
Hi,

Can you explain a work of FPC 3.2.2 on M1 Macs.

If I understand rightly, FPC has several binaries:
/usr/local/bin/fpc (FPC switcher) and native compilers - aarch64/darwin and x86_64/darwin

What will happen in future when Apple remove Rosetta 2 emulator?

Can this FPC switcher and native compiles be all aarch64 binaries with compilation for x86_64 and aarch64 targets?

PascalDragon

  • Hero Member
  • *****
  • Posts: 3338
  • Compiler Developer
Re: Which version of free pascal for Mac Big Sur?
« Reply #8 on: June 17, 2021, 01:37:29 pm »
Can this FPC switcher and native compiles be all aarch64 binaries with compilation for x86_64 and aarch64 targets?

Yes, they can.

I have not checked it, but it could be that they already are so called fat binaries anyway, meaning the fpc executable as well as ppcx64 and ppca64 contain code for both architectures, thus they will natively work on both architectures (in the past the same was done with PowerPC, where the fat binaries contained PowerPC, PowerPC64, i386 and x86_64 code and thus were useable on all four architectures).

Wallaby

  • New Member
  • *
  • Posts: 33
Re: Which version of free pascal for Mac Big Sur?
« Reply #9 on: June 17, 2021, 02:56:34 pm »
I have succeeded in building the entire Lazarus/FPC toolset for Aarch64, as well as cross-compiling from x86_64 to Aarch 64.

It's possible to build binaries for both architectures and join them into a fat binary with lipo. This way it'll work on any Mac (Intel or M1) with Rosetta 2 or not.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 349
Re: Which version of free pascal for Mac Big Sur?
« Reply #10 on: June 21, 2021, 03:09:44 pm »
Thanks for your replies! My product is already Universal App - x86_64 and aarch64 in one binary/library.

P.S. I just installed a new macOS 12 Monterey Beta on my Mac mini M1. My product works fine on Monterey. I didn't check Lazarus/FPC yet, but guess that all will be fine.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1589
  • Former Delphi 1-7, 10.2 user
Re: Which version of free pascal for Mac Big Sur?
« Reply #11 on: June 22, 2021, 12:26:05 pm »
It's possible to build binaries for both architectures and join them into a fat binary with lipo. This way it'll work on any Mac (Intel or M1) with Rosetta 2 or not.

It may work on the machine which did the build as the Apple linker ad hoc signs the binary, but the aarch64 binary will not execute on a different M1 unless it is validly signed with an Apple Developer Certificate.
Lazarus 2.3 2021-08-10 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.3 r65500 FPC 3.3.1 r49634 macOS 11.6 aarch64 Xcode 13
Lazarus 2.3 2021-08-11 FPC 3.2.2 FreeBSD 13.0 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

 

TinyPortal © 2005-2018