简体   繁体   English

在Windows上与cabal安装一起使用哪个unix兼容性工具链?

[英]Which unix compatibility toolchain to use with cabal install on windows?

trying to install BlogLiterately on win7/64. 尝试在win7 / 64上安装BlogLiterately

  • installed HP 2014.2/64 已安装HP 2014.2 / 64
  • cabal update
  • cabal install cabal-install
  • renamed C:\\Program Files\\Haskell Platform\\2014.2.0.0\\lib\\extralibs\\bin\\cabal.exe to *.old C:\\Program Files\\Haskell Platform\\2014.2.0.0\\lib\\extralibs\\bin\\cabal.exe重命名为* .old
  • cabal update
  • cabal install BlogLiterately fails cuz needs unix toolchain to install new version of network cabal install BlogLiterately失败,因为cuz需要Unix工具链来安装新版本的network
  • tried installing mingw , but gave up cuz the package manager that pops up only lists packages with suffix 32 , i want 64 , can't tell from http://www.mingw.org/ if it supports 64 bit. 尝试安装mingw ,但放弃了cuz,仅弹出后缀为32的软件包管理器(我想要64 ,无法从http://www.mingw.org/判断是否支持64位。
  • tried installing cygwin64 , added C:\\cygwin64\\bin to the end of PATH , didn't work, see on internet that people think cygwin doesn't work for ghc so well anymore, even though the original error said cygwin would work 尝试安装cygwin64 ,将C:\\cygwin64\\binPATH末尾 ,不起作用,在互联网上看到人们认为cygwin对于ghc不再适用,即使原始错误说cygwin也会起作用
  • found http://msys2.github.io/ , installed it, followed instructions to update with pacman on that page, used Win64 Shell 找到http://msys2.github.io/ ,进行了安装,并按照说明在该页面上使用pacman进行了更新,并使用了Win64 Shell
  • got error that HsOpenSSL is missing c libs eay32 ssl32 , googling says to install http://slproweb.com/products/Win32OpenSSL.html then cabal install HsOpenSSL --extra-include-dirs="c:/OpenSSL-Win64/include" --extra-lib-dirs="c:/OpenSSL-Win64" -- this works, but can't find any official looking docs saying i need Win32OpenSSL -- why can't cabal install this for me? 收到HsOpenSSL缺少c libs eay32 ssl32错误, HsOpenSSL eay32 ssl32搜索说要安装http://slproweb.com/products/Win32OpenSSL.html,然后cabal install HsOpenSSL --extra-include-dirs="c:/OpenSSL-Win64/include" --extra-lib-dirs="c:/OpenSSL-Win64"cabal install HsOpenSSL --extra-include-dirs="c:/OpenSSL-Win64/include" --extra-lib-dirs="c:/OpenSSL-Win64" ,但是找不到任何官方的文档说我需要Win32OpenSSL –为什么无法为我安装它?
  • now cabal install BlogLiterately fails cuz ghc.exe: unable to load package 'hs-bibutils-5.5' 现在, cabal install BlogLiterately cuz cabal install BlogLiterately失败ghc.exe: unable to load package 'hs-bibutils-5.5'

the error: 错误:

ghc.exe: warning: _stricmp from msvcrt is linked instead of __imp__stricmp
ghc.exe: warning: _stricmp from msvcrt is linked instead of __imp__stricmp
ghc.exe: warning: _atoi64 from msvcrt is linked instead of __imp__atoi64
ghc.exe: warning: toupper from msvcrt is linked instead of __imp_toupper
ghc.exe: warning: _strnicmp from msvcrt is linked instead of __imp__strnicmp
ghc.exe: C:\Users\nlab\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\hs-bibutils-5.5\HShs-bibutils-5.5.o: unknown symbol `strdup'

cabal install hs-bibutils --reinstall --force-reinstalls succeeds, but i get the same error when retrying the BlogLiterately install. cabal install hs-bibutils --reinstall --force-reinstalls成功,但是重试BlogLiterately安装时出现相同错误。 i tried moving /c/Program Files/Haskell Platform/2014.2.0.0/mingw/bin to the front of the PATH and again reinstalling hs-bibutils , same result. 我尝试将/c/Program Files/Haskell Platform/2014.2.0.0/mingw/bin移到PATH的前面,然后再次重新安装hs-bibutils ,结果相同。

what is the right way to do this?!?! 正确的方法是什么?!?! which unix toolchain are we supposed to use, and how are we supposed to configure it? 我们应该使用哪个unix工具链,以及如何配置它? why isn't it enough that HP includes mingw 's binaries? 为什么HP包含mingw的二进制文件还不够? gah. 加。

For posterity, new versions of the Haskell Platform for windows (since 8.0.1) allow network to build properly if the cabal file is augmented with a few extra settings as described on the platform website: https://www.haskell.org/platform/ 为方便起见,如果在平台网站上描述了一些额外的设置来扩充cabal文件,则适用于Windows的Haskell平台的新版本(自8.0.1起)允许网络正确构建。https : //www.haskell.org/平台/

Modify your cabal config file (you can verify the location by running "cabal user-config init") to contain the following lines:
extra-prog-path: C:\Program Files\Haskell Platform\8.0.1\msys\usr\bin
extra-lib-dirs: C:\Program Files\Haskell Platform\8.0.1\mingw\lib
extra-include-dirs: C:\Program Files\Haskell Platform\8.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM