commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
4k stars 843 forks source link

~/.stack/config.yaml extra-lib-dirs not used #1751

Closed joeyh closed 8 years ago

joeyh commented 8 years ago
oberon:~ joeyh$ cat .stack/config.yaml
extra-include-dirs:
- /Volumes/Visitors/joeyh/homebrew/include
extra-lib-dirs:
- /Volumes/Visitors/joeyh/homebrew/lib
oberon:~ joeyh$ stack install magic-1.1
...
    setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2: Missing dependency on a
    foreign library:
    * Missing C library: magic

As far as I can see in the documentation, .stack/config.yaml should be read for all builds. I also tried putting the same config in .stack/global/stack.yaml, which I think should be read when building magic as the package does not have its own stack.yaml. But, same result.

What eventually worked, was passing --extra-lib-dirs=/Volumes/Visitors/joeyh/homebrew/lib

I actually prefer doing it that way, just didn't know the command-line option existed, due to https://github.com/commercialhaskell/stack/issues/1462

But, thought I should file this bug anyway, since stack seems to be ignoring this part of its configuration. Or, perhaps I got the syntax wrong?

joeyh commented 8 years ago

Version 0.1.5.0, on OSX

mgsloan commented 8 years ago

Version 0.1.5.0 is quite old. Could you please try with a more recent version? (stack upgrade for stable, or stack upgrade --git for development version)

joeyh commented 8 years ago

stack 1.0.2 does not have this bug

see shy jo