haskell / haskell/cabal

new-haddock: '-dynamic' flag is not passed to haddock (archlinux, dynamic GHC package)

Open
#4,670 1 comment 0 reactions 0 assignees View on GitHub
Cabal: cmd/haddock type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

`~/.cabal/config:`
```
library-vanilla: False
shared: True
executable-dynamic: True
```
GHC version: 8.2.1
Cabal version: 2.1.0

`ghc` and `setup` are called with `-dynamic`, but `haddock` isn't.
The operation fails with a linker error.
Passing `-optghc=-dynamic` to haddock (via `--haddock-options`) fixed the issue.

I since went static again after I found [`ghc-static`](https://wiki.archlinux.org/index.php/Haskell#Problems_with_linking) and don't use the dynamic settings anymore.

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.