Posts Tagged ‘build’

Building GTK on OSX and Problems with libiconv

Sunday, March 21st, 2010

Ok, this i maybe a bit special, but maybe it helps someone out there. I am on the way to build GTK+ on OSX using “jhbuild”, following a good instruction:

http://live.gnome.org/GTK%2B/OSX/BuildInstructions

Coming to the point where to build glib, the process exits with following error message:

gconvert.c:55:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv

First the library is on the system; we can find it easily with

$ locate libiconv

Trying to link the system library to the one found provided by xcode failed into strange error messages. So i decided to re-build the libiconv by hand as “root” from source:

$ cd /usr/local/src/

Getting from http://www.gnu.org/software/libiconv/ the latest version (currently 1.13.1) with

$ wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
$ tar zxvf libiconv-1.13.1.tar.gz

Now the configuring, make and install phase:

$ ./configure
$ make
$ make install

This builds the latest version of libiconv for me. Final step was to replace the current version in

/usr/lib

and to go on with the GTK+ process.