[arch-haskell] Dynamic executables and RPATH

Fabien Dubosson fabien.dubosson at gmail.com
Sun Nov 10 10:41:18 UTC 2013

> Any comments?  (Besides the hard coded ghc version in the path ;-)

Hum, one question (that may solve the hard coded path ;-) :

If the shared libraries need anyway to be in a `shared` folder, why not
using a `/etc/ld.so.conf.d/haskell.conf` file (attached to `ghc` package)
containing the line `/usr/lib/ghc-7.6.3/shared`, and building *all* Haskell
executables/libraries with ghc-option `-dynload=deploy` as explained in [1]?

The difference is that executables/libraries will *not* contain a RPATH,
but instead will search in LD folders. That will solve the hard coded path
and remove the dependency to `chrpath`. Also, from my point of view, this
is a more elegant solution since everything will be dynamic and looking
into only one place to find libraries.

If applying that to libraries doesn't enjoy people (or doesn't work), it is
also possible to do that only for executables. But in this later case,
building an executable with ghc-option `-dynload=deploy` will probably
apply to its library as well. To bypass this problem I think that simply
removing the RPATH from the executable will have the same effect. But I
haven't tested that yet.

PS: If you want to try the LD version, don't forget to run `sudo ldconfig`,
after putting the `/etc/ld.so.conf.d/haskell.conf` file. Otherwise the new
path will not be taken into account.


Kind regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/arch-haskell/attachments/20131110/93720674/attachment.html>

More information about the arch-haskell mailing list