[Haskell-cafe] GHC 8.0.2 and extra dynamic libraries

Bryan Gardiner bog at khumba.net
Thu Mar 23 03:01:44 UTC 2017


Hi all,

I'm not sure if this is the right place to ask this, but I'd like to
see if there were any changes between GHC 8.0.1 and 8.0.2 in how
linking works on Linux.

I inject an extra library directory (extraLibDirs, for building qtah)
via preBuild and preTest Cabal hooks[1], and while GHC 8.0.1 (or is
this Cabal?) seems to pass this as both "-L$dir" and
"-optl-Wl,-rpath,$dir" to the ghc link command, GHC 8.0.2 (Cabal?)
appears to only pass the former, causing the built library to be
unable to find its dependency in that directory.

Is this a known change?  Do I need to pass -optl-Wl,... myself now?

I'm running Gentoo with the Haskell overlay, Cabal-1.24.2.0, and
cabal-install-1.24.0.2 in both cases.

Happy to provide more info if necessary.  Thanks for any help you can
provide,

Bryan

[1] https://gitlab.com/khumba/qtah/blob/master/qtah/Setup.hs


More information about the Haskell-Cafe mailing list