Skip to content

Can't build with Hadrian on M1 and GHC 9.0.2

With a ghcup-installed GHC 9.0.2, building with Hadrian fails on a fresh checkout. My flavour is devel2+werror, and I'm running on a M1 Mac.

Up to date
| Run Cc (FindCDependencies CDep) Stage1: libraries/ghc-bignum/cbits/gmp_wrappers.c => _build/stage1/libraries/ghc-bignum/build/c/cbits/gmp_wrappers.o.d
Command line: /usr/bin/gcc -std=c99 -Wall --target=arm64-apple-darwin -E -MM -MG -MF _build/stage1/libraries/ghc-bignum/build/c/cbits/gmp_wrappers.o.d -MT _build/stage1/libraries/ghc-bignum/build/c/cbits/gmp_wrappers.o -Irts/include -I_build/stage1/libraries/ghc-bignum/build -I_build/stage1/libraries/ghc-bignum/build/include/ -I_build/stage1/libraries/ghc-bignum/build/include -Ilibraries/ghc-bignum/include/ -Ilibraries/ghc-bignum/include -I/Users/rae/ghc/ghc/_build/stage1/lib/aarch64-osx-ghc-9.5.20220606/rts-1.0.2/include -x c libraries/ghc-bignum/cbits/gmp_wrappers.c
===> Command failed with error code: 1
libraries/ghc-bignum/cbits/gmp_wrappers.c:30:3: error: __GNU_MP_VERSION not defined
# error __GNU_MP_VERSION not defined
  ^
libraries/ghc-bignum/cbits/gmp_wrappers.c:42:3: error: WORD_SIZE_IN_BITS != GMP_LIMB_BITS not supported
# error WORD_SIZE_IN_BITS != GMP_LIMB_BITS not supported
  ^
2 errors generated.
Command failed
Build failed.

What's odd is that last night, I got a different error, involving removeLink. I scrubbed my terminal window's history in an attempt to get the error more clearly, but then I got the error listed above.

make works fine.

If I lose make, I'll be completely unable to build GHC locally:

The ice is thin.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information