安装gtk2hs失败 [英] Installing gtk2hs failure

查看:166
本文介绍了安装gtk2hs失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照指示在 Windows 8.1 x64 上使用安装 gtk /wiki.haskell.org/Gtk2Hs/Installationrel =nofollow> http://wiki.haskell.org/Gtk2Hs/Installation

我已经安装了 MSYS2 并用它来下载和构建 gtk 。然后我运行:

  cabal update // ok 

cabal install gtk2hs-buildtools // ok

cabal install gtk //失败,

cabal logs:




  • glib.log

    构建glib-0.13.2.2 ...

    预处理库glib-0.13.2.2 ...

    dist\build\System\Glib\StoreValue_hsc_utils .o:StoreValue_hsc_utils.c :(。text + 0x0):`__debugbreak'的多重定义

    dist\build\System\Glib\StoreValue_hsc_make.o:StoreValue_hsc_make.c :( .text + 0x0):此处首先定义

    collect2.exe:错误:ld返回1退出状态

    链接dist \ build \ System \Glib\StoreValue_hsc_make.o failed(退出代码1)

    命令是:C:\ Program Files \Haskell Platform \7.10.3\mingw\bin\gcc.exe dist\build\System\Glib \StoreValue_hsc_make.o dist\build\System\Glib\\ \\ StoreValue_hsc_utils.o -o dist \ build \ System \Glib\StoreValue_hsc_make.exe -LC:/ msys64 / mingw64 / lib -lgobject-2.0 -lglib-2.0 -lintl -LC:\ Users \Lexa27\\ \\ AppData \Roaming\cabal\x86_64-windows-ghc-7.10.3\utf8-string-1.0.1.1-L8eKHa7Iv9q7FVKUYW6u4b -LC:\ Program Files \ Haskell Platform \7.10.3\lib\\ \\ extralibs \text-1.2.1.3 -LC:\ Program Files \Haskell Platform \7.10.3\lib\binar_3uXFWMoAGBg0xKP9MHKRwi -LC:\ Program Files \ Haskell Platform \7.10.3\lib \conta_2C3ZI8RgPO2LBMidXKTvIU -LC:\Program Files\Haskell Platform\7.10.3\lib\bytes_6VWy06pWzJq9evDvK2d4w6 -LC:\Program Files\Haskell Platform\7.10.3\lib\deeps_6vMKxt5sPFR0XsbRWvvq59 -LC: \Program Files\Haskell Platform\7.10.3\lib\array_67iodizgJQIIxYVTp4emlA -LC:\ Program Files \Haskell Platform\7.10.3\lib\base_HQfYBxpPvuw8OunzQu6JGM -lwsock32 -luser32 -lshell32 -LC:\ Program Files \Haskell Platform \7.10.3\lib\integ_2aU3IZNMF9a7mQ0OzsZ0dS -LC:\ Program Files \Haskell Platform \7.10.3\lib\ghcpr_8TmvWUcS1U1IKHT0levwg3 -LC:\Program Files\Haskell Platform\7.10.3\lib / rts -lm -lwsock32 -lgdi32 -lwinmm


  • build.log
    https://drive.google.com/file/d/0B9t961_0P4GbMWhhMklSMDlpRkE/查看?usp =共享

  • gtk2hs-buildtools https://drive.google.com/file/d/0B9t961_0P4GbdXpGT081V0hHeFE/view?usp=sharing

解决方案

我最近两天遭受同样的错误信息,
终于得到了解决方法(尽管我使用win7 -x64) p>

您需要下载d glib与 https://hackage.haskell.org/package/glib 分开。然后你需要调整glib.cabal,如下所述:
https://mail.haskell.org/pipermail/haskell-cafe/2015-October/121935.html
(您必须删除cpp选项:'-D__属性__(A)=' )



最后,切换到你的glib目录并运行:

  cabal install glib.cabal 

这应该起作用。您可能需要对其他gtk +依赖项执行相同的步骤。


I followed the instructions to install gtk library on Windows 8.1 x64 using http://wiki.haskell.org/Gtk2Hs/Installation.

I've installed MSYS2 and used it to download and build gtk. Then I've run:

cabal update // ok

cabal install gtk2hs-buildtools // ok

cabal install gtk // failed, 

cabal logs:

  • glib.log

    Building glib-0.13.2.2...
    Preprocessing library glib-0.13.2.2...
    dist\build\System\Glib\StoreValue_hsc_utils.o:StoreValue_hsc_utils.c:(.text+0x0): multiple definition of `__debugbreak'
    dist\build\System\Glib\StoreValue_hsc_make.o:StoreValue_hsc_make.c:(.text+0x0): first defined here
    collect2.exe: error: ld returned 1 exit status
    linking dist\build\System\Glib\StoreValue_hsc_make.o failed (exit code 1)
    command was: C:\Program Files\Haskell Platform\7.10.3\mingw\bin\gcc.exe dist\build\System\Glib\StoreValue_hsc_make.o dist\build\System\Glib\StoreValue_hsc_utils.o -o dist\build\System\Glib\StoreValue_hsc_make.exe -LC:/msys64/mingw64/lib -lgobject-2.0 -lglib-2.0 -lintl -LC:\Users\Lexa27\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.3\utf8-string-1.0.1.1-L8eKHa7Iv9q7FVKUYW6u4b -LC:\Program Files\Haskell Platform\7.10.3\lib\extralibs\text-1.2.1.3 -LC:\Program Files\Haskell Platform\7.10.3\lib\binar_3uXFWMoAGBg0xKP9MHKRwi -LC:\Program Files\Haskell Platform\7.10.3\lib\conta_2C3ZI8RgPO2LBMidXKTvIU -LC:\Program Files\Haskell Platform\7.10.3\lib\bytes_6VWy06pWzJq9evDvK2d4w6 -LC:\Program Files\Haskell Platform\7.10.3\lib\deeps_6vMKxt5sPFR0XsbRWvvq59 -LC:\Program Files\Haskell Platform\7.10.3\lib\array_67iodizgJQIIxYVTp4emlA -LC:\Program Files\Haskell Platform\7.10.3\lib\base_HQfYBxpPvuw8OunzQu6JGM -lwsock32 -luser32 -lshell32 -LC:\Program Files\Haskell Platform\7.10.3\lib\integ_2aU3IZNMF9a7mQ0OzsZ0dS -LC:\Program Files\Haskell Platform\7.10.3\lib\ghcpr_8TmvWUcS1U1IKHT0levwg3 -LC:\Program Files\Haskell Platform\7.10.3\lib/rts -lm -lwsock32 -lgdi32 -lwinmm

  • build.log https://drive.google.com/file/d/0B9t961_0P4GbMWhhMklSMDlpRkE/view?usp=sharing
  • gtk2hs-buildtools https://drive.google.com/file/d/0B9t961_0P4GbdXpGT081V0hHeFE/view?usp=sharing

解决方案

I am suffering from the same error message for the last two days and finally got a work-around (though I am using win7 -x64).

You need to download glib separately from https://hackage.haskell.org/package/glib. Then you need to adjust glib.cabal as described here: https://mail.haskell.org/pipermail/haskell-cafe/2015-October/121935.html (you have to remove the cpp-option: '-D__attribute__(A)=')

Finally, switch to your glib directory and run:

cabal install glib.cabal

This should work. You may have to do the same steps with the other gtk+ dependencies.

这篇关于安装gtk2hs失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆