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

Package build failures resolver ghc-9.0.1 #5486

Closed
shayne-fletcher opened this issue Feb 7, 2021 · 4 comments · Fixed by #5508
Closed

Package build failures resolver ghc-9.0.1 #5486

shayne-fletcher opened this issue Feb 7, 2021 · 4 comments · Fixed by #5508

Comments

@shayne-fletcher
Copy link

General summary

Building ghc-lib-parser with resolver ghc-9.0.1 fails (the package is known to build with cabal / ghc-9.0).

Steps to reproduce

#!/usr/bin/env bash

set -euo pipefail

# This version of ghc-lib-parser is known to build with cabal/ghc-9.0.
ghc_lib_parser=ghc-lib-parser-9.0.1.20210207
curl -o ${ghc_lib_parser}.tar.gz https://hackage.haskell.org/package/${ghc_lib_parser}/${ghc_lib_parser}.tar.gz
gunzip ${ghc_lib_parser}.tar.gz && tar xvf ${ghc_lib_parser}.tar
cd ${ghc_lib_parser}

# Select ghc-9.0.1 for the build compiler.
cat > stack.yaml <<EOF
resolver: ghc-9.0.1
packages:
- .
extra-deps:
- alex-3.2.6
- happy-1.20.0
EOF

# Try to build; observe errors.
stack build --verbosity=debug

Expected

The build succeeds.

Actual

After successfully compiling all the modules in the package an exception is raised.

....
2021-02-07 01:31:58.020433: [info] [264 of 264] Compiling GHC.Driver.Hooks
2021-02-07 01:32:02.694253: [debug] Process finished in 377998ms: /Users/shayne/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_3.4.0.0_ghc-9.0.1 --builddir=.stack-work/dist/x86_64-osx/Cabal-3.4.0.0 build lib:ghc-lib-parser --ghc-options " -fdiagnostics-color=always"
2021-02-07 01:32:02.694375: [debug] Start: getPackageFiles /Users/shayne/tmp/tt/ghc-lib-parser-9.0.1.20210207/ghc-lib-parser.cabal
2021-02-07 01:32:03.373370: [debug] Failed to decode module interface:
/Users/shayne/tmp/tt/ghc-lib-parser-9.0.1.20210207/.stack-work/dist/x86_64-osx/Cabal-3.4.0.0/build/GHC/BaseDir.hi
Decoding failure: not enough bytes
...
2021-02-07 01:32:03.380782: [debug] Finished with exception in 686ms: getPackageFiles /Users/shayne/tmp/tt/ghc-lib-parser-9.0.1.20210207/ghc-lib-parser.cabal
Exception thrown: Prelude.chr: bad argument: 251658397
2021-02-07 01:32:03.381224: [error] Prelude.chr: bad argument: 251658397

Stack version

$ stack --version
Version 2.5.1, Git revision d6ab861544918185236cf826cb2028abb266d6d5 x86_64 hpack-0.33.0

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository
@qrilka
Copy link
Contributor

qrilka commented Feb 7, 2021

@shayne-fletcher I think this is another occurrence of #5134 which is unfortunately not yet resolved.

@shayne-fletcher
Copy link
Author

Any updates? This is quite the blocker for ghc-lib/ghc-9.0 😔

@asr
Copy link

asr commented Feb 22, 2021

We are getting a similar error in Agda (see agda/agda#4955 (comment)):

Agda> configure (lib + exe + test)
Configuring Agda-2.6.2...
Progress 1/2
Prelude.chr: bad argument: 2382365296

Blocking agda/agda#4955.

@asr asr mentioned this issue Feb 22, 2021
19 tasks
mheinzel added a commit to mheinzel/messaging that referenced this issue Mar 23, 2021
usage:
cabal build messaging-client-terminal --project-file=ghc9.cabal.project

Stack seems to break with GHC 9.0.1:
commercialhaskell/stack#5486

With Cabal everything except the GTK client builds, but for that we need
a Hackage release of gi-haskell-0.25.0:
haskell-gi/haskell-gi#336
snoyberg added a commit that referenced this issue Mar 24, 2021
@snoyberg
Copy link
Contributor

Please see #5508

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.

4 participants