Skip to content

Package build failures resolver ghc-9.0.1 #5486

Closed

Description

@shayne-fletcher

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

Activity

  1. qrilka commented on Feb 7, 2021

    @qrilka
    Contributor

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

  2. shayne-fletcher commented on Feb 16, 2021

    @shayne-fletcher
    Author

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

  3. asr commented on Feb 22, 2021

    @asr

    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.

  4. added a commit that references this issue on Mar 24, 2021
    31dc808
  5. snoyberg commented on Mar 24, 2021

    @snoyberg
    Contributor

    Please see #5508

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions