(I also reported this to ghc upstream: https://gitlab.haskell.org/ghc/ghc/-/issues/24348) ghc-9.6 RTS is failing to compile with current gcc-14 in Rawhide. There is not that much C code in ghc but the RTS is obviously quite sensitive and critical code. Reproducible: Always Steps to Reproduce: 1. build ghc9.6 on aarch64 in Rawhide Actual Results: Quoting from the above issue: The errors look like this: https://koji.fedoraproject.org/koji/taskinfo?taskID=112042120 https://koji.fedoraproject.org/koji/getfile?taskID=112042120&name=build.log&offset=-60000 | Run Ghc CompileCWithGhc Stage1: rts/Task.c => _build/stage1/rts/build/c/Task.thr_o | Run Ghc CompileCWithGhc Stage1: rts/adjustor/LibffiAdjustor.c => _build/stage1/rts/build/c/adjustor/LibffiAdjustor.o Command line: _build/stage0/bin/ghc -Wall -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/inplace/package.conf.d' '-this-unit-id rts-1.0.2' -i -i/builddir/build/BUILD/ghc-9.6.4/_build/stage1/rts/build -i/builddir/build/BUILD/ghc-9.6.4/_build/stage1/rts/build/autogen -i/builddir/build/BUILD/ghc-9.6.4/rts -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -I_build/stage1/rts/build/@FFIIncludeDir@ -I_build/stage1/rts/build/@LibdwIncludeDir@ -Irts/include -Irts/@FFIIncludeDir@ -Irts/@LibdwIncludeDir@ -optP-include -optP_build/stage1/rts/build/autogen/cabal_macros.h -ghcversion-file=rts/include/ghcversion.h -outputdir _build/stage1/rts/build -optc-Irts/include -optc-I_build/stage1/rts/build -optc-I_build/stage1/rts/build/include -optc-I_build/stage1/rts/build/@FFIIncludeDir@ -optc-I_build/stage1/rts/build/@LibdwIncludeDir@ -optc-Irts/include -optc-Irts/@FFIIncludeDir@ -optc-Irts/@LibdwIncludeDir@ -Wnoncanonical-monad-instances -optc-Wno-error=inline -optP-Wno-nonportable-include-path -c rts/adjustor/LibffiAdjustor.c -o _build/stage1/rts/build/c/adjustor/LibffiAdjustor.o -O0 -H64m -this-unit-id rts -XHaskell98 -no-global-package-db -package-db=/builddir/build/BUILD/ghc-9.6.4/_build/stage1/inplace/package.conf.d -ghcversion-file=rts/include/ghcversion.h -ghcversion-file=rts/include/ghcversion.h -O -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Wundef -optc-fno-strict-aliasing -optc-fomit-frame-pointer -optc-O2 -optc-Irts -optc-I_build/stage1/rts/build -Irts -I_build/stage1/rts/build '-DRtsWay="rts_v"' -DFS_NAMESPACE=rts -DCOMPILING_RTS -Wno-deprecated-flags -Wcpp-undef ===> Command failed with error code: 1 rts/adjustor/LibffiAdjustor.c: In function ‘allocate_adjustor’: rts/adjustor/LibffiAdjustor.c:42:43: error: error: passing argument 1 of ‘ffi_alloc_prep_closure’ from incompatible pointer type [-Wincompatible-pointer-types] 42 | ffi_status r = ffi_alloc_prep_closure(&writ, cif, wptr, hptr, exec_ret); | ^~~~~ | | | void ** | 42 | ffi_status r = ffi_alloc_prep_closure(&writ, cif, wptr, hptr, exec_ret); | ^ rts/adjustor/LibffiAdjustor.c:21:56: error: note: expected ‘ffi_closure **’ but argument is of type ‘void **’ 21 | static ffi_status ffi_alloc_prep_closure(ffi_closure **pclosure, ffi_cif *cif, | ~~~~~~~~~~~~~~^~~~~~~~ | 21 | static ffi_status ffi_alloc_prep_closure(ffi_closure **pclosure, ffi_cif *cif, | ^ At top level: cc1: note: unrecognized command-line option ‘-Wno-nonportable-include-path’ may have been intended to silence earlier diagnostics `gcc' failed in phase `C Compiler'. (Exit code: 1) Command failed Build failed. Expected Results: Compilation to succeed like on Intel archs I tried setting: %global build_type_safety_c 0 around the top of ghc9.6.spec but to no avail... (in fact I tried first 2 and then 1, but still didn't compile on aarch64). Funnily enough this doesn't happen with ghc9.8, ghc9.4, or ghc9.2.
Maybe I am using the wrong macro?? I thought specifically -Wincompatible-pointer-types is from level 3? But I haven't checked this very carefully yet.
I think ghc8.10 rts is also affected but with a different compilation error.
You really want to fix the code, not try to work around it. This is not valid C.
Thanks - okay this was already fixed in ghc upstream for 9.8
(I think 8.10 failure was unrelated)