<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">From: Christian Maeder &lt;<a href="mailto:Christian.Maeder@dfki.de">Christian.Maeder@dfki.de</a>&gt;<br>

<br>
Am 02.11.2010 11:48, schrieb Christian Maeder:<br>
&gt; Hi,<br>
&gt;<br>
&gt; after installing<br>
&gt; <a href="http://lambda.galois.com/hp-tmp/2010.2.0.0/haskell-platform-2010.2.0.0.i386.dmg" target="_blank">http://lambda.galois.com/hp-tmp/2010.2.0.0/haskell-platform-2010.2.0.0.i386.dmg</a><br>
&gt; and various more libraries using cabal, we get the following linker<br>
&gt; error below.<br>
&gt;<br>
&gt; A simple hello program compiles and links fine and uses<br>
&gt; /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version<br>
&gt; 7.0.0) as shown by &quot;otool -L&quot;.<br>
&gt;<br>
&gt; Does someone have an explanation or solution?<br>
<br>
adding &quot;-L/usr/lib&quot; as first argument to ghc solved the problem.<br>
Another cabal-package (gtk and friends) used /opt/local/lib under<br>
library-dirs:.<br>
<br>
Are there better workarounds?<br></blockquote><div><br></div><div>Judging from the /opt/*, it looks like you&#39;re using macports for gtk.  The libiconv provided by macports is incompatible with the system libiconv, and trying to mix the two is a doomed effort.</div>
<div><br></div><div>If you&#39;re using a gtk2hs from macports (or gtk+ from macports) it will link to /opt/local/lib/libiconv, but HP and ghc core libraries will link to /usr/lib/libiconv.  This means that various haskell packages will be entirely incompatible with each other, and problems will manifest as these linker errors.</div>
<div><br></div><div>Since Apple seems disinclined to fix the system&#39;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 built gtk+ using <a href="http://gtk-osx.sourceforge.net/">http://gtk-osx.sourceforge.net/</a> , which is moderately painful but has been stable once it&#39;s built.</div>
<div><br></div><div>John</div></div>