commercialhaskell / commercialhaskell/stack

On Debian 11, stack build fails with Prelude.chr: bad argument error

Open
#6,091 6 comments 0 reactions 0 assignees View on GitHub
component: build component: linux needs reproduction
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

### General summary/comments (optional)

With the ghc version that stack installs, I get an error when trying to compile and install a project using `stack install`, this is the error:
```
Prelude.chr: bad argument: 3959423081
```

This is weird because if I were to use ghcup to install stack and ghc, and also enable ghcup's stack integration (mentioned here: https://www.haskell.org/ghcup/guide/#stack-integration) this error doesn't occur.

### Steps to reproduce

For example:

1. Clone this project for example: https://github.com/xmonad/xmonad
2. Run `stack init` in the directory that you cloned the project into.
3. Run `stack install`, you might be met with the error above if you use stack to install ghc and not ghcup.

### Expected

The project compiles and installs successfully.

### Actual

What actually happened.

~~~text
stack install
Prelude.chr: bad argument: 3959423081
~~~

### Stack version

~~~text
stack --version
Version 2.9.3, Git revision 6cf638947a863f49857f9cfbf72a38a48b183e7e x86_64 hpack-0.35.1
~~~

### Method of installation

* Via the distro package for stack in Debian 11

### Platform

x86-64, Debian 11

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.