Skip to content

GHC 9.8.1 doesn't build in some cases

GHC 9.8.1 fails while building the unix package under some conditions which I have yet to identify. This is observed, at very least, in the ghc/ghc.nix> build: https://gitlab.haskell.org/bgamari/ghcs-nix/-/jobs/1687441:

compiling _build/stage0/libraries/unix/build/System/Posix/Files/Common_hsc_make.c failed (exit code 1)
rsp file was: "_build/stage0/libraries/unix/build/System/Posix/Files/hsc2hscall106337-0.rsp"
command was: /nix/store/dkw46jgi8i0bq64cag95v4ywz6g9bnga-gcc-wrapper-11.3.0/bin/cc -c _build/stage0/libraries/unix/build/System/Posix/Files/Common_hsc_make.c -o _build/stage0/libraries/unix/build/System/Posix/Files/Common_hsc_make.o -I/nix/store/7rk5v990931b5568961n0yk6fp6rd0mz-gmp-with-cxx-6.2.1-dev/include -I_build/stage0/libraries/unix/build -I_build/stage0/libraries/unix/build/include -Ilibraries/unix/include -I/tmp/nix-build-ghc-9.8.1.drv-0/source/libraries/time/lib/include -I/tmp/nix-build-ghc-9.8.1.drv-0/source/_build/stage0/libraries/time/build/lib/include -I/tmp/nix-build-ghc-9.8.1.drv-0/source/libraries/bytestring/include -I/tmp/nix-build-ghc-9.8.1.drv-0/source/_build/stage0/libraries/bytestring/build/include -I/nix/store/ggcw56r0aijq2h0nw2bk432qc9a0ibai-ghc-9.6.2/lib/ghc-9.6.2/lib/x86_64-linux-ghc-9.6.2/base-4.18.0.0/include -I/nix/store/7rk5v990931b5568961n0yk6fp6rd0mz-gmp-with-cxx-6.2.1-dev/include -I/nix/store/ggcw56r0aijq2h0nw2bk432qc9a0ibai-ghc-9.6.2/lib/ghc-9.6.2/lib/x86_64-linux-ghc-9.6.2/ghc-bignum-1.3/include -I/nix/store/s7n369rhajpnfhcvx1z8ljwhkrnx6hl3-libffi-3.4.4-dev/include -I/nix/store/ggcw56r0aijq2h0nw2bk432qc9a0ibai-ghc-9.6.2/lib/ghc-9.6.2/lib/x86_64-linux-ghc-9.6.2/rts-1.0.2/include -Wall -Werror=unused-but-set-variable -Wno-error=inline -include _build/stage0/libraries/unix/build/autogen/cabal_macros.h -Dx86_64_HOST_ARCH=1 -Dlinux_HOST_OS=1 -D__GLASGOW_HASKELL__=906
error: In file included from /nix/store/l1a7p8yp0nlvghq5vifz4qr6s11frxl5-glibc-2.35-224-dev/include/dlfcn.h:24,
                 from libraries/unix/include/HsUnix.h:87,
                 from Common.hsc:32:
Common.hsc: In function ‘main’:
Common.hsc:1164:29: error: ‘struct statx’ has no member named ‘stx_mnt_id’; did you mean ‘stx_uid’?
Common.hsc:1164:5: note: in expansion of macro ‘hsc_peek’

Unfortunately, this is almost certainly due to the fact that the unix bump in 34bd605d added support for statx.

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