[Haskell-cafe] Re: [Gtk2hs-users] Woes on MacOS 10.6 - linking issues -now working, but Glade is missing in v0.11 and v0.10.1 still won't compile SOLVED compile of 10.1

Brett Giles brett.giles at ucalgary.ca
Sat Jun 12 19:27:32 EDT 2010


Finally figured it out - leave the scripts for ghc and hsc2hs alone and do the configure for gtk2hs 0.10.11 like this:


./configure --with-hsc2hs='--cc-flag=-m32 --ld-flag=-m32' 


On Jun 12,2010, at 3:53 PM, Brett Giles wrote:

> Hi everyone,
> 
> Thanks for the variety of suggestions - I resolved this by uninstalling the Haskell-platform DMG based package and using the one from macports. I then, as mentioned elsewhere, manually modified my hsc2hs shell script to ensure the correct code was generated.
> 
> However, I see that the cabal install for version 11 contains no Glade modules. I saw there was a patch posted by Andy Stewart for it a while back, is there any ETA for it for the public?
> 
> I am, (so sad for me:) a bit hooped as I was going to give a demo of a program in a couple of days, but my code depends heavily on Glade and I can't seem to get the prior version of Gtk2HS (0.10.1) to compile at all.  (Issues with x86_64 vs i386 - but I have tried for three hours to get the magic combination of modifications to the ghc script, the hsc2hs script and environment variable to no avail).
> 
> If anyone has had luck on getting the 10.1 version to build (on a brand new install of OSx v10.6.3, macports Haskell Platform meaning GHC is 6.10.4, I'd love to hear how you did it.
> 
> (I did check out the variety of tickets related to this, especially http://hackage.haskell.org/trac/ghc/ticket/3400 and the recent conversations on this list between Chris K. and Axel.
> 
> 
> On Jun 11,2010, at 2:40 AM, Axel Simon wrote:
> 
>> Hi Brett,
>> 
>> On 11.06.2010, at 04:53, Brett Giles wrote:
>> 
>>> Hi Folks
>>> 
>>> I seem to have Gtk2HS 0.11 installed, but not quite working. Interestingly, I can run a demo, such as the hello/World.hs example, directly in ghci. However, when I try to do a ghc --make on any code containing gtk2hs I get a link error like this:
>>> 
>>> Undefined symbols:
>>> "_iconv_close", referenced from:
>>>    _hs_iconv_close in libHSbase-4.2.0.0.a(iconv.o)
>>>   (maybe you meant: _hs_iconv_close)
>>> "_iconv", referenced from:
>>>    _hs_iconv in libHSbase-4.2.0.0.a(iconv.o)
>>>   (maybe you meant: _hs_iconv_open, _hs_iconv , _hs_iconv_close )
>>> "_iconv_open", referenced from:
>>>    _hs_iconv_open in libHSbase-4.2.0.0.a(iconv.o)
>>>   (maybe you meant: _hs_iconv_open)
>>> ld: symbol(s) not found
>>> 
>>> 
>>> I do have libiconv installed as a universal library via macports. gtk, glade etc., are also universal installed via macports.
>>> 
>> 
>>> I downloaded the OSX Haskell Platform package and am running ghc 6.12.1
>>> 
>> 
>> 
>> The iconv issue is usually that you also have a libiconv that Apple ships. The platform ghc probably links against that while macports (and thus Gtk+) uses its own. I have no idea who's to blame here but I guess you should be trying to change your LD_LIBRARY_PATH or your DYLD_LIBRARY_PATH to /opt/sw since that contains the more complete version.
>> 
>> Cheers,
>> Axel
> 
> Brett Giles
> Grad Student, Formal Methods, Category Theory,
> University of Calgary
> brett.giles at ucalgary.ca
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit.  See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Gtk2hs-users mailing list
> Gtk2hs-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
> 
> 

Brett Giles
Grad Student, Formal Methods, Category Theory,
University of Calgary
brett.giles at ucalgary.ca





More information about the Haskell-Cafe mailing list