commercialhaskell / commercialhaskell/stack

`stack repl stack:lib` bytecode compiler can't foreign

Open
#5,814 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

### Steps to reproduce

On this very repo:

```
> stack repl stack:lib
Configuring GHCi with the following packages: stack
GHCi, version 8.10.4: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /Users/pdejoux/.ghci
[ 1 of 110] Compiling Network.HTTP.StackClient
[ 2 of 110] Compiling Path.Extended
...
[ 80 of 110] Compiling System.Process.Pager
[ 81 of 110] Compiling System.Terminal
Error: bytecode compiler can't handle some foreign calling conventions
Workaround: use -fobject-code, or compile this module to .o separately.

: error:
Could not load module ‘Stack.Build’
It is a member of the hidden package ‘stack-2.7.6’.
You can run ‘:set -package stack’ to expose it.
(Note: this unloads all the modules in the current scope.)
```

I tried `stack build stack:lib` that worked but going back to the above command still fails the same way.

### Expected

I'd expect to be able to load stack's lib into the REPL.

### Versions

```
> stack --version
Version 2.7.5, Git revision ba147e6f59b2da75b1beb98b1888cce97f7032b1 x86_64 hpack-0.34.4

> sw_vers
ProductName: macOS
ProductVersion: 11.6.7
BuildVersion: 20G630
```

### Method of installation

ghcup

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.