Cannot build: Undefined symbols for architecture arm64
Directly after a hadrian/build clean
, a build (with flavour devel2+werror
and with -j
enabled) produces
Command line: /Users/rae/local/bin/ghc -Wall -Wcompat -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage0/lib/package.conf.d' '-this-unit-id ghc-bin-9.5.20221110' '-package-id array-0.5.4.0' '-package-id base-4.16.2.0' '-package-id bytestring-0.11.3.1' '-package-id containers-0.6.6' '-package-id directory-1.3.7.1' '-package-id filepath-1.4.100.0' '-package-id ghc-9.5' '-package-id ghc-boot-9.5' '-package-id process-1.6.16.0' '-package-id transformers-0.5.6.2' '-package-id unix-2.8.0.0' -i -i/Users/rae/ghc/ghc/_build/stage0/ghc/build -i/Users/rae/ghc/ghc/_build/stage0/ghc/build/ghc/autogen -i/Users/rae/ghc/ghc/ghc -I_build/stage0/ghc/build -I/Users/rae/ghc/ghc/compiler -I/Users/rae/ghc/ghc/_build/stage0/compiler/build -I/Users/rae/ghc/ghc/libraries/process/include -I/Users/rae/ghc/ghc/_build/stage0/libraries/process/build/include -I/Users/rae/ghc/ghc/libraries/directory -I/Users/rae/ghc/ghc/_build/stage0/libraries/directory/build -I/Users/rae/ghc/ghc/libraries/unix/include -I/Users/rae/ghc/ghc/_build/stage0/libraries/unix/build/include -I/Users/rae/ghc/ghc/libraries/time/lib/include -I/Users/rae/ghc/ghc/_build/stage0/libraries/time/build/lib/include -I/Users/rae/ghc/ghc/libraries/containers/containers/include -I/Users/rae/ghc/ghc/_build/stage0/libraries/containers/containers/build/include -I/Users/rae/ghc/ghc/libraries/bytestring/include -I/Users/rae/ghc/ghc/_build/stage0/libraries/bytestring/build/include -I/Users/rae/local/stow/ghc-9.2.3/lib/ghc-9.2.3/lib/aarch64-osx-ghc-9.2.3/base-4.16.2.0/include -I/Users/rae/local/stow/ghc-9.2.3/lib/ghc-9.2.3/lib/aarch64-osx-ghc-9.2.3/ghc-bignum-1.2/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi -I/Users/rae/local/stow/ghc-9.2.3/lib/ghc-9.2.3/lib/aarch64-osx-ghc-9.2.3/rts-1.0.2/include -optP-include -optP_build/stage0/ghc/build/ghc/autogen/cabal_macros.h -optc--target=arm64-apple-darwin -outputdir _build/stage0/ghc/build -fdiagnostics-color=always -no-auto-link-packages -rtsopts -optc-Wno-unknown-pragmas -optP-Wno-nonportable-include-path _build/stage0/ghc/build/Main.o -o _build/stage0/bin/ghc -O -H64m -Wall -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -rtsopts=all '-with-rtsopts=-K512M -H -I5 -T' -threaded -XHaskell2010 -XNoImplicitPrelude -XScopedTypeVariables -XBangPatterns -I_build/stage0/compiler/build
===> Command failed with error code: 1
Undefined symbols for architecture arm64:
"_ghc_GHCziCmmToAsmziWasm_ncgWasm1_closure", referenced from:
_Luvfj_srt in libHSghc-9.5.a(CmmToAsm.o)
"_ghc_GHCziPlatformziWasm32_freeReg_closure", referenced from:
_Lr7Nx_info in libHSghc-9.5.a(Instr.o)
_Lu97o_srt in libHSghc-9.5.a(Instr.o)
_ghc_GHCziCmmToAsmziAArch64ziRegs_allocatableRegs_info in libHSghc-9.5.a(Regs.o)
_Lu7Pa_srt in libHSghc-9.5.a(Regs.o)
_ghc_GHCziPlatformziRegs_zdwfreeReg_info in libHSghc-9.5.a(Regs.o)
_Lu3EA_srt in libHSghc-9.5.a(Regs.o)
_ghc_GHCziCmmToAsmziPPCziRegs_allocatableRegs_info in libHSghc-9.5.a(Regs.o)
...
"_ghc_GHCziCmmToAsmziWasm_ncgWasm1_info", referenced from:
_ghc_GHCziCmmToAsm_nativeCodeGen1_info in libHSghc-9.5.a(CmmToAsm.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
Command failed
Build failed.
So I cannot build. This is on commit 3120a792 on a Mac. But I tried Linux also, and that too doesn't build, for a different reason: #22451 (closed).