From: Axel S. <Axe...@en...> - 2008-12-01 16:19:54
|
On Mon, 2008-12-01 at 16:57 +0100, Christian Maeder wrote: > 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 These should come from the Gtk+ implementation that is directly based on Apple's Aqua/quartz libraries. This is highly experimental. The classic way to run Gtk+ applications on Mac OS is to run them through the X11 application. Of course, if you have binaries that rely on the experimental Gtk+Aqua combination, then there's no way to use them without installing this. An easier option might be to recompile your program using Gtk2Hs (possibly from MacPorts). > 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? Gtk+ can load all sorts of images, in particular jpeg images. Apple seems to ship its own library called libjpg and MacPorts installs its own in /opt/local. From our point of view, there's nothing we can do about this, as this should be fixed in MacPorts. I think I did some renaming on /opt/local/libjpg.dylib to get around this problem, which isn't the right thing to do... Cheers, Axel. > 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) > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Gtk2hs-users mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk2hs-users |