haskell / haskell/cabal

local --extra-include-dirs should precede .cabal/config:extra-include-dirs

Open
#7,782 0 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/build re: config-file re: options
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

In my global `.cabal/config` file I have:
~~~~
extra-include-dirs: /usr/lib/llvm-10/include
~~~~

Locally I run
~~~~
$ cabal build --extra-include-dirs=/usr/lib/llvm-11/include
~~~~

This makes `cabal` call `ghc` with options:
~~~~
ghc ... -I/usr/lib/llvm-10/include -I/usr/lib/llvm-11/include ...
~~~~

The order of the options is a problem since it means that I cannot redefine include search paths locally. Both `/usr/lib/llvm-10/include` and `I/usr/lib/llvm-11/include` include many files with the same names. I cannot disambiguate by choosing different include file names.

The should apply to `--extra-lib-dirs`.

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.