commercialhaskell / commercialhaskell/stack
Permission Denied when installing optparse-applicative (selinux)
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
i can't copy paste the log file at the moment, unfortunately. During the `optparse-applicative-0.12.1.10: build` step the following happens:
```
[11 of 15] Compiling Options.Applicative.Help.Core
: can't load .so/.DLL for: /home/flip11/.stack/blabla/libHStransformers-compat-0.5.1.4-blablabla-ghc8.0.1.so ( cannot enable execubable stack as shread object requires: Permission denied)
```
i solved this issue by following these instructions: https://wiki.haskell.org/GHC/FAQ#SELinux-related
```
setsebool allow_execmem 0
sudo /usr/bin/chcon -t unconfined_execmem_exec_t /usr/local/bin/stack
```
This might be related to https://github.com/commercialhaskell/stack/issues/1866 because when i search the issues for `selinux` i noticed `selinux` was enabled there as a flag to docker.
It would be good to check this during the installation of stack. And possibly give better error message other than "Permission Denied" (at first i thought it had something to do with file ownership)
Unrelated: Might be funny to know that i got stack working on fedora 14. Only thing was that the repo didn't have libgmp, so i build that from source and made the following symlinks:
```
sudo ln -d /usr/local/lib/libgmp.so.10 /usr/lib64/libgmp.so
sudo ln -d /usr/local/lib/libgmp.so.10 /usr/lib64/libgmp.so.10
```
The symlinks might have been unneeded if i would have used some flags at the `./configure` step.
Contributor guide
Assessment
This issue has not been assessed yet.