Bug 1648537 - ghc-8.6 fails to build on s390x
Summary: ghc-8.6 fails to build on s390x
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ghc
Version: rawhide
Hardware: s390x
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker F-ExcludeArch-s390x
TreeView+ depends on / blocked
 
Reported: 2018-11-10 12:34 UTC by Jens Petersen
Modified: 2019-04-10 07:32 UTC (History)
4 users (show)

Fixed In Version: ghc-8.6-2820190330091454.9c690d0e ghc-8.6-3020190330091454.a5b0195c ghc-8.6-2920190330091454.6c81f848
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-10 06:33:57 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
IBM Linux Technology Center 176017 None None None 2019-07-27 12:11:58 UTC

Description Jens Petersen 2018-11-10 12:34:03 UTC
Description of problem:
ghc-8.6 fails to build on s390x.

"/usr/bin/ghc" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O -Wall  -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -package-db libra\
ries/bootstrapping.conf  -this-unit-id ghc-8.6.2 -hide-all-packages -i -icompiler/backpack -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -ico\
mpiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/\
simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/stage1/build -Icompiler/stage1/bui\
ld -icompiler/stage1/build/./autogen -Icompiler/stage1/build/./autogen -Icompiler/. -Icompiler/parser -Icompiler/utils -Icompiler/stage1 -Icompiler/stage1/build/. -Icompiler/stage1/build/pa\
rser -Icompiler/stage1/build/utils -Icompiler/stage1/build/stage1    -optP-include -optPcompiler/stage1/build/./autogen/cabal_macros.h -package-id array-0.5.2.0 -package-id base-4.11.1.0 -p\
ackage-id binary-0.8.6.0 -package-id bytestring-0.10.8.2 -package-id containers-0.5.11.0 -package-id deepseq-1.4.3.0 -package-id directory-1.3.1.5 -package-id filepath-1.4.2 -package-id ghc\
-boot-8.6.2 -package-id ghc-boot-th-8.6.2 -package-id ghc-heap-8.6.2 -package-id ghci-8.6.2 -package-id hpc-0.6.0.3 -package-id process-1.6.3.0 -package-id template-haskell-2.14.0.0 -packag\
e-id terminfo-0.4.1.2 -package-id time-1.8.0.2 -package-id transformers-0.5.5.0 -package-id unix-2.7.2.2 -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-in\
stances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -DNO_REGS -DNOSMP -optc-DNOSMP -DSTAGE=1 -Rghc-timing  -Wcpp-undef  -no-user-package-db -rtsopts \
       -odir compiler/stage1/build -hidir compiler/stage1/build -stubdir compiler/stage1/build    -c compiler/utils/Binary.hs -o compiler/stage1/build/Binary.o
/tmp/ghc17964_0/ghc_3.hc: In function ‘_cP0l’:

/tmp/ghc17964_0/ghc_3.hc:59053:61: error:
     error: ‘stg_MUT_ARR_PTRS_FROZEN0_info’ undeclared (first use in this function); did you mean ‘stg_MUT_ARR_PTRS_FROZEN_DIRTY_info’?
     ((struct {W_ x;} __attribute__((packed))*) _sIxm)->x = (W_)&stg_MUT_ARR_PTRS_FROZEN0_info;
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                 stg_MUT_ARR_PTRS_FROZEN_DIRTY_info
      |
59053 | ((struct {W_ x;} __attribute__((packed))*) _sIxm)->x = (W_)&stg_MUT_ARR_PTRS_FROZEN0_info;
      |                                                             ^

/tmp/ghc17964_0/ghc_3.hc:59053:61: error:
     note: each undeclared identifier is reported only once for each function it appears in
      |
59053 | ((struct {W_ x;} __attribute__((packed))*) _sIxm)->x = (W_)&stg_MUT_ARR_PTRS_FROZEN0_info;
      |                                                             ^
/tmp/ghc17964_0/ghc_3.hc: In function ‘_cP0x’:

/tmp/ghc17964_0/ghc_3.hc:59151:61: error:
     error: ‘stg_MUT_ARR_PTRS_FROZEN0_info’ undeclared (first use in this function); did you mean ‘stg_MUT_ARR_PTRS_FROZEN_DIRTY_info’?
     ((struct {W_ x;} __attribute__((packed))*) _sIxm)->x = (W_)&stg_MUT_ARR_PTRS_FROZEN0_info;
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                 stg_MUT_ARR_PTRS_FROZEN_DIRTY_info
      |
59151 | ((struct {W_ x;} __attribute__((packed))*) _sIxm)->x = (W_)&stg_MUT_ARR_PTRS_FROZEN0_info;
      |                                                             ^
/tmp/ghc17964_0/ghc_3.hc: In function ‘sIUt_entry’:

/tmp/ghc17964_0/ghc_3.hc:64450:61: error:
     error: ‘stg_MUT_ARR_PTRS_FROZEN0_info’ undeclared (first use in this function); did you mean ‘stg_MUT_ARR_PTRS_FROZEN_DIRTY_info’?
     ((struct {W_ x;} __attribute__((packed))*) _sIUr)->x = (W_)&stg_MUT_ARR_PTRS_FROZEN0_info;
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                 stg_MUT_ARR_PTRS_FROZEN_DIRTY_info
      |
64450 | ((struct {W_ x;} __attribute__((packed))*) _sIUr)->x = (W_)&stg_MUT_ARR_PTRS_FROZEN0_info;
      |                                                             ^
/tmp/ghc17964_0/ghc_3.hc: In function ‘_cPBL’:

/tmp/ghc17964_0/ghc_3.hc:64777:61: error:
     error: ‘stg_MUT_ARR_PTRS_FROZEN0_info’ undeclared (first use in this function); did you mean ‘stg_MUT_ARR_PTRS_FROZEN_DIRTY_info’?
     ((struct {W_ x;} __attribute__((packed))*) _sIUr)->x = (W_)&stg_MUT_ARR_PTRS_FROZEN0_info;
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                 stg_MUT_ARR_PTRS_FROZEN_DIRTY_info
      |
64777 | ((struct {W_ x;} __attribute__((packed))*) _sIUr)->x = (W_)&stg_MUT_ARR_PTRS_FROZEN0_info;
      |                                                             ^
/tmp/ghc17964_0/ghc_3.hc: In function ‘_cPCg’:

/tmp/ghc17964_0/ghc_3.hc:64865:61: error:
     error: ‘stg_MUT_ARR_PTRS_FROZEN0_info’ undeclared (first use in this function); did you mean ‘stg_MUT_ARR_PTRS_FROZEN_DIRTY_info’?
     ((struct {W_ x;} __attribute__((packed))*) _sIUr)->x = (W_)&stg_MUT_ARR_PTRS_FROZEN0_info;
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                 stg_MUT_ARR_PTRS_FROZEN_DIRTY_info
      |
64865 | ((struct {W_ x;} __attribute__((packed))*) _sIUr)->x = (W_)&stg_MUT_ARR_PTRS_FROZEN0_info;
      |                                                             ^
`gcc' failed in phase `C Compiler'. (Exit code: 1)
<<ghc: 5357855672 bytes, 422 GCs, 45617667/116070576 avg/max bytes residency (13 samples), 286M in use, 0.001 INIT (0.001 elapsed), 6.855 MUT (7.660 elapsed), 3.171 GC (3.169 elapsed) :ghc>\
>
make[1]: *** [compiler/ghc.mk:446: compiler/stage1/build/Binary.o] Error 1

Version-Release number of selected component (if applicable):
ghc-8.6.1
ghc-8.6.2

How reproducible:
100%

Steps to Reproduce:
1. Build (unregisterized) ghc-8.6 on s390x with (unregisterized) ghc-8.2 or 8.4.

Actual results:
Fails as above

Expected results:
No failure

Additional info:
Apparently this is due to RTS symbol name choices.
Seems somehow the old and new symbol names are getting mixed up,
likely due to relative include paths...

Comment 1 Jens Petersen 2018-11-10 14:56:03 UTC
I mentioned this issue upstream in:
https://ghc.haskell.org/trac/ghc/ticket/8040#comment:10
https://ghc.haskell.org/trac/ghc/ticket/15201#comment:8

but I think I will report it separately.

Comment 2 Jens Petersen 2018-11-10 14:59:17 UTC
This affects the Fedora ghc:8.6 module.

Comment 3 Jens Petersen 2018-11-20 03:05:56 UTC
https://ghc.haskell.org/trac/ghc/ticket/15913

Comment 4 Jens Petersen 2019-03-08 01:47:08 UTC
I wish we had better (first class) s390x support in ghc.

Hanns-Joachim, any thoughts?

Comment 5 Jens Petersen 2019-03-22 08:26:44 UTC
I think I have a workaround for this.

Comment 6 Fedora Update System 2019-03-31 09:44:43 UTC
ghc-8.6-3020190330091454.a5b0195c has been submitted as an update to Fedora 30 Modular. https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2019-4e78483146

Comment 7 Fedora Update System 2019-03-31 09:44:48 UTC
ghc-8.6-2920190330091454.6c81f848 has been submitted as an update to Fedora 29 Modular. https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2019-9b064be4b3

Comment 8 Fedora Update System 2019-03-31 09:44:52 UTC
ghc-8.6-2820190330091454.9c690d0e has been submitted as an update to Fedora 28 Modular. https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2019-da55b0090f

Comment 9 Fedora Update System 2019-03-31 19:48:54 UTC
ghc-8.6-3020190330091454.a5b0195c has been pushed to the Fedora 30 Modular testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2019-4e78483146

Comment 10 Fedora Update System 2019-04-01 02:30:12 UTC
ghc-8.6-2920190330091454.6c81f848 has been pushed to the Fedora 29 Modular testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2019-9b064be4b3

Comment 11 Fedora Update System 2019-04-01 02:55:46 UTC
ghc-8.6-2820190330091454.9c690d0e has been pushed to the Fedora 28 Modular testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2019-da55b0090f

Comment 12 Fedora Update System 2019-04-10 06:33:57 UTC
ghc-8.6-2820190330091454.9c690d0e has been pushed to the Fedora 28 Modular stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2019-04-10 07:12:59 UTC
ghc-8.6-3020190330091454.a5b0195c has been pushed to the Fedora 30 Modular stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2019-04-10 07:32:54 UTC
ghc-8.6-2920190330091454.6c81f848 has been pushed to the Fedora 29 Modular stable repository. If problems still persist, 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.