Which version of free pascal for Mac Big Sur? lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- PDN777 · 2021-06-02 13:58 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 · 2021-06-02 14:08 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 · 2021-06-02 14:10 I would get  3.2.2 from here   https://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/3.2.2/ ---------------------------------------------------------------------- PDN777 · 2021-06-02 14:26 Thank you both!  :-) ---------------------------------------------------------------------- PDN777 · 2021-06-02 14:47 Quote from: ChrisR on June 02, 2021, 04:10:54 pmI 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 · 2021-06-02 16:30 Quote from: PDN777 on June 02, 2021, 04:47:24 pmChris - 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. ---------------------------------------------------------------------- Tim Kieu · 2021-06-12 19:12 You can cross-compile MacOs App for intel and Arm with FPC 3.2.2 intel-arm version! ---------------------------------------------------------------------- Igor · 2021-06-17 11:31 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 · 2021-06-17 11:37 Quote from: Igor Kokarev on June 17, 2021, 01:31:10 pmCan 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 · 2021-06-17 12:56 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 · 2021-06-21 13:09 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 · 2021-06-22 10:26 Quote from: Wallaby on June 17, 2021, 02:56:34 pmIt'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.