Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure: haskell.compiler.ghc{8107,902,92*,94*} on *-darwin #367686

Open
sternenseemann opened this issue Dec 23, 2024 · 2 comments
Open

Build failure: haskell.compiler.ghc{8107,902,92*,94*} on *-darwin #367686

sternenseemann opened this issue Dec 23, 2024 · 2 comments
Labels
0.kind: build failure A package fails to build 6.topic: darwin Running or building packages on Darwin 6.topic: haskell

Comments

@sternenseemann
Copy link
Member

Almost certainly due to the LLVM 16 -> 19 upgrade in #361878. LLVM 18 seems to have added the following check: llvm/llvm-project@d506aa4. It's not yet clear to me how GHC >= 9.6 (with hadrian doesn't trip that issue).

"inplace/bin/ghc-stage1" -optc--target=arm64-apple-darwin -optc-Wall -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-Wno-aggregate-return -optc-Wno-unused-label -optc-Iincludes -optc-Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-ghcconstants/header -optc-Iincludes/dist-install/build -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-DFS_NAMESPACE=rts -optc-fno-strict-aliasing -optc-fno-common -optc-Irts/dist/build/./autogen -optc-Wno-unknown-pragmas -optc-O2 -optc-fomit-frame-pointer -optc-g -optc-DRtsWay=\"rts_v\" -optc-w -static  -H32m -O -Wall  -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Iincludes/dist-install/build -Irts -Irts/dist/build -DCOMPILING_RTS -DFS_NAMESPACE=rts -this-unit-id rts -dcmm-lint     -package-env - -i -irts -irts/dist/build -Irts/dist/build -irts/dist/build/./autogen -Irts/dist/build/./autogen            -O2 -Wcpp-undef   -Wnoncanonical-monad-instances  -c rts/StgCRun.c -o rts/dist/build/StgCRun.o

/private/tmp/nix-build-ghc-9.2.8.drv-0/ghc42576_0/ghc_1.s:54:1: error:
     error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
   |
54 | _StgReturn:
   | ^
_StgReturn:
^

/private/tmp/nix-build-ghc-9.2.8.drv-0/ghc42576_0/ghc_1.s:12:2: error:
     error: previous .cfi_startproc was here
            .cfi_startproc
            ^
   |
12 |         .cfi_startproc
   |  ^
`cc' failed in phase `Assembler'. (Exit code: 1)
make[1]: *** [rts/ghc.mk:345: rts/dist/build/StgCRun.o] Error 1
make: *** [Makefile:128: all] Error 2
@paparodeo
Copy link
Contributor

paparodeo commented Dec 23, 2024

.cfi_startproc needs to come after the label not before. we have a number of fixes for this in other packages: eg https://github.com/NixOS/nixpkgs/pull/354734/files tho IIRC fix for ghc is not as simple.

@sternenseemann
Copy link
Member Author

I figured, too, but I have not been able to figure out why GHC >= 9.6 succeeds. It does not look like they've actually reordered anything upstream from diffing the obvious rts source files between 9.4.8 to 9.6.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build 6.topic: darwin Running or building packages on Darwin 6.topic: haskell
Projects
None yet
Development

No branches or pull requests

2 participants