[Haskell-beginners] Problems linking code from the book Haskell School of Expression

Philippe Sismondi psismondi at arqux.com
Sat Nov 26 01:41:12 CET 2011


On 2011-11-25, at 3:53 PM, Brandon Allbery wrote:

> On Fri, Nov 25, 2011 at 15:33, Philippe Sismondi <psismondi at arqux.com> wrote:
> Your suggestion reminds me that installing soegtk caused an outpouring of messages about "ignoring libraries". So the problem may well have arisen at that point. I should probably look at the cabal packages for gtk2hs, or maybe contact the guys who put it together.
> 
> Ok, then what happened is that gtk2hs found the MacPorts Gtk+ libraries, which were built native/64-bit, and tried to use them in your 32-bit GHC environment.  (gtk2hs does *not* come with Gtk+ libraries; you have to provide them from somewhere.)
> 
> So, either you need to find some prebuilt 32-bit Gtk+ libraries, or you need to rebuild the MacPorts libraries to be +universal so they have been 32- and 64-bit variants.  That said, the latter will probably fail with missing symbols related to iconv (MacPorts' iconv library is not compatible with Apple's, which is used by the Haskell Platform build).
> 

Thanks.

I am totally unfamiliar with gtk. I has assumed that the library installed by cabal was self-contained. Call me naive....

As you suggested I installed a macports universal variant of gtk2. But it appears to me that their may be a broader problem, i.e. that I may need to install universal versions of quite a few macports libraries. I still cannot build gtk2hs without references to ignoring libraries, and then my sample program will not link.


I may have to go through and install a bunch of macports universals, but in the meanwhile I tried installing the 64-bit version of the Haskell Platform. That installation fails, but does leave a 64-bit version of the ghc framework in the library. I posted a message about it on the haskell-cafe list, because this too takes me out of my depth.

Even with the broken installation of 64-bit ghc I get far fewer error messages when I try to use soegtk with it. It does indeed complain about iconv symbols; whether that could be remedied is academic if I cannot get a clean installation of 64-bit ghc, since I have no idea what is broken in 64-bit

After exchanging posts with you I surfed the web a bit, and came to the conclusion that architecture is something of a problem for quite a few OS X users of ghc. Is that fair to say?


> -- 
> brandon s allbery                                      allbery.b at gmail.com
> wandering unix systems administrator (available)     (412) 475-9364 vm/sms
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20111125/3b864555/attachment.htm>


More information about the Beginners mailing list