bjpop / language-python

A parser for Python 2.x and 3.x written in Haskell
157 stars 46 forks source link

'stack build' fails with a GHC panic !? #73

Open ocramz opened 2 years ago

ocramz commented 2 years ago
$ stack build
ghc: panic! (the 'impossible' happened)
  (GHC version 8.2.2 for x86_64-apple-darwin):
    Prelude.chr: bad argument: 1543503875

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

--  While building simple Setup.hs (scroll up to its section to see the error) using:
      /Users/marco/.stack/programs/x86_64-osx/ghc-8.2.2/bin/ghc-8.2.2 -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.0.1.0 /Users/marco/.stack/setup-exe-src/setup-mPHDZzAJ.hs /Users/marco/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -o /Users/marco/.stack/setup-exe-cache/x86_64-osx/tmp-Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2
    Process exited with code: ExitFailure 1
ocramz commented 2 years ago

Strangely, I'm able to import and use this library in a project, but unable to build it standalone.

ocramz commented 2 years ago

I'm guessing this is due to stack not handling build-tools correctly (making GHC choke on an unrecognized token, which could only be from an Alex .x or Happy .y file) , since 'cabal build' works as expected.

ocramz commented 2 years ago

Update : this seems to be specific to GHC 8.2, since bumping the Stackage LTS version to 19.12 (== GHC 9.0.2) makes the problem disappear.