I have resolved this issue by adding the rpath to the dependent package&#39;s ldOptions [1], but I&#39;m not particularly happy with it.<br><br>My solution was inspired by an old post describing a similar problem with rpath [2], was this ever looked at?<br>

<br>[1] <a href="http://darcsden.com/DukeDave/wxhaskell-dev/patch/20120103181105-a1f0b">http://darcsden.com/DukeDave/wxhaskell-dev/patch/20120103181105-a1f0b</a><br>[2] <a href="http://www.haskell.org/pipermail/cabal-devel/2007-June/000588.html">http://www.haskell.org/pipermail/cabal-devel/2007-June/000588.html</a><br>

<br><br><div class="gmail_quote">On 24 December 2011 01:32, Dave Tapley <span dir="ltr">&lt;<a href="mailto:dukedave@gmail.com">dukedave@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

Hi all,<br><br>I&#39;ve been working on a new development version of wxhaskell[1] and one of my goals was to integrate previous work on using a shared library[2].<br>I&#39;m please to report that I have more-or-less achieved this goal at least under Linux, but there is still some cleaning up to do.<br>


<br>After performing a cabal I end up with a .so file as expected, the only problem currently is that now whenever you compile something which uses wxhaskell you have to pass in an rpath to the .so in the cabal-dev / local / system packages location.<br>


<br>Obviously this .so somehow needs to end up where the system can find it, and I wondered if someone has already (or has ideas about how to) make this happen in cabal?<br><br>You can see where I believe it should fit in in the ldconfig function in Setup.hs[3].<br>


<br>Thanks,<br>Dave<br><br><br>[1] <a href="http://darcsden.com/DukeDave/wxhaskell-dev" target="_blank">http://darcsden.com/DukeDave/wxhaskell-dev</a><br>[2] <a href="http://wewantarock.wordpress.com/2010/11/03/building-a-shared-library-in-cabal/" target="_blank">http://wewantarock.wordpress.com/2010/11/03/building-a-shared-library-in-cabal/</a><br>


[3] <a href="http://darcsden.com/DukeDave/wxhaskell-dev/browse/wxc/Setup.hs" target="_blank">http://darcsden.com/DukeDave/wxhaskell-dev/browse/wxc/Setup.hs</a><br>
</blockquote></div><br>