Re: Lablgtk2 and gtk-osx

Jacques Garrigue <[email protected]> Mon, 21 Sep 2009 20:28:24 +0900 (JST)
Newsgroups gmane.comp.lang.ocaml.lib.gtk
Message-ID <[email protected]>
From: Aaron Bohannon <[email protected]>
> I read that it is possible to install Lablgtk2 with gtk-osx:
> http://yquem.inria.fr/pipermail/lablgtk/2009-January/000265.html
> I set my PKG_CONFIG_PATH as described, but the configure script of
> Lablgtk2 fails.  I have put the most relevant part of the config.log
> file below.  I am running OS X 10.6 on an Intel Core Duo 2 MacBook
> Pro.  Does anyone have an idea of what might be wrong?
> 
>  - Aaron

[...]
> ld: warning: in
> /Library/Frameworks/Gtk.framework/Resources/dev/lib/libGtk.dylib, file
> is not of required architecture

This looks like the standard problem with 10.6: your probably
installed a version of Gtk-OSX compiled for 10.5, using the default
32bit compilation. In 10.6, the default is 64bit.
If your ocaml is also 32bit, you can try to add -m32 to your compiler
flags by hand, and have everything 32bit. However, this is probably
going to bring you problems at some point in the future.
If you compiled ocaml on 10.6, then by default it is 64bit, and you
need 64bit versions for all your libraries.
A simple way to build Gtk-OSX is to use macports.
The incantation to compile gtk is then:

  sudo port -v install gtk2 +no_x11 +quartz

There is however a pitfall: the normal version of pango doesn't
compile on 64bit, due to some missing calls in cairo/64bit.
So you actually need also

  sudo port -v install pango-devel +no_x11 +quartz

This version works, but the appearance is a bit buggy.

Hope this helps,

     Jacques