Lazarus

Programming => Operating Systems => macOS / Mac OS X => Topic started by: adderthorn on April 03, 2021, 03:47:24 pm

Title: Compilation Error on M1
Post by: adderthorn on April 03, 2021, 03:47:24 pm
I've been trying to compile recent versions of FPC for my M1 using these instructions. (https://wiki.freepascal.org/macOS_Big_Sur_changes_for_developers#ARM64.2FAArch64.2FApple_Silicon_Support) I am getting an error when running the second compilation step with h2pas:

Code: [Select]
make FPC=$PWD/ppca64 OPT="-ap -FD/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" -j 4 FPMAKEOPT="-T 4" OVERRIDEVERSIONCHECK=1 all > build.log
Code: [Select]
h2pas.pas(3121,40) Error: Wrong number of parameters specified for call to "init_one"
scan.pas(401,28) Error: Found declaration: constructor init_one(ttyp;presobject);
h2pas.pas(3121,40) Error: Expression must be constructor call
h2pas.pas(3121,40) Fatal: Syntax error, ")" expected but "end of file" found
Fatal: Compilation aborted

Any ideas about this?
Title: Re: Compilation Error on M1
Post by: Jonas Maebe on April 03, 2021, 07:29:15 pm
I cannot reproduce this with the latest trunk sources. It looks like your ppca64 was miscompiled. AArch64 optimisations in trunk are under heavy development and often broken, maybe it's related to that.

macOS/AArch64 support has been merged to the fixes_3_2 branch in the mean time, so I would recommend that one now.
Title: Re: Compilation Error on M1
Post by: trev on April 04, 2021, 01:09:49 am
My last M1 Mac mini compile of FPC trunk was 2 April (version in signature). No issues.
Title: Re: Compilation Error on M1
Post by: adderthorn on April 04, 2021, 05:35:37 pm
Thanks for the response. I should have been more careful! I decided to scrap my local copy and checkout a fresh copy of the fixes branch and compiled no problem. Thanks for the help!
TinyPortal © 2005-2018