glib gremlin 与 GHC 7.4
我正在遵循此过程,使用 GHC 7.2.2 进行测试以安装 gtk2hs 和相关套件,但我遇到了一些障碍。我使用的是 Mac OS X Lion、通过自制程序安装的 glib 2.30.2 和 ghc 7.4(圣诞节前夕的候选版本)。我想我的 gcc 版本可能是相关的
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)
。在 cabal install gtk
期间尝试安装 glib
依赖项时会出现问题。我尝试了单独的cabal unpack glib
和cabal install
,我得到了这个指针偏执的抱怨。
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
相关文件的相关行是
cap=rts_evalIO(CAP rts_apply(CAP (HaskellObj)runIO_closure, call),&ret);
,但我没有专业知识来解释它。
我在 reddit 讨论的评论中提出了同样的问题这首先引导我进入这个过程,但我想我也可以在这里寻求智慧。
GHC 7.4 是否改变了此类事情的完成方式,或者是否更有可能在设置的早期阶段出现其他问题?这不是明显的这个问题,但在这个层面上,几乎没有什么是显而易见的我。我对正在发生的事情没有一个好的心理模型。
如果有任何灯棚,我将不胜感激。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
获取 http://code.haskell.org/gtk2hs/ :
darcs从日志中
darcs get http://code.haskell.org/gtk2hs/
from the log:
是的,GHC 7.4 改变了一些事情。
rts_evalIO
定义在includes/RtsAPI.h 中,以前是现在,在7.4 中,它是
其他
rts_eval*
函数也做了类似的改变。简而言之,glib-0.12.2 不能使用 7.4 构建。要么自己破解它以使其编译(我怀疑这非常重要),要么等待并使用 7.2.2,直到发布与 7.4 兼容的新 glib。Yes, GHC 7.4 has changed some things.
rts_evalIO
is 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.