Bug 1737587

Summary: ppc64le FTBFS gtk2hs-buildtools-0.13.5.0 with ghc-8.6.5
Product: [Fedora] Fedora Reporter: Jens Petersen <petersen>
Component: gtk2hs-buildtoolsAssignee: Jens Petersen <petersen>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: dan, hannsj_uhl, petersen
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Unspecified   
Whiteboard:
Fixed In Version: gtk2hs-buildtools-0.13.8.0-3.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-10 01:29:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1071880    

Description Jens Petersen 2019-08-05 18:09:02 UTC
Description of problem:
gtk2hs-buildtools is failing on ppc64le

Version-Release number of selected component (if applicable):
gtk2hs-buildtools-0.13.5.0
ghc-8.6.5-100.fc31

How reproducible:
100%

Steps to Reproduce:
1. Try to build on ppc64le

Actual results:
https://koji.fedoraproject.org/koji/taskinfo?taskID=36813752
https://koji.fedoraproject.org/koji/taskinfo?taskID=36814173

BUILDSTDERR: [43 of 46] Compiling GenBind
:
:
BUILDSTDERR: /builddir/build/BUILD/gtk2hs-buildtools-0.13.5.0/dist/build/libHSgtk2hs-buildtools-0.13.5.0-KQlf14Qb9I4Aj3qfo8QuZi.a(Binary.o)(.data+0x1798): error: undefined reference to 'crcF_closure'
BUILDSTDERR: /builddir/build/BUILD/gtk2hs-buildtools-0.13.5.0/dist/build/libHSgtk2hs-buildtools-0.13.5.0-KQlf14Qb9I4Aj3qfo8QuZi.a(Binary.o)(.data.rel.ro+0x4720): error: undefined reference to 'crcF_closure'
BUILDSTDERR: /builddir/build/BUILD/gtk2hs-buildtools-0.13.5.0/dist/build/libHSgtk2hs-buildtools-0.13.5.0-KQlf14Qb9I4Aj3qfo8QuZi.a(Binary.o)(.data.rel.ro+0x4740): error: undefined reference to 'crcF_closure'
BUILDSTDERR: /builddir/build/BUILD/gtk2hs-buildtools-0.13.5.0/dist/build/libHSgtk2hs-buildtools-0.13.5.0-KQlf14Qb9I4Aj3qfo8QuZi.a(Binary.o)(.data.rel.ro+0x4760): error: undefined reference to 'crcF_closure'
BUILDSTDERR: collect2: error: ld returned 1 exit status
BUILDSTDERR: `gcc' failed in phase `Linker'. (Exit code: 1)
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.8yhmTP (%build)
          ( c2hs/gen/GenBind.hs, dist/build/GenBind.p_o )
[44 of 46] Compiling Version          ( c2hs/toplevel/Version.hs, dist/build/Version.p_o )
[45 of 46] Compiling Gtk2HsC2Hs       ( c2hs/toplevel/Gtk2HsC2Hs.hs, dist/build/Gtk2HsC2Hs.p_o )
[46 of 46] Compiling Gtk2HsSetup      ( src/Gtk2HsSetup.hs, dist/build/Gtk2HsSetup.p_o )
Preprocessing executable 'gtk2hsTypeGen' for gtk2hs-buildtools-0.13.5.0..
Building executable 'gtk2hsTypeGen' for gtk2hs-buildtools-0.13.5.0..
[1 of 1] Compiling Main             ( exe/gtk2hsTypeGenMain.hs, dist/build/gtk2hsTypeGen/gtk2hsTypeGen-tmp/Main.o )
Linking dist/build/gtk2hsTypeGen/gtk2hsTypeGen ...
Preprocessing executable 'gtk2hsHookGenerator' for gtk2hs-buildtools-0.13.5.0..
Building executable 'gtk2hsHookGenerator' for gtk2hs-buildtools-0.13.5.0..
[1 of 1] Compiling Main             ( exe/gtk2hsHookGeneratorMain.hs, dist/build/gtk2hsHookGenerator/gtk2hsHookGenerator-tmp/Main.o )
Linking dist/build/gtk2hsHookGenerator/gtk2hsHookGenerator ...
Preprocessing executable 'gtk2hsC2hs' for gtk2hs-buildtools-0.13.5.0..
Building executable 'gtk2hsC2hs' for gtk2hs-buildtools-0.13.5.0..
[1 of 1] Compiling Main             ( exe/gtk2hsC2hsMain.hs, dist/build/gtk2hsC2hs/gtk2hsC2hs-tmp/Main.o )
Linking dist/build/gtk2hsC2hs/gtk2hsC2hs ...
RPM build errors:
BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.8yhmTP (%build)
Child return code was: 1

Expected results:
No error like on other archs.

Comment 1 Ben Cotton 2019-08-13 16:47:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 2 Jens Petersen 2019-09-18 07:19:35 UTC
I reported this to upstreams:

https://github.com/gtk2hs/gtk2hs/issues/279
https://gitlab.haskell.org/ghc/ghc/issues/17203

Comment 3 Jens Petersen 2020-07-20 03:39:45 UTC
I added a workaround to build with -O0.

Comment 4 Jens Petersen 2021-02-01 08:16:58 UTC
Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=61017053

Comment 5 Fedora Update System 2021-02-01 15:27:10 UTC
FEDORA-2021-173eff65d1 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-173eff65d1

Comment 6 Jens Petersen 2021-02-01 15:28:56 UTC
This would make it possible to build some of the gtk2hs packages for F32 ppc64le.

Comment 7 Fedora Update System 2021-02-02 02:05:24 UTC
FEDORA-2021-173eff65d1 has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-173eff65d1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-173eff65d1

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

Comment 8 Fedora Update System 2021-02-10 01:29:36 UTC
FEDORA-2021-173eff65d1 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.