commercialhaskell / commercialhaskell/stack
ghc-cabal uses wrong loader path
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
### Steps to reproduce
1. Install 64bit Gentoo
2. Set resolver to `lts-10.4`
3. call `stack build`
### Expected
Setup the resolver target.
### Actual
Build would fail with following error:
```
utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist: line 3: /home/pk/.stack/programs/x86_64-linux/ghc-ncurses6-nopie-8.2.2.temp/ghc-8.2.2/utils/ghc-cabal/dist-install/build/tmp/ghc-cabal: No such file or directory
```
Running strace on the `ghc-cabal` binary gives:
```
execve("./utils/ghc-cabal/dist-install/build/tmp/ghc-cabal", ["./utils/ghc-cabal/dist-install/b"...], 0x7ffd07a8bcd0 /* 38 vars */) = -1 ENOENT (No such file or directory)
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
getpid() = 898
exit_group(1) = ?
+++ exited with 1 +++
```
Calling `file` on the binary:
```
utils/ghc-cabal/dist-install/build/tmp/ghc-cabal: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=d7c5b6e1e62eb0e96cbbd27acf6cb6445aff3992, with debug_info, not stripped
```
I checked if the loader exists in the `/lib` directory, but it was missing. Creating symlink with `/lib64/` loader solved the problem.
### Stack version
```
$ stack --version
Version 1.6.3, Git revision b27e629b8c4ce369e3b8273f04db193b060000db (5454 commits) x86_64 hpack-0.20.0
```
### Method of installation
* Official binary, downloaded from stackage.org or fpcomplete's package repository
Contributor guide
Assessment
This issue has not been assessed yet.