Closed
Description
General summary/comments (optional)
stack
does not respect the order of the paths to search for libraries.
Steps to reproduce
- Specify extra lib dirs in
~/.cabal/config
and in ~/.stack/config.yaml`. - Run
stack install ghc-paths
- Do
cat /Users/uri/.stack/global-project/.stack-work/install/x86_64-ohc-paths-0.1.0.9-KaBYbRV3ryA10w04FwbrO2
and enjoy what you see.
Excerpt from ~/.cabal/config
:
. . . . .
extra-include-dirs: /opt/local/include
extra-include-dirs: /usr/local/include
-- deterministic:
-- cid:
extra-lib-dirs: /opt/local/lib/liconv
extra-lib-dirs: /opt/local/lib
extra-lib-dirs: /usr/local/lib
. . . . .
allow-newer: True
exact-configuration: False
. . . . .
Excerpt from ~/.stack/config.yaml
:
. . . . .
extra-include-dirs: [ /opt/local/include, /usr/local/include ]
extra-lib-dirs: [ /opt/local/lib/liconv, /opt/local/lib, /usr/local/lib, /usr/lib ]
. . . . .
Expected
Library paths listed in the order the config file stated. Also, expected that exact-configuration: False
would be respected.
Actual
$ cat /Users/uri/.stack/global-project/.stack-work/install/x86_64-osx/lts-13.2/8.6.3/flag-cache/ghc-paths-0.1.0.9-KaBYbRV3ryA10w04FwbrO2
H??? config-v3
--user--package-db=clear--package-db=globalH--package-db=/Users/uri/.stack/snapshots/x86_64-osx/lts-13.2/8.6.3/pkgdbB--libdir=/Users/uri/.stack/snapshots/x86_64-osx/lts-13.2/8.6.3/libB--bindir=/Users/uri/.stack/snapshots/x86_64-osx/lts-13.2/8.6.3/binE--datadir=/Users/uri/.stack/snapshots/x86_64-osx/lts-13.2/8.6.3/shareJ--libexecdir=/Users/uri/.stack/snapshots/x86_64-osx/lts-13.2/8.6.3/libexecF--sysconfdir=/Users/uri/.stack/snapshots/x86_64-osx/lts-13.2/8.6.3/etcT--docdir=/Users/uri/.stack/snapshots/x86_64-osx/lts-13.2/8.6.3/doc/ghc-paths-0.1.0.9U--htmldir=/Users/uri/.stack/snapshots/x86_64-osx/lts-13.2/8.6.3/doc/ghc-paths-0.1.0.9X--haddockdir=/Users/uri/.stack/snapshots/x86_64-osx/lts-13.2/8.6.3/doc/ghc-paths-0.1.0.97--dependency=Cabal=Cabal-2.4.1.0--ghc-options/usr/lib/libiconv.dylib'--extra-include-dirs=/opt/local/include'--extra-include-dirs=/usr/local/include--extra-lib-dirs=/opt/local/lib&--extra-lib-dirs=/opt/local/lib/liconv--extra-lib-dirs=/usr/lib--extra-lib-dirs=/usr/local/lib--with-gcc=/usr/bin/gcc--exact-configuration$Cababase-4.12.0.0directory-1.3.3.0
Stack version
$ stack --version
Version 1.9.3, Git revision 40cf7b37526b86d1676da82167ea8758a854953b (6211 commits) x86_64 hpack-0.31.1
Method of installation
- Official binary, downloaded from stackage.org or fpcomplete's package, installed with/by Haskell Platform