Building GTK+ the Hard Way

Update: Four days after posting this list, GTK+ OS X is available. I’m not sure how to use it build ChoroWare yet, but I’m sure it’s possible (and much easier than the process outlined below).


GTK+ is a user interface toolkit used by many open source software projects.

This is a record of how I managed to build GTK+ on my Mac, not a prescription for the best way to do it. The versions identified here may be out of date, for instance, and there may be additional dependencies I have failed to list. (Most of this work was done months ago, so these steps are based on old notes.)

This procedure yields an X11 version of GTK+. I understand that there is an effort to build a native version of GTK+ for Mac OS X, but this is not it.

I have provided a link to the web site or download area for each library, along with the commands used to build it. You should cd to the library’s directory before running each set of commands. The libraries are listed in the general order in which they were built.

This is probably trivial with a package manager like Fink.


libiconv-1.11: Libiconv (Unicode conversion)

  1. ./configure
  2. make
  3. make check
  4. make install

gettext-0.14.6: Gettext (internationalization)

  1. ./congfigure
  2. make
  3. make check
  4. make install

libtool-1.5.22: Libtool (shared libraries)

Needed by LibJPEG.

  1. ./configure
  2. make
  3. make check
  4. make install

jpeg-6b: LibJPEG

  1. ./configure --enable-shared
  2. (Edit line 39 of Makefile to point to path of GNU Libtool.)
  3. make
  4. make test
  5. make install

tiff-3.8.2: LibTiff

  1. ./configure --with-apple-opengl-framework
  2. make
  3. make check
  4. make install

libpng-1.2.12: LibPNG

  1. ./configure
  2. make
  3. make install

libxml2-2.6.26: LibXML 2

Needed by FontConfig.

  1. ./configure
  2. make
  3. make check
  4. make install

fontconfig-2.4.1: FontConfig

Needed by Cairo.

  1. ./configure
  2. make
  3. make check
  4. make install

cairo-1.2.4: Cairo (graphics renderer)

  1. ./configure
  2. make
  3. make test
  4. make install

pango-1.14.4: Pango (text renderer)

  1. ./configure
  2. make
  3. make check
  4. make install

atk-1.12.3: ATK (accessibility)

  1. ./configure
  2. make
  3. make check
  4. make install

glib-2.12.4: The GIMP Library

  1. ./configure
  2. make
  3. make check
  4. make install

Last, but not least:

gtk+-2.10.6: The GIMP Toolkit

  1. ./configure
  2. make
  3. make check
  4. make install

Anyone brave enough to try all this is encouraged to post the inevitable corrections.

Posted on Saturday, September 20th, 2008. Tags: .