I’m in the process of following this process, tested with GHC 7.2.2 for installing gtk2hs and related kit, but I’ve hit a little snag. I’m using Mac OS X Lion, glib 2.30.2 installed via homebrew, and ghc 7.4 (the release candidate from just before Christmas). I suppose my gcc version may be relevant
bash-3.2$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
The trouble comes when attempting to install the glib dependency during cabal install gtk. I tried a separate cabal unpack glib and cabal install, and I get this pointer-paranoid complaint.
bash-3.2$ cabal install
Resolving dependencies...
Configuring glib-0.12.2...
Building glib-0.12.2...
Preprocessing library glib-0.12.2...
System/Glib/hsgclosure.c: In function 'gtk2hs_closure_marshal':
System/Glib/hsgclosure.c:110:0:
warning: passing argument 1 of 'rts_evalIO' from incompatible pointer type
System/Glib/hsgclosure.c:110:0:
error: void value not ignored as it ought to be
The relevant line of the relevant file is
cap=rts_evalIO(CAP rts_apply(CAP (HaskellObj)runIO_closure, call),&ret);
but I have not the expertise to interpret it.
I’ve asked the same question in a comment on the reddit discussion which led me to the process in the first place, but I thought I might seek wisdom here too.
Has GHC 7.4 changed the way this sort of thing is done, or is it more likely that something else is broken, earlier in the setup? It is not obviously this problem, but at this level, very little is obvious to me. I don’t have a good mental model of what’s going on.
I’d be grateful for any light shed.
Yes, GHC 7.4 has changed some things.
rts_evalIOis defined in includes/RtsAPI.h, previously it wasNow, in 7.4, it is
The other
rts_eval*functions changed similarly. In short, glib-0.12.2 doesn’t build with 7.4. Either hack it yourself to make it compile (highly nontrivial I suspect) or wait and use 7.2.2 until a new glib is released that works with 7.4.