进程退出代码:ExitFailure 1"在构建项目之后Haskell

时间:2015-11-15 15:02:37

标签: haskell build haskell-platform haskell-stack

连接到.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"

1 个答案:

答案 0 :(得分:4)

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

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

相关问题