commercialhaskell / commercialhaskell/stack
Linking Issue on Ubuntu and Fedora (GHC-8.4.2)
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
### General summary/comments
It appears that the bindists being given to both ubuntu and fedora users are subtly broken. When attempting to link a binary depending on `libffi`, the linker picks up the copy of `libffi.so.7` found in the `rts` folder of the distribution. This means that at runtime, despite the systems in question having a copy of `libffi.so.6`, the binary can't find the correct shared library to link against.
This does not happen on Arch Linux or Gentoo, as `/usr/lib` or `/usr/lib64` are included in their linker invocations respectively, allowing the linker to pick up the correct version of the dependency.
### Steps to reproduce
For example:
1. Create a stack project depending on `libffi` using `ghc-8.4.2`
2. Attempt to build this.
3. Execute it.
Include any `.yaml` configuration if relevant.
### Expected
The resultant binary is linked against the system version of `libffi.so.6`.
### Actual
The resultant binary is linked against the `libffi.so.7` from the ghc bindist, meaning it can't start.
### Stack version
```
Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2
```
### Method of installation
* Official binary, downloaded from stackage.org or fpcomplete's package repository
Contributor guide
Assessment
This issue has not been assessed yet.