Lazarus

Programming => Operating Systems => macOS / Mac OS X => Topic started by: trev on December 05, 2020, 08:00:27 am

Title: Can the aarch64 FPC cross compiler be compiled on Mojave Intel?
Post by: trev 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
Title: Re: Can the aarch64 FPC cross compiler be compiled on Mojave Intel?
Post by: skalogryz 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.
Title: Re: Can the aarch64 FPC cross compiler be compiled on Mojave Intel?
Post by: Jonas Maebe 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.
Title: Re: Can the aarch64 FPC cross compiler be compiled on Mojave Intel?
Post by: Igor Kokarev on December 05, 2020, 02:04:52 pm
trev,

According Release Notes (https://developer.apple.com/documentation/xcode-release-notes/xcode-12_2-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.
Title: Re: Can the aarch64 FPC cross compiler be compiled on Mojave Intel?
Post by: trev 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 :)
TinyPortal © 2005-2018