Bug 2141054 - [s390x] ghc-9.4 fails to build with llvm/Hadrian
Summary: [s390x] ghc-9.4 fails to build with llvm/Hadrian
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: ghc9.4
Version: epel9
Hardware: s390x
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-08 15:47 UTC by Jens Petersen
Modified: 2023-01-18 00:58 UTC (History)
1 user (show)

Fixed In Version: ghc9.4-9.4.4-16.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-18 00:58:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jens Petersen 2022-11-08 15:47:57 UTC
Description of problem:
ghc-9.4.3 builds are failing in epel9 for s390x with llvm >= 13.

How reproducible:
100%

Actual results:

a. https://koji.fedoraproject.org/koji/taskinfo?taskID=93910404

| Run Ghc CompileHs Stage1: rts/StgStartup.cmm => _build/stage1/rts/build/cmm/StgStartup.thr_o
Command line: _build/stage0/bin/ghc -Wall -Wcompat -fdiagnostics-color=never -dynamic-too -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/lib/package.conf.d' '-this-unit-id rts-1.0.2' -i -i/builddir/build/BUILD/ghc-9.4.3/_build/stage1/rts/build -i/builddir/build/BUILD/ghc-9.4.3/_build/stage1/rts/build/autogen -i/builddir/build/BUILD/ghc-9.4.3/rts -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -Irts/include -optP-include -optP_build/stage1/rts/build/autogen/cabal_macros.h -ghcversion-file=rts/include/ghcversion.h -outputdir _build/stage1/rts/build -Wnoncanonical-monad-instances -optc-Wno-error=inline -optP-Wno-nonportable-include-path -c rts/StgStartup.cmm -o _build/stage1/rts/build/cmm/StgStartup.o -O0 -H64m -this-unit-id rts -XHaskell98 -no-global-package-db -package-db=/builddir/build/BUILD/ghc-9.4.3/_build/stage1/lib/package.conf.d -ghcversion-file=rts/include/ghcversion.h -ghcversion-file=rts/include/ghcversion.h -O -Irts -I_build/stage1/rts/build '-DRtsWay="rts_v"' -DFS_NAMESPACE=rts -DCOMPILING_RTS -Wno-deprecated-flags -Wcpp-undef -fllvm
===> Command failed with error code: 1
/tmp/ghc48723_0/ghc_7.s: Assembler messages:
/tmp/ghc48723_0/ghc_7.s:219:0: error:
     Fatal error: unrecognized .section attribute: want a,e,o,w,x,M,S,G,T or number
    |
219 |         .section        .data.stg_stop_thread_info,"awR",@progbits
    | ^
`gcc' failed in phase `Assembler'. (Exit code: 1)

b. https://koji.fedoraproject.org/koji/taskinfo?taskID=93895014

| Run Ghc CompileHs Stage1: rts/StgStartup.cmm => _build/stage1/rts/build/cmm/StgStartup.thr_o
Command line: _build/stage0/bin/ghc -Wall -Wcompat -fdiagnostics-color=never -hisuf thr_hi -osuf thr_o -hcsuf thr_hc -static -optc-DTHREADED_RTS -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/lib/package.conf.d' '-this-unit-id rts-1.0.2' -i -i/builddir/build/BUILD/ghc-9.4.3/_build/stage1/rts/build -i/builddir/build/BUILD/ghc-9.4.3/_build/stage1/rts/build/autogen -i/builddir/build/BUILD/ghc-9.4.3/rts -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -Irts/include -optP-include -optP_build/stage1/rts/build/autogen/cabal_macros.h -ghcversion-file=rts/include/ghcversion.h -outputdir _build/stage1/rts/build -Wnoncanonical-monad-instances -optc-Wno-error=inline -optP-Wno-nonportable-include-path -c rts/StgStartup.cmm -o _build/stage1/rts/build/cmm/StgStartup.thr_o -O0 -H64m -this-unit-id rts -XHaskell98 -no-global-package-db -package-db=/builddir/build/BUILD/ghc-9.4.3/_build/stage1/lib/package.conf.d -ghcversion-file=rts/include/ghcversion.h -ghcversion-file=rts/include/ghcversion.h -O -Irts -I_build/stage1/rts/build '-DRtsWay="rts_thr"' -DFS_NAMESPACE=rts -DCOMPILING_RTS -DTHREADED_RTS -Wno-deprecated-flags -Wcpp-undef -fllvm
===> Command failed with error code: 1
/tmp/ghc1796564_0/ghc_7.s: Assembler messages:
/tmp/ghc1796564_0/ghc_7.s:223:0: error:
     Fatal error: unrecognized .section attribute: want a,e,o,w,x,M,S,G,T or number
    |
223 |         .section        .data.stg_stop_thread_info,"awR",@progbits
    | ^
`gcc' failed in phase `Assembler'. (Exit code: 1)
Command failed
Build failed.

c. https://koji.fedoraproject.org/koji/taskinfo?taskID=93892205

| Run Ghc CompileHs Stage1: rts/Compact.cmm => _build/stage1/rts/build/cmm/Compact.thr_o
Command line: _build/stage0/bin/ghc -Wall -Wcompat -fdiagnostics-color=never -hisuf thr_hi -osuf thr_o -hcsuf thr_hc -static -optc-DTHREADED_RTS -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/lib/package.conf.d' '-this-unit-id rts-1.0.2' -i -i/builddir/build/BUILD/ghc-9.4.3/_build/stage1/rts/build -i/builddir/build/BUILD/ghc-9.4.3/_build/stage1/rts/build/autogen -i/builddir/build/BUILD/ghc-9.4.3/rts -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -Irts/include -optP-include -optP_build/stage1/rts/build/autogen/cabal_macros.h -ghcversion-file=rts/include/ghcversion.h -outputdir _build/stage1/rts/build -Wnoncanonical-monad-instances -optc-Wno-error=inline -optP-Wno-nonportable-include-path -c rts/Compact.cmm -o _build/stage1/rts/build/cmm/Compact.thr_o -O -H64m -this-unit-id rts -XHaskell98 -no-global-package-db -package-db=/builddir/build/BUILD/ghc-9.4.3/_build/stage1/lib/package.conf.d -ghcversion-file=rts/include/ghcversion.h -ghcversion-file=rts/include/ghcversion.h -O2 -Irts -I_build/stage1/rts/build '-DRtsWay="rts_thr"' -DFS_NAMESPACE=rts -DCOMPILING_RTS -DTHREADED_RTS -Wno-deprecated-flags -Wcpp-undef -fllvm
===> Command failed with error code: 1
/tmp/ghc3858075_0/ghc_7.s: Assembler messages:
/tmp/ghc3858075_0/ghc_7.s:1687:0: error:
     Fatal error: unrecognized .section attribute: want a,e,o,w,x,M,S,G,T or number
     |
1687 |         .section        ".rodata.c3s_str$def","aR",@progbits
     | ^
`gcc' failed in phase `Assembler'. (Exit code: 1)
Command failed
Build failed.

Expected results:
no failure

Additional info:
ghc 9.2.5 seems okay, as does 9.4.3 without Hadrian
Also no problem in Fedora releases, only EPEL 9

Comment 1 Jens Petersen 2022-11-08 16:16:13 UTC
Reported upstream in https://gitlab.haskell.org/ghc/ghc/-/issues/22427

Comment 2 Jens Petersen 2023-01-06 08:23:49 UTC
So actually this issue was mismatch between llvm13 and el9 binutils.
llvm12 and binutils-2.35.2 seem to be fine.

Otherwise llvm13 and gcc-toolset-12-binutils-2.38 would probably work togther (though might need newer gcc?)

See the upstream issue for the technical details

Comment 3 Fedora Update System 2023-01-09 11:09:05 UTC
FEDORA-EPEL-2023-28ee2fd59f has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-28ee2fd59f

Comment 4 Fedora Update System 2023-01-10 02:01:01 UTC
FEDORA-EPEL-2023-28ee2fd59f has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-28ee2fd59f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2023-01-18 00:58:06 UTC
FEDORA-EPEL-2023-28ee2fd59f has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.