Woes on MacOS 10.6 - linking issues
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 Other programs seem to be having some issues as well though, For instance, a command line program seems to compile fine, but when it runs I get the message: $ emlqpl (<<<--- My "successfully" compiled program - batch only, no gtk items) dyld: Library not loaded: /opt/local/lib/libgtk-quartz-2.0.0.dylib Referenced from: /usr/local/bin/emlqpl Reason: image not found Trace/BPT trap Does anyone have any suggestions? Brett Giles Grad Student, Formal Methods, Category Theory, University of Calgary brett.giles@ucalgary.ca
Hello, Concerning the undefined iconv symbols, take a look at http://hackage.haskell.org/trac/ghc/ticket/4068, it seems to be about something similar. Best regards Thorkil On Thu, Jun 10, 2010 at 08:53:13PM -0600, 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
Other programs seem to be having some issues as well though, For instance, a command line program seems to compile fine, but when it runs I get the message:
$ emlqpl (<<<--- My "successfully" compiled program - batch only, no gtk items) dyld: Library not loaded: /opt/local/lib/libgtk-quartz-2.0.0.dylib Referenced from: /usr/local/bin/emlqpl Reason: image not found Trace/BPT trap
Does anyone have any suggestions?
Brett Giles Grad Student, Formal Methods, Category Theory, University of Calgary brett.giles@ucalgary.ca
_______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Hi Brett, On 11.06.2010, at 04:53, Brett Giles wrote:
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've had the exactly that same issue an hour ago, when I was trying to cabal install threadscope on Snow Leopard 10.6.3. I managed to build it using cabal install threadscope --extra-lib-dir=/usr/lib The resulting binary seems to work fine.
I do have libiconv installed as a universal library via macports. gtk, glade etc., are also universal installed via macports.
But, I did not manage to build glade with macports as a universal binary. I had to force it to be i386 only, since evolution-data-server failed to compile. How, did you manage to build a universal binary? Sorry, for the off-topic question. Best regards, Jean
participants (3)
-
Brett Giles -
Jean-Marie Gaillourdet -
Thorkil Naur