ximet
ximet

Reputation: 1116

Process exited with code: ExitFailure 1" after build project Haskell

After connect to .cabal file some package(for example text) and after build project throw Exception: Process exited with code: ExitFailure 1".

For building project, I'm using haskell-stack, command: stack build in terminal. (I'm using MacOS Capitan)

Some line .cabal file:

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

Without(text package) all working.

Full Error:

"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"

Upvotes: 4

Views: 3948

Answers (1)

sclv
sclv

Reputation: 38893

Such errors may be due to an out of date package cache. ghc-pkg recache run at the command line may help.

Failing that, executing stack --no-system-ghc --install-ghc build instead of the usual stack command line will just tell stack to not use the installed libs at all, which may also help.

Upvotes: 4

Related Questions