[Haskell-cafe] Cabal bug? (was Re: Cabal: --enable-shared and executables)

Albert Y. C. Lai trebla at vex.net
Sun Nov 3 22:05:40 UTC 2013


On 13-11-03 01:46 AM, Magnus Therning wrote:
> Is there already a way to get Cabal to put in an RPATH such that an *installed*
> executable works correctly, or is this a fairly serious bug in Cabal?

It is usually desirable to set RPATH to libs' installation locations 
rather than libs' build trees, and I think I prefer it too. But the 
exception is during "cabal test", when you should test against libs in 
the build tree. It is somewhat a dilemma.

It is, in fact, sad that we have to set RPATH at all, and we have to 
because Haskell libs are not common, and they are not dumped directly 
into /usr/lib and /usr/local/lib. (They are, instead, scattered over 
/usr/local/lib/p-n/ghc-m, for wide ranges of values of p, n, and m.) If 
not for this, we would set no RPATH, we would do nothing special for 
installations, and we just had to play with LD_LIBRARY_PATH or 
LD_RUN_PATH or something during testing.

(I would, in fact, not mind that organization, if symlinks were set up 
directly in /usr/local/lib. Note: the filename is already 
libHSp-n-ghcm.so, it already records p, n, and m, there is no clash 
putting that name right into /usr/local/lib alongside siblings and 
cousins --- well, no more clash than the /usr/local/lib/p-n/ghc-m scheme.)


More information about the Haskell-Cafe mailing list