commercialhaskell / commercialhaskell/stack

Stale `Cabal-simple` file

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

Description

Trying to compile a project with `Stack` inside a `nix-shell`, I got the following error

```
/home/marcosh/.stack/setup-exe-cache/x86_64-linux-nix/Cabal-simple_mPHDZzAJ_3.4.1.0_ghc-9.0.2: startProcess: exec: invalid argument (Bad file descriptor)
```

The problem seems to happen because the file refers to the executables from my system

```
> ldd Cabal-simple_mPHDZzAJ_3.4.1.0_ghc-9.0.2
linux-vdso.so.1 => linux-vdso.so.1 (0x00007ffdb0521000)
libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007fe0b166a000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fe0b1486000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fe0b13a0000)
librt.so.1 => /usr/lib/librt.so.1 (0x00007fe0b1399000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fe0b1394000)
libffi.so.8 => /usr/lib/libffi.so.8 (0x00007fe0b1388000)
/nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fe0b173c000)
```

Removing that file, compilation works, the file is regenerated with executables actually coming from nix

```
> ldd Cabal-simple_mPHDZzAJ_3.4.1.0_ghc-9.0.2
linux-vdso.so.1 => linux-vdso.so.1 (0x00007fff15969000)
libgmp.so.10 => /nix/store/4l48ybgm682wr7s2m1bzr85ca51i3kgb-gmp-with-cxx-6.2.1/lib/libgmp.so.10 (0x00007f968da9a000)
libc.so.6 => /nix/store/lyl6nysc3i3aqhj6shizjgj0ibnf1pvg-glibc-2.34-210/lib/libc.so.6 (0x00007f968d89c000)
libm.so.6 => /nix/store/lyl6nysc3i3aqhj6shizjgj0ibnf1pvg-glibc-2.34-210/lib/libm.so.6 (0x00007f968d7c3000)
librt.so.1 => /nix/store/lyl6nysc3i3aqhj6shizjgj0ibnf1pvg-glibc-2.34-210/lib/librt.so.1 (0x00007f968d7bc000)
libdl.so.2 => /nix/store/lyl6nysc3i3aqhj6shizjgj0ibnf1pvg-glibc-2.34-210/lib/libdl.so.2 (0x00007f968d7b7000)
libffi.so.8 => /nix/store/7m5ik9rhh55m021kzmg4hb4zjfj3lyyc-libffi-3.4.2/lib/libffi.so.8 (0x00007f968d7aa000)
/nix/store/lyl6nysc3i3aqhj6shizjgj0ibnf1pvg-glibc-2.34-210/lib/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f968db3d000)

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.