Gcc 在Windows上构建Haskell GD库

Gcc 在Windows上构建Haskell GD库,gcc,haskell,gd,cabal,Gcc,Haskell,Gd,Cabal,我正在尝试在带有cabal的Windows上安装for Haskell,但从GCC得到以下错误: Resolving dependencies... Configuring gd-3000.6.1... Preprocessing library gd-3000.6.1... Building gd-3000.6.1... [1 of 4] Compiling Graphics.GD.Internal ( dist\build\Graphics\GD\Internal.hs, dist\buil

我正在尝试在带有cabal的Windows上安装for Haskell,但从GCC得到以下错误:

Resolving dependencies... Configuring gd-3000.6.1... Preprocessing library gd-3000.6.1... Building gd-3000.6.1... [1 of 4] Compiling Graphics.GD.Internal ( dist\build\Graphics\GD\Internal.hs, dist\build\Graphics\GD\Internal.o ) [2 of 4] Compiling Graphics.GD.ByteString.Lazy ( Graphics\GD\ByteString\Lazy.hs, dist\build\Graphics\GD\ByteString\Lazy.o ) [3 of 4] Compiling Graphics.GD.ByteString ( Graphics\GD\ByteString.hs, dist\build\Graphics\GD\ByteString.o ) [4 of 4] Compiling Graphics.GD ( dist\build\Graphics\GD.hs, dist\build\Graphics\GD.o ) cbits\gd-extras.c: In function `gdImagePtrDestroyIfNotNull': cbits\gd-extras.c:10:0: internal compiler error: in rest_of_handle_final, at toplev.c:2067 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.mingw.org/bugs.shtml> for instructions. cabal: Error: some packages failed to install: gd-3000.6.1 failed during the building phase. The exception was: ExitFailure 1 正在解析依赖项。。。 正在配置gd-3000.6.1。。。 预处理库gd-3000.6.1。。。 建筑gd-3000.6.1。。。 [1/4]编译Graphics.GD.Internal(dist\build\Graphics\GD\Internal.hs,dist\build\Graphics\GD\Internal.o) [2/4]编译Graphics.GD.ByteString.Lazy(Graphics\GD\ByteString\Lazy.hs,dist\build\Graphics\GD\ByteString\Lazy.o) [3/4]编译Graphics.GD.ByteString(Graphics\GD\ByteString.hs,dist\build\Graphics\GD\ByteString.o) [4/4]编译Graphics.GD(dist\build\Graphics\GD.hs,dist\build\Graphics\GD.o)cbits\GD extras.c:在函数“gdImagePtrDestroyIfNotNull”中: cbits\gd extras.c:10:0: 内部编译器错误:在toplev.c:2067处的句柄final的rest\u中 请提交完整的bug报告, 如果合适,使用预处理源。 有关说明,请参阅。 阴谋集团:错误:某些软件包未能安装: gd-3000.6.1在建造阶段失败。例外情况是: 退出失败1 谷歌搜索“rest\u of\u handle\u final toplev.c 2067”会因其他库的类似问题而获得几次点击,并链接到。最新的Haskell Windows平台(2010.2.0.0)附带了GHC 6.12.3和gcc 3.4.5,那么我该如何解决这个问题呢?我可以强迫阴谋集团以某种方式使用更新版本的gcc(我通过MinGW拥有GCC4.5.2),这会有帮助吗


如果有人在Windows上成功编译了GD库,我可以使用一些提示。

三种可能的解决方案,有些您可能不喜欢:

  • 使用
    cabalinstall--with gcc=…
    选择所需的gcc
  • 使用可能有更新的gcc的(页面没有说明)
  • 使用带有包管理器的操作系统,这样您就不会依赖Haskell编译器与C编译器紧密耦合,而C编译器可能不太愿意更新

  • 您试过了吗?现在哪一个是最新的?至于2,Haskell Platform 2011.2有GHC 7.0.2。