Recent

Author Topic: Can the aarch64 FPC cross compiler be compiled on Mojave Intel?  (Read 397 times)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1217
  • Former Delphi 1-7, 10.2 User
Can the aarch64 FPC cross compiler be compiled on Mojave Intel?
« on: December 05, 2020, 08:00:27 am »
Quote from: text
/Applications/Xcode.app/Contents/Developer/usr/bin/make 'FPC=/usr/local/share/fpcsrc/fpc-3.3.1/compiler/ppcrossa64' 'OPT= ' CYCLELEVEL=3 rtl
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C /usr/local/share/fpcsrc/fpc-3.3.1/rtl 'OPT=   ' all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C darwin all
/usr/local/share/fpcsrc/fpc-3.3.1/compiler/ppcrossa64 -Ur -dFPC_USE_LIBC -Paarch64 -Ur -Xs -O2 -n -Fi../inc -Fi../aarch64 -Fi../unix -Fi../bsd -Fi../bsd/aarch64 -Fi../darwin/aarch64 -FE. -FU/usr/local/share/fpcsrc/fpc-3.3.1/rtl/units/aarch64-darwin -daarch64 -dRELEASE  -Us -Sg ../bsd/system.pp
clang: error: invalid Darwin version number: macosx11.0.0
clang: error: invalid version number in '--target=arm64-apple-macosx11.0.0'

system.pp(398) Error: Error while assembling exitcode 1
system.pp(398) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
make[5]: *** [system.ppu] Error 1
make[4]: *** [darwin_all] Error 2
make[3]: *** [rtl) Error 2
make[2]: *** [cycle] Error 2
make[1]: *** [compiler_cycle] Error 2
make: *** [build-stamp.aarch64-darwin] Error 2
o Lazarus 2.1 r64368 FPC 3.3.1 r48100 macOS 10.14.6 Xcode 11.3.1
o Lazarus 2.1 r64392 3.3.1 Jan 13 21:24 macOS 11.1 aarch64 Xcode 12.3
o Lazarus 2.1 r61574 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
o Lazarus 2.1 r61574 3.0.4 Ubuntu 20.04 Parallels VM
o Lazarus 2.0.10 3.2.0 Win10 Parallels VM

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2549
    • havefunsoft.com
Re: Can the aarch64 FPC cross compiler be compiled on Mojave Intel?
« Reply #1 on: December 05, 2020, 09:58:39 am »
It's Xcode driven.
If the latest Xcode cannot be installed on Mojave, cross-compiling might not be possible...
...OR manually copying build tools might do the trick.
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 818
Re: Can the aarch64 FPC cross compiler be compiled on Mojave Intel?
« Reply #2 on: December 05, 2020, 12:30:47 pm »
I have macOS 11.0 installed on an external SSD and by pointing FPC to its Xcode folders with the -XR/-FD parameters, I can indeed successfully cross-compile to Darwin/AArch64 from 10.14.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 304
Re: Can the aarch64 FPC cross compiler be compiled on Mojave Intel?
« Reply #3 on: December 05, 2020, 02:04:52 pm »
trev,

According Release Notes for Xcode 12.2

Quote
Xcode 12.2 requires a Mac with Apple silicon running macOS Big Sur 11 or later, or an Intel-based Mac running macOS Catalina 10.15.4 or later.

So officially it's not supported for Mojave.

I cross-compile for aarch64 and x86_64 on Macbook 12 (Intel) with Big Sur. Lazarus 2.0.10 + FPC 3.2.1 fixes.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1217
  • Former Delphi 1-7, 10.2 User
Re: Can the aarch64 FPC cross compiler be compiled on Mojave Intel?
« Reply #4 on: December 05, 2020, 10:02:47 pm »
I have macOS 11.0 installed on an external SSD and by pointing FPC to its Xcode folders with the -XR/-FD parameters, I can indeed successfully cross-compile to Darwin/AArch64 from 10.14.

Excellent, thanks Jonas. I also happen to have Big Sur on an external SSD :)
o Lazarus 2.1 r64368 FPC 3.3.1 r48100 macOS 10.14.6 Xcode 11.3.1
o Lazarus 2.1 r64392 3.3.1 Jan 13 21:24 macOS 11.1 aarch64 Xcode 12.3
o Lazarus 2.1 r61574 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
o Lazarus 2.1 r61574 3.0.4 Ubuntu 20.04 Parallels VM
o Lazarus 2.0.10 3.2.0 Win10 Parallels VM

 

TinyPortal © 2005-2018