Recent

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

adderthorn

  • New Member
  • *
  • Posts: 17
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: 884
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: 1508
  • 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.
Lazarus 2.1 r65061 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.3 r65500 FPC 3.3.1 r49634 macOS 11.5 aarch64 Xcode 12.5.1
Lazarus 2.1 r61574 FPC 3.3.1 r42318 FreeBSD 12.1 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

adderthorn

  • New Member
  • *
  • Posts: 17
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