gtk2hs and MacPorts
Christian Maeder
Christian.Maeder at dfki.de
Mon Dec 1 10:57:43 EST 2008
Hi,
recently (last Friday) I had a chance to use MacPorts to install gtk2hs.
(Usually I do not have root permissions to do so.)
Actually, I only wanted to install the libraries needed to run a gtk2hs
application that I've created on another machine. On that other machine
gtk was (painfully) installed using
http://developer.imendio.com/projects/gtk-macosx/build-instructions
and gtk2hs-0.9.13 was then compiled from source.
sudo port install gtk2hs
began at some stage to compile ghc-6.10.1 which I aborted, because I
thought, gtk2hs would not work with ghc-6.10.1.
("port search ghc" on another mac lists ghc-6.8.3, though.)
Therefore I tried to only install the needed libraries for the binary.
(libglade2, gtk2, etc.) Finally my binary complained about a missing
libgdk-quartz-2.0.0.dylib
or
libgtk-quartz-2.0.0.dylib
and I had no idea how to get it from MacPorts. (Initially I did not even
see the difference of the two library names "gtk" vs, "gdk".)
I don't know if my binary is linked against too many libraries. Is this
possible or is the linker smart enough to avoid this? Below is the list
of libraries my binary needs.
I've just found
http://www.haskell.org/haskellwiki/Gtk2Hs#Mac_OS_X
and the list of dependencies:
glade3 libglade2 gstreamer gst-plugins-base gtksourceview cairo
librsvg gtkglext firefox
Which one contains "quartz"?
Another problem have been the links lib{jpeg,png,tiff}.dylib. I had to
remove them from my DYLD_LIBARRY_PATH in order to avoid an error in
ApplicationServices:
dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from:
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
Are the libraries lib{jpeg,png,tiff}.dylib needed at all for gtk?
Cheers Christian
otool -L
/home/maeder/gtk/inst/lib/libglade-2.0.0.dylib (compatibility
version 1.0.0, current version 1.7.0)
/home/maeder/gtk/inst/lib/libxml2.2.dylib (compatibility version
9.0.0, current version 9.32.0)
/home/maeder/gtk/inst/lib/libgtk-quartz-2.0.0.dylib
(compatibility version 1305.0.0, current version 1305.0.0)
/home/maeder/gtk/inst/lib/libgdk-quartz-2.0.0.dylib
(compatibility version 1305.0.0, current version 1305.0.0)
/home/maeder/gtk/inst/lib/libatk-1.0.0.dylib (compatibility
version 2210.0.0, current version 2210.1.0)
/home/maeder/gtk/inst/lib/libgio-2.0.0.dylib (compatibility
version 1704.0.0, current version 1704.0.0)
/home/maeder/gtk/inst/lib/libgdk_pixbuf-2.0.0.dylib
(compatibility version 1305.0.0, current version 1305.0.0)
/home/maeder/gtk/inst/lib/libpangocairo-1.0.0.dylib
(compatibility version 2102.0.0, current version 2102.2.0)
/home/maeder/gtk/inst/lib/libpango-1.0.0.dylib (compatibility
version 2102.0.0, current version 2102.2.0)
/home/maeder/gtk/inst/lib/libcairo.2.dylib (compatibility
version 20.0.0, current version 20.5.0)
/home/maeder/gtk/inst/lib/libgmodule-2.0.0.dylib (compatibility
version 1704.0.0, current version 1704.0.0)
/home/maeder/gtk/inst/lib/libgthread-2.0.0.dylib (compatibility
version 1704.0.0, current version 1704.0.0)
/home/maeder/gtk/inst/lib/libgobject-2.0.0.dylib (compatibility
version 1704.0.0, current version 1704.0.0)
/home/maeder/gtk/inst/lib/libglib-2.0.0.dylib (compatibility
version 1704.0.0, current version 1704.0.0)
/home/maeder/gtk/inst/lib/libintl.8.dylib (compatibility version
9.0.0, current version 9.1.0)
/usr/lib/libedit.2.dylib (compatibility version 2.0.0, current
version 2.9.0)
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0,
current version 5.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.1.1)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
More information about the Glasgow-haskell-users
mailing list