panic: Prelude.chr: bad argument on GHC 8.6.5
Environment
- GHC version used: GHC 9.0.2
- Stack version used: 2.7.5
- System Architecture: x86_64
- Operating System: Arch Linux
Summary
I was trying to set up my development environment, the VSCode extensions, but I couldn't.
Steps to reproduce
git clone https://github.com/haskell/haskell-ide-engine --recurse-submodules
cd haskell-ide-engine
stack ./install.hs hie-9.0.2
Something was wrong..
ghc: panic! (the 'impossible' happened)
(GHC version 8.6.5 for x86_64-unknown-linux):
Prelude.chr: bad argument: 1526726659
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:
/home/leandro/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/bin/ghc-8.6.5 -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.4.0.1 /home/leandro/.stack/setup-exe-src/setup-mPHDZzAJ.hs /home/leandro/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -o /home/leandro/.stack/setup-exe-cache/x86_64-linux-tinfo6/tmp-Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5
Process exited with code: ExitFailure 1
Then, I so I went to /home/leandro/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/bin directory, and opened the ghc-8.6.5 script. This is the script:
#!/bin/sh
exedir="/home/leandro/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/lib/ghc-8.6.5/bin"
exeprog="ghc-stage2"
executablename="$exedir/$exeprog"
datadir="/home/leandro/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/share"
bindir="/home/leandro/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/bin"
topdir="/home/leandro/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/lib/ghc-8.6.5"
executablename="$exedir/ghc"
exec "$executablename" -B"$topdir" ${1+"$@"}
The binaries in this directory are:
- ghc
- ghc-iserv-dyn
- ghc-pkg
- haddock
- hpc
- runghc
- ghc-iserv
- ghc-iserv-prof
- ghc-split
- hp2ps
- hsc2hs
- unlit
But there is no executable exeprog="ghc-stage2"
, so I don't know what to do at this point, I need help.