link problem under macosx

John Lato jwlato at gmail.com
Wed Nov 3 06:59:58 EDT 2010


>
> From: Simon Michael <simon at joyful.com>
>
> On 11/2/10 10:20 AM, John Lato wrote:
> > Since Apple seems disinclined to fix the system's libiconv, and macports
> projects refuse to use it, the only real
> > solution is to use either HP without macports or the macports GHC without
> HP.  Personally I chose to use the HP and
>
> Not so, as mentioned you just need to make sure /usr/lib is in the link
> path before /opt/local/lib. Add -L/usr/lib to
> your build flags for ghc --make, and put:
>
> extra-lib-dirs: /usr/lib
> extra-lib-dirs: /opt/local/lib
>
> in that order in ~/.cabal/config for cabal build.
>
> This is a very FAQ and needs to be documented somewhere more obvious, I
> wonder where. cabal-install and GHC release notes ?
>

As I mentioned in another reply, this worked for me until I tried to link to
a macports lib (I think some regex lib) that actually used the macports
libiconv (a lot of them don't even if they pull in the dependency).  Then I
was really stuck because I had dependencies on two different libiconv's, and
neither one would link properly.

As such, I consider this a pretty fragile "solution".

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20101103/eb97c752/attachment.html


More information about the Glasgow-haskell-users mailing list