【问题标题】:Process exited with code: ExitFailure 1" after build project Haskell构建项目 Haskell 后进程退出并显示代码:ExitFailure 1"
【发布时间】:2016-03-05 12:46:46
【问题描述】:

连接到 .cabal 文件后,一些包(例如 text)和构建项目后抛出异常:Process exited with code: ExitFailure 1"

对于构建项目,我在终端中使用 haskell-stack,命令:stack build。 (我使用的是 MacOS Capitan)

某行 .cabal 文件:

executable Real-exe
hs-source-dirs:      app
main-is:             Main.hs
ghc-options:         -threaded -rtsopts -with-rtsopts=-N
build-depends:       base
                 , Real
                 , text
default-language:    Haskell2010

没有(文本包)所有工作。

完全错误:

"Real-0.1.0.0: unregistering (dependencies changed)

Real-0.1.0.0: configure

Configuring Real-0.1.0.0...

Real-0.1.0.0: build

Preprocessing library Real-0.1.0.0...

[1 of 1] Compiling Lib ( src/Lib.hs, .stack-work/dist/x86_64-    osx/Cabal-1.22.4.0/build/Lib.o )

In-place registering Real-0.1.0.0...

Preprocessing executable 'Real-exe' for Real-0.1.0.0...

<command line="">: cannot satisfy -package-id text-1.2.1.3-  3718968f98d5614ccdc45c27d4e8b0a1

(use -v for more information)

-- While building package Real-0.1.0.0 using:

/Users/ximet/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build lib:Real exe:Real-exe --ghc-options " -ddump-hi -ddump-to-file"

Process exited with code: ExitFailure 1"

【问题讨论】:

  • 在 .cabal 中仅使用空格(不是制表符)

标签: haskell build haskell-platform haskell-stack


【解决方案1】:

此类错误可能是由于包缓存过时造成的。 ghc-pkg recache 在命令行运行可能会有所帮助。

如果做不到这一点,执行 stack --no-system-ghc --install-ghc build 而不是通常的堆栈命令行只会告诉堆栈根本不使用已安装的库,这也可能会有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-06-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多