Locating shared libraries

Bryan O'Sullivan bos at serpentine.com
Wed Jun 13 14:39:27 EDT 2007


Rich Neswold wrote:

> Actually, Haskell libraries ought to be placed in /usr/local/lib (or 
> /usr/pkg/lib for systems that use the Package System: 
> http://www.pkgsrc.org).

They should go in $(libdir), as Simon suggests.  If a particular OS 
wants to override libdir to put them somewhere else, that's then easy to 
arrange.

Stefan is also correct that the version of GHC used should be cooked 
into the name of the shared library.  So a library named foo would be 
installed as libfoo-ghc661.so.1, or something similar (using the soname 
would work too).  This will allow system package managers to 
automatically resolve dependencies safely, and to keep copies of a 
shared library built by different versions of GHC around without them 
clashing.

	<b


More information about the Glasgow-haskell-users mailing list