Linux Bond build error - ghc: panic!
Summary
Write a brief description of the issue.
Cloned microsoft/bond in a new Ubuntu 22 WSL2 environment, build failed with GHC panic.
ghc: panic! (the 'impossible' happened)
(GHC version 8.6.5 for x86_64-unknown-linux):
Prelude.chr: bad argument: 2634022915
Issue reported on microsoft/bond and redirected here.
Steps to reproduce
Please provide a set of concrete steps to reproduce the issue.
Freshly cloned microsoft/bond repository on Linux (WSL)
cmake -B build -S .
cmake -B build -S .
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.18", minimum required is "2.7")
-- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "2.7")
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.58.0") found components: chrono date_time thread system missing components: unit_test_framework python
-- Boost Python Library:
-- Stack found at /usr/local/bin/stack. Version 2.9.3, Git revision 6cf638947a863f49857f9cfbf72a38a48b183e7e x86_64 hpack-0.35.1
-- Configuring done (35.6s)
-- Generating done (0.5s)
-- Build files have been written to: /home/user/source/rpc/bond/build
</details>
cmake --build ./build/
cmake --build ./build/
[ 9%] Generating build/gbc/gbc
/home/user/source/rpc/bond/compiler/bond.cabal was modified manually. Ignoring /home/user/source/rpc/bond/compiler/package.yaml in favor of the Cabal file.
If you want to use the package.yaml file instead of the Cabal file,
then please delete the Cabal file.
ghc: panic! (the 'impossible' happened)
(GHC version 8.6.5 for x86_64-unknown-linux):
Prelude.chr: bad argument: 2634022915
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Error: [S-6374]
While building simple Setup.hs (scroll up to its section to see the error) using:
/usr/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/user/.stack/setup-exe-src/setup-SvXsv1f_.hs /home/user/.stack/setup-exe-src/setup-shim-SvXsv1f_.hs -o /home/user/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_SvXsv1f__2.4.0.1_ghc-8.6.5
Process exited with code: ExitFailure 1
CMake Error at stack_build.cmake:30 (message):
build failed - scroll up for its output
make[2]: *** [compiler/CMakeFiles/gbc.dir/build.make:103: compiler/build/gbc/gbc] Error 1
make[1]: *** [CMakeFiles/Makefile2:927: compiler/CMakeFiles/gbc.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Expected behavior
What do you expect the reproducer described above to do?
Bond gbc should install
Environment
- GHC version used: 8.6.5
Optional:
- Operating System: Ubuntu 22.04 (WSL2)
- System Architecture: x64
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal