So here's a potential solution to the problem of building gtk2hs on
machines that cannot cope with c2hs's large memory requirements:
We can generate the .precomp files on a machine which can cope and then
distribute them for other people to use in their builds.
The .precomp files are specific to the version of Gtk you want to use.
That is one would need different .precomp files if you have Gtk 2.2.x
installed vs. Gtk 2.4.x. It should be compatible between all patch level
releases in a series (ie it shouldn't matter 2.2.0 -> 2.2.8).
I have built .precomp files for Gtk-2.2.x and Gtk-2.4.x, and have put
them up here:
The instructions are as follows:
download gtk2hs-0.9.7.tar.gz as normal
download one of the low mem overlay tarballs (corresponding to the
version of gtk you are using on your machine)
$ tar -xzf gtk2hs-0.9.7.tar.gz
$ tar -xzf gtk2hs-0.9.7-lowmem-overlay-gtk-2.2.tar.gz (or 2.4 as appropriate)
$ cd gtk2hs-0.9.7
$ ./configure --disable-gnome --disable-mozilla
$ make HSTOOLFLAGS="-H50m -M100m"
# make install
The main point here is that the overlay tarball unpacks files into the
same directory as the main tarball unpacked into.
The --disable-gnome --disable-mozilla is important since the 2.2 overlay
tarball does not include .precomp files for the gnome or mozilla
modules. (The 2.4 tarball does include them for gnome but not mozilla so
for the gtk 2.4 overlay you must still use --disable-mozilla.)
Get latest updates about Open Source Projects, Conferences and News.