Building version 0.9.7 with GHC 6.4

Instructions on how to build Gtk2Hs version 0.9.7 with GHC 6.4

(Note: this is no longer necessary since Gtk2Hs 0.9.8 supports GHC 6.4)

The 0.9.7 release came out before GHC 6.4 and so does not build “out of the box” with GHC 6.4. (This is because GHC 6.4 introduces significant changes in it’s handling of packages.)

Note that these instructions are for version 0.9.7 and not 0.9.7.1. The patch will not apply cleanly for version 0.9.7.1! (We assume that most Unix users are using version 0.9.7 rather than 0.9.7.1 since the latter was only a Windows bug fix release and contained nothing of interest for Unix users.)

So, to build Gtk2Hs version 0.9.7 from source with GHC 6.4 you need to download this patch: http://haskell.org/gtk2hs/gtk2hs-0.9.7-ghc64.patch and use it as follows:

$ tar -xzf gtk2hs-0.9.7.tar.gz
$ patch -p0 < gtk2hs-0.9.7-ghc64.patch
$ cd gtk2hs-0.9.7/
$ ./configure
$ make
$ su
# make install

For people not familiar with ‘patch‘, note that the ‘-p0‘ option and the directory you are in when you do the patching are important, so unless you know what you are doing, try to keep to the above instructions (though of course you can use any ./configure and make options as appropriate).

If you are using a package rather than building from source you might ask the package maintainer to use this patch and update their package. Alternatively you can wait for the next release (Gtk2Hs version 0.9.8) which will be compatible with GHC 6.4.

Comments are closed.