foundation icon indicating copy to clipboard operation
foundation copied to clipboard

Compilation failure while using GHC 9.2.1-rc1

Open kgardas opened this issue 4 years ago • 8 comments

Attempt to compile basement with ghc 9.2.1-rc1 on ubuntu 20.04.x on amd64 reveals following issue:

[19 of 84] Compiling Basement.Numerical.Conversion ( Basement/Numerical/Conversion.hs, /export/home/karel/vcs/haskell-libraries/foundation/basement/dist-newstyle/build/x86_64-linux/ghc-9.2.0.20210821/basement-0.0.12/build/Basement/Numerical/Conversion.o, /export/home/karel/vcs/haskell-libraries/foundation/basement/dist-newstyle/build/x86_64-linux/ghc-9.2.0.20210821/basement-0.0.12/build/Basement/Numerical/Conversion.dyn_o )

Basement/Numerical/Conversion.hs:84:46: error:
    • Couldn't match expected type ‘Word32#’ with actual type ‘Word#’
    • In the first argument of ‘W32#’, namely
        ‘(uncheckedShiftRL# w64 32#)’
      In the first argument of ‘Word32x2’, namely
        ‘(W32# (uncheckedShiftRL# w64 32#))’
      In the expression:
        Word32x2
          (W32# (uncheckedShiftRL# w64 32#)) (W32# (narrow32Word# w64))
   |
84 | word64ToWord32s (W64# w64) = Word32x2 (W32# (uncheckedShiftRL# w64 32#)) (W32# (narrow32Word# w64))
   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^

Basement/Numerical/Conversion.hs:84:81: error:
    • Couldn't match expected type ‘Word32#’ with actual type ‘Word#’
    • In the first argument of ‘W32#’, namely ‘(narrow32Word# w64)’
      In the second argument of ‘Word32x2’, namely
        ‘(W32# (narrow32Word# w64))’
      In the expression:
        Word32x2
          (W32# (uncheckedShiftRL# w64 32#)) (W32# (narrow32Word# w64))
   |
84 | word64ToWord32s (W64# w64) = Word32x2 (W32# (uncheckedShiftRL# w64 32#)) (W32# (narrow32Word# w64))
   |                                                                                 ^^^^^^^^^^^^^^^^^

kgardas avatar Sep 20 '21 13:09 kgardas

This head.hackage patch probably fixes the issue, but I haven't checked.

sjakobi avatar Sep 20 '21 18:09 sjakobi

I can confirm that it builds fine on 9.2.1 with that patch.

josephcsible avatar Oct 30 '21 03:10 josephcsible

I took this patch and made draft PR 555. Hopefully the maintainer will chime in with what form they'd find appealing. I'm sure the HackageHead module isn't it.

TomMD avatar Oct 31 '21 21:10 TomMD

Looks like Gauge depends on basement, which causes most of benchmark suites fail to compile with GHC 9.2.1; would be great basement got a GHC 9.2.1 release.

LeventErkok avatar Nov 11 '21 16:11 LeventErkok

Looks like Gauge depends on basement, which causes most of benchmark suites fail to compile with GHC 9.2.1

gauge users can also consider switching to tasty-bench which is currently maintained more actively.

sjakobi avatar Nov 16 '21 18:11 sjakobi

This head.hackage patch probably fixes the issue, but I haven't checked.

How do I make use of this patch? I can't just cabal build can I?

Edit: Here it is

LaurentRDC avatar Nov 24 '21 15:11 LaurentRDC

basement is used for several packages, e.g. snap which do not compile with 9.2.1. I see the exact same errors as mentioned initially - 4 month later. Could you please put a patched version to hackage? Thank you!

andrewufrank avatar Dec 26 '21 23:12 andrewufrank

this issue seems to be fixed in 0.0.13

maerten avatar Mar 03 '22 14:03 maerten