Re: compiling pygtk against gtk+ frameworks on osx



On Tuesday, November 17, 2009, Chad Dombrova <chadrik gmail com> wrote:
> Hi,
> thanks for the response.
>
>
>>  I see no mention of the glib/gobject/GTK+ versions that are included in
>> the said framework on the site: http://www.gtk-osx.org/
>
> here's the info from the installer window:
>
> ---------------------------------------
> GTK+ 2.14
>
> This package contains three frameworks needed for developing GTK+ applications natively on Mac OS X: GLib, Cairo and GTK+.
>
> The frameworks contain the following components:
>
> GLib:
>
>   glib 2.18.1
>   gettext 0.16
>   intltool 0.40.4
>
> Cairo:
>
>   cairo 1.7.6
>   pixman 0.12
>   libpng 1.2.29
>
> GTK+:
>
>   gtk+ 2.14.3
>   pango 1.22.0
>   atk 1.24.0
>   ige-mac-integration 0.8.2
>   gnome-icon-theme 2.24.0
>   hicolor-icon-theme 0.10
>   gtk-engines 2.16.0 (only Clearlooks)
>   libpng 1.2.29
>   tiff 3.8.2
>   jpeg 6b
>
>
> The frameworks are developer versions with debugging symbols and the necessary setup for building both Xcode projects and "autotools" projects against them. Note that Xcode 2.5 or later is needed. See:
>
>   http://developer.imendio.com/projects/gtk-osx for more information.
>
> Note that this package is still in a beta phase, in particular, the exact selection of libraries and tools included in the frameworks might change in the next version. Therefore it is best not to distribute the frameworks as standalone frameworks, but only included inside application bundles for now. Tools to produce standalone app bundles using those frameworks will be provided later.
>
> ---------------------------------------
>
> the provided link is dead.  the frameworks install dirs are:
>
> /Library/Frameworks/Cairo.framework
> /Library/Frameworks/GLib.framework
> /Library/Frameworks/Gtk.framework
>
>>
>> Also, is it standard practice to configure & build any software from
>> a system directory ?
>
> you're referring to the --prefix=/System/Library/Frameworks/Python.framework/Versions/2.6/ that i have set, i imagine.   you're right, that's probably not a fantastic idea.  i know that the installer looks for site-packages in ${prefix}/lib/python2.6/site-packages.  this exists for the system path, but not for the proper local path, which is /Library/Python/2.6/site-packages. i should probably just compile to a separate location.
>
>>
>> Your configure error says that it doesnt find GLIB 2.8, either you dont
>> have it, or you need to update PKG_CONFIG_PATH to find the .pc
>> files needed to compile.
>
> this is the kind of info i was hoping for.  now that i know to look, i see that the frameworks do in fact come with .pc files:
>
> gio-2.0.pc
> gio-unix-2.0.pc
> glib-2.0.pc
> gmodule-2.0.pc
> gmodule-export-2.0.pc
> gmodule-no-export-2.0.pc
> gobject-2.0.pc
> gthread-2.0.pc
>
> i know that the versions say 2.0, but i think this is a common framework practice to truncate all but the primary version.  the installer says the version is of glib is 2.18.1
>
> so, after exporting the PKG_CONFIG_PATH env var to the appropriate dir, configure still cannot find glib.
>
> $chad> export PKG_CONFIG_PATH=/Library/Frameworks/GLib.framework/Resources/dev/lib/pkgconfig
> $chad> ./configure --prefix=/usr/local/pygtk
> [...]
> checking whether to enable threading in pygtk... yes
> ./configure: line 11833: ./libtool: No such file or directory
> checking for pkg-config... /usr/local/bin/pkg-config
> checking pkg-config is at least version 0.16... yes
> checking for GLIB - version >= 2.8.0... no
> *** Could not run GLIB test program, checking why...
> *** The test program failed to compile or link. See the file config.log for the
> *** exact error that occured. This usually means GLIB is incorrectly installed.
> configure: error: gobject is required to build pygtk?
>
> also, i'm not sure if i should be concerned about the ./libtool error....
>
>>
>> At any rate, I should also point you here http://gtk-osx.sourceforge.net/
>> you probably already know about that page, it will allow you to build
>> GTK+ and package your libs/apps along with GTK+ and its deps
>> into a Foo.app relocatable package.
>
> yeah, i've used darwinports and compiled from scratch, but there's always a hiccup along the way that leaves me stumped. these frameworks are perfect, i'm ready to compile apps in xcode after a 30 second install.... pygtk is the only hiccup now.

Yes, there are always hiccups, like avoiding
to build docs or translations in some broken
modules or building some packages manually
from the shell, but damn is it ever easy compared to building the gnome stack on
a normal ubuntu system ;)

So, you could inspect the glib-2.0.pc file
and see if it was in fact built with the correct
prefix inside, and that may involve lots of
strongarming the framework to get it to build,
or you could simply go through a few hiccups
of building GTK+ quartz backend :)

I personally preffer the technique that I know
will work (i.e. building from scratch) than to
muck about with an experimental framework.

Pick your poison ;)

Cheers,
    -Tristan


>
> thanks for the help. it is greatly appreciated.
>
> -chad
>
>
>
>
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]