Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
juhp opened this issue Jun 19, 2022 · 3 comments · May be fixed by #322

Comments

@juhp
Copy link

juhp commented Jun 19, 2022

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 juhp mentioned this issue Jun 19, 2022
sevanspowell added a commit to IntersectMBO/cardano-addresses that referenced this issue Jun 21, 2022
- Update index-state to make required version of semialign available to aeson2.
- Constrain cborg to <= 0.2.5.0 due to issues building with ghc-8.10.7:
  well-typed/cborg#293
@swt2c
Copy link

swt2c commented Jul 29, 2022

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

@juhp juhp changed the title cborg-0.2.6+ fails to build with i686: Couldn't match expected type ‘Int64#’ with actual type ‘Int#’ etc cborg-0.2.6+ fails to build for 32bit: Couldn't match expected type ‘Int64#’ with actual type ‘Int#’ etc Mar 16, 2023
@juhp
Copy link
Author

juhp commented Mar 16, 2023

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

@juhp
Copy link
Author

juhp commented Mar 16, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants