GHC 9.2.2 fails to install on MacOS 12.3.1 (M1)
Summary
ghc 9.2.2 does not install via ghcup: configure: error: Failed to determine machine word size. Does your toolchain actually work?
Steps to reproduce
Install ghc 9.2.2 using ghcup.
The ghc-configure.log reads:
checking build system type... aarch64-apple-darwin21.4.0
checking host system type... aarch64-apple-darwin21.4.0
checking target system type... aarch64-apple-darwin21.4.0
Build platform inferred as: aarch64-apple-darwin
Host platform inferred as: aarch64-apple-darwin
Target platform inferred as: aarch64-apple-darwin
GHC build : aarch64-apple-darwin
GHC host : aarch64-apple-darwin
GHC target : aarch64-apple-darwin
LLVM target: arm64-apple-darwin
checking for path to top of build tree... /private/var/folders/f_/4nss2fbx6v93h06mbtkhkyxr0000gn/T/ghcup-a5614be6effeb499/ghc-9.2.2-aarch64-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for gsed... sed
checking for python3... /usr/bin/python3
checking Xcode version... xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
not found (too old?)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking how to run the C preprocessor... gcc -E
checking whether GCC supports -no-pie... no
checking for -ld.lld... no
checking for ld.lld... ld.lld
checking whether C compiler supports -fuse-ld=lld... yes
checking for ld.gold object merging bug (binutils 22266)... checking whether ld is GNU ld... YES
checking whether ld understands --build-id... no
checking whether ld understands -no_compact_unwind... no
checking whether ld understands -filelist... no
checking for -strip... no
checking for strip... strip
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for llc-13... no
checking for llc-13.0... no
checking for llc-12... no
checking for llc-12.0... no
checking for llc-11... no
checking for llc-11.0... no
checking for llc-10... no
checking for llc-10.0... no
checking for llc-9... no
checking for llc-9.0... no
checking for llc... llc
checking llc version (13.0.1) is between 9 and 13... no
configure: We only support llvm 9 to 13 (found 13.0.1).
checking for opt-13... no
checking for opt-13.0... no
checking for opt-12... no
checking for opt-12.0... no
checking for opt-11... no
checking for opt-11.0... no
checking for opt-10... no
checking for opt-10.0... no
checking for opt-9... no
checking for opt-9.0... no
checking for opt... opt
checking opt version (13.0.1) is between 9 and 13... no
configure: We only support llvm 9 to 13 (found 13.0.1).
configure: $CC is not gcc; assuming it's a reasonably new C compiler
checking whether GCC supports -no-pie... no
checking for extra options to pass gcc when compiling via C...
checking Setting up CFLAGS, LDFLAGS, IGNORE_LINKER_LD_FLAGS and CPPFLAGS... done
checking Setting up CONF_CC_OPTS_STAGE0, CONF_GCC_LINKER_OPTS_STAGE0, CONF_LD_LINKER_OPTS_STAGE0 and CONF_CPP_OPTS_STAGE0... done
checking Setting up CONF_CC_OPTS_STAGE1, CONF_GCC_LINKER_OPTS_STAGE1, CONF_LD_LINKER_OPTS_STAGE1 and CONF_CPP_OPTS_STAGE1... done
checking Setting up CONF_CC_OPTS_STAGE2, CONF_GCC_LINKER_OPTS_STAGE2, CONF_LD_LINKER_OPTS_STAGE2 and CONF_CPP_OPTS_STAGE2... done
checking for .subsections_via_symbols... no
checking whether your assembler supports .ident directive... no
checking for GNU non-executable stack support... no
checking whether CC supports --target... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking size of void *... 0
configure: error: Failed to determine machine word size. Does your toolchain actually work?
Expected behavior
ghc 9.2.2 should install
Environment
- GCC version used:
Apple clang version 13.1.6 (clang-1316.0.21.2)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Optional:
-
Operating System: Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000
-
System Architecture: Apple M1