【问题标题】:Trouble installing ghc-mod安装 ghc-mod 时遇到问题
【发布时间】:2016-05-29 13:34:39
【问题描述】:

我正在尝试在带有 cabal 的 GHC 8.0.1 上的 Windows 10 x64 上安装 GHC-MOD:

C:\WINDOWS\system32>cabal install ghc-mod
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: ghc-mod-5.5.0.0 (user goal)
trying: djinn-lib-0.0.1.2/installed-I8G... (dependency of djinn-ghc-0.0.2.3)
next goal: mtl (dependency of ghc-mod-5.5.0.0)
rejecting: mtl-2.2.1/installed-6qs... (conflict: mtl =>
transformers==0.5.2.0/installed-0.5..., ghc-mod => transformers<0.5)
rejecting: mtl-2.2.1, mtl-2.2.0.1, mtl-2.2, mtl-2.1.3.1, mtl-2.1.2, mtl-2.1.1,
mtl-2.1, mtl-2.0.1.1, mtl-2.0.1.0, mtl-2.0.0.0, mtl-1.1.1.1, mtl-1.1.1.0,
mtl-1.1.0.2, mtl-1.1.0.1, mtl-1.1.0.0, mtl-1.0 (conflict: djinn-lib =>
mtl==2.2.1/installed-6qs...)
Backjump limit reached (currently 2000, change with --max-backjumps or try to
run with --reorder-goals).

然后改变后跳:

C:\WINDOWS\system32>cabal install ghc-mod --max-backjumps 9999
Resolving dependencies...
Configuring old-time-1.1.0.3...
Failed to install old-time-1.1.0.3
Build log ( C:\Users\xx\AppData\Roaming\cabal\logs\old-time-1.1.0.3.log ):
Configuring old-time-1.1.0.3...
configure: WARNING: unrecognized options: --with-compiler
checking for gcc... C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe
checking whether the C compiler works... no
configure: error: in `/cygdrive/c/Users/xx/AppData/Local/Temp/cabal-tmp-3644/old-time-1.1.0.3':
configure: error: C compiler cannot create executables
See `config.log' for more details
cabal: Leaving directory 'C:\Users\xx\AppData\Local\Temp\cabal-tmp-3644\old-time-1.1.0.3'
cabal: Error: some packages failed to install:
cpphs-1.20.1 depends on old-time-1.1.0.3 which failed to install.
ghc-mod-5.0.0 depends on old-time-1.1.0.3 which failed to install.
haskell-src-exts-1.17.1 depends on old-time-1.1.0.3 which failed to install.
hlint-1.9.32 depends on old-time-1.1.0.3 which failed to install.
old-time-1.1.0.3 failed during the configure step. The exception was:
ExitFailure 77

我已经尝试安装 MinGW+MSYS 和 Cygwin,但都不起作用。所有 GHC 文件夹都在 PATH 环境变量中。

【问题讨论】:

  • 试试stack,效果很好。
  • 我安装了堆栈,但它迫使我从 GHC 8.0.1 降级到 7.10,我不确定堆栈是否适用于 GHC 8
  • 上次我检查您是否需要使用 ghc-8 分支才能让 ghc-mod 与 ghc8 一起工作 - 所以install ghc-mod 现在可能不适用于 8.0.1

标签: haskell ghc


【解决方案1】:

https://github.com/DanielG/ghc-mod/issues/798

官方说,ghc-mod 没有更新到 GHC 8。它有一个分支 ghc-8,它的一些测试仍然被破坏,但其他东西应该可以工作。

ghc-8 分支似乎对我有用。它构建并且我可以使用它。我在 Linux 上使用 Stack。

【讨论】:

    猜你喜欢
    • 2012-10-09
    • 1970-01-01
    • 2014-09-11
    • 2013-12-24
    • 2020-02-27
    • 2018-02-25
    • 2011-06-06
    • 2021-04-14
    • 2016-03-23
    相关资源
    最近更新 更多