cborg icon indicating copy to clipboard operation
cborg copied to clipboard

cborg-0.2.6+ fails to build for 32bit: Couldn't match expected type ‘Int64#’ with actual type ‘Int#’ etc

Open juhp opened this issue 3 years ago • 3 comments
trafficstars

With building cborg-0.2.6.0 and 0.2.7.0 with ghc-8.10.7 on i686 (Fedora Rawhide):

Building library for cborg-0.2.7.0..
[ 1 of 14] Compiling Codec.CBOR.ByteArray.Internal
[ 2 of 14] Compiling Codec.CBOR.ByteArray.Sliced
[ 3 of 14] Compiling Codec.CBOR.ByteArray
[ 4 of 14] Compiling Codec.CBOR.Decoding
src/Codec/CBOR/Decoding.hs:341:19: error:
    • Couldn't match expected type ‘Int64#’ with actual type ‘Int#’
    • In the first argument of ‘I64#’, namely ‘n’
      In the expression: I64# n
      In an equation for ‘toInt64’: toInt64 n = I64# n
    |
341 | toInt64  n = I64# n
    |                   ^
src/Codec/CBOR/Decoding.hs:345:19: error:
    • Couldn't match expected type ‘Word64#’ with actual type ‘Word#’
    • In the first argument of ‘W64#’, namely ‘n’
      In the expression: W64# n
      In an equation for ‘toWord64’: toWord64 n = W64# n
    |
345 | toWord64 n = W64# n
    |                   ^
src/Codec/CBOR/Decoding.hs:421:62: error:
    • Couldn't match expected type ‘Word#’ with actual type ‘Word64#’
    • In the first argument of ‘toWord64’, namely ‘w64#’
      In the first argument of ‘k’, namely ‘(toWord64 w64#)’
      In the expression: k (toWord64 w64#)
    |
421 |   Decoder (\k -> return (ConsumeWord64 (\w64# -> k (toWord64 w64#))))
    |                                                              ^^^^
src/Codec/CBOR/Decoding.hs:440:65: error:
    • Couldn't match expected type ‘Word#’ with actual type ‘Word64#’
    • In the first argument of ‘toWord64’, namely ‘w64#’
      In the first argument of ‘k’, namely ‘(toWord64 w64#)’
      In the expression: k (toWord64 w64#)
    |
440 |   Decoder (\k -> return (ConsumeNegWord64 (\w64# -> k (toWord64 w64#))))
    |                                                                 ^^^^
src/Codec/CBOR/Decoding.hs:480:60: error:
    • Couldn't match expected type ‘Int#’ with actual type ‘Int64#’
    • In the first argument of ‘toInt64’, namely ‘n64#’
      In the first argument of ‘k’, namely ‘(toInt64 n64#)’
      In the expression: k (toInt64 n64#)
    |
480 |   Decoder (\k -> return (ConsumeInt64 (\n64# -> k (toInt64 n64#))))
    |                                                            ^^^^
src/Codec/CBOR/Decoding.hs:520:71: error:
    • Couldn't match expected type ‘Word#’ with actual type ‘Word64#’
    • In the first argument of ‘toWord64’, namely ‘w64#’
      In the first argument of ‘k’, namely ‘(toWord64 w64#)’
      In the expression: k (toWord64 w64#)
    |
520 |   Decoder (\k -> return (ConsumeWord64Canonical (\w64# -> k (toWord64 w64#))))
    |                                                                       ^^^^
src/Codec/CBOR/Decoding.hs:539:74: error:
    • Couldn't match expected type ‘Word#’ with actual type ‘Word64#’
    • In the first argument of ‘toWord64’, namely ‘w64#’
      In the first argument of ‘k’, namely ‘(toWord64 w64#)’
      In the expression: k (toWord64 w64#)
    |
539 |   Decoder (\k -> return (ConsumeNegWord64Canonical (\w64# -> k (toWord64 w64#))))
    |                                                                          ^^^^
src/Codec/CBOR/Decoding.hs:579:69: error:
    • Couldn't match expected type ‘Int#’ with actual type ‘Int64#’
    • In the first argument of ‘toInt64’, namely ‘n64#’
      In the first argument of ‘k’, namely ‘(toInt64 n64#)’
      In the expression: k (toInt64 n64#)
    |
579 |   Decoder (\k -> return (ConsumeInt64Canonical (\n64# -> k (toInt64 n64#))))
    |                                                                     ^^^^

The build data is cached for about 2 weeks at: https://koji.fedoraproject.org/koji/taskinfo?taskID=88411747 https://kojipkgs.fedoraproject.org//work/tasks/1747/88411747/build.log

cborg-0.2.5 still builds fine with i686.

juhp avatar Jun 19 '22 01:06 juhp

Same issue on Debian, seems to be all 32-bit architectures: https://buildd.debian.org/status/package.php?p=haskell-cborg

swt2c avatar Jul 29 '22 16:07 swt2c

I am disabling cborg (and upwards to dhall) on Fedora 38+ i686. ;-(

juhp avatar Mar 16 '23 09:03 juhp

Actually should probably open a new bug for ghc9: let me do that.

juhp avatar Mar 16 '23 10:03 juhp