Recent

Author Topic: Compilation Error on M1  (Read 1976 times)

adderthorn

  • New Member
  • *
  • Posts: 19
Compilation Error on M1
« on: April 03, 2021, 03:47:24 pm »
I've been trying to compile recent versions of FPC for my M1 using these instructions. 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?

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
Re: Compilation Error on M1
« Reply #1 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.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Compilation Error on M1
« Reply #2 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.

adderthorn

  • New Member
  • *
  • Posts: 19
Re: Compilation Error on M1
« Reply #3 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