[Stack build error:构建软件包aeson时。 (校准)ExitFailure 1

问题描述 投票:1回答:1

当我运行“ stack build”时出现错误:

--  While building package aeson-1.1.2.0 using:
      /Users/kaspazza/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build --ghc-options ""
    Process exited with code: ExitFailure 1

我的stack.yaml:

resolver: lts-9.10

packages:
- '.'

extra-deps: []

flags: {}

extra-package-dbs: []

命令:stack exec-哪个ghc给出:

/Users/kaspazza/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc

命令:ghc --version

The Glorious Glasgow Haskell Compilation System, version 8.8.3

命令:堆栈生成

aeson   > configure
aeson   > Configuring aeson-1.1.2.0...
aeson   > build    
aeson   > Building aeson-1.1.2.0...
aeson   > Preprocessing library aeson-1.1.2.0...
aeson   > [ 1 of 21] Compiling Data.Aeson.Types.Internal ( Data/Aeson/Types/Internal.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Types/Internal.o )
aeson   > [ 2 of 21] Compiling Data.Aeson.Types.Generic ( Data/Aeson/Types/Generic.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Types/Generic.o )
aeson   > [ 3 of 21] Compiling Data.Aeson.Parser.UnescapeFFI ( ffi/Data/Aeson/Parser/UnescapeFFI.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Parser/UnescapeFFI.o )
aeson   > [ 4 of 21] Compiling Data.Aeson.Parser.Unescape ( Data/Aeson/Parser/Unescape.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Parser/Unescape.o )
aeson   > [ 5 of 21] Compiling Data.Aeson.Parser.Internal ( Data/Aeson/Parser/Internal.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Parser/Internal.o )
aeson   > <command line>: can't load .so/.DLL for: /Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cff025076e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib (dlopen(/Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cff025076e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib, 5): REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB has segment 2 which is not a writable segment (__LINKEDIT) in /Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cff025076e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib)

--  While building package aeson-1.1.2.0 using:
      /Users/kaspazza/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build --ghc-options ""
    Process exited with code: ExitFailure 1
Progress 1/2

命令:阴谋安装

cabal: Could not resolve dependencies:
[__0] trying: duckling-0.1.6.1 (user goal)
[__1] next goal: snap-server (dependency of duckling)
[__1] rejecting: snap-server-1.1.1.1 (conflict: duckling =>
snap-server>=1.0.1.1 && <1.1)
[__1] skipping: snap-server-1.1.1.0, snap-server-1.1.0.0 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '>=1.0.1.1 && <1.1' from 'duckling')
[__1] trying: snap-server-1.0.3.3
[__2] next goal: base (dependency of duckling)
[__2] rejecting: base-4.13.0.0/installed-4.13.0.0 (conflict: snap-server =>
base>=4 && <4.11)
[__2] skipping: base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0,
base-4.11.0.0 (has the same characteristics that caused the previous version
to fail: excluded by constraint '>=4 && <4.11' from 'snap-server')
[__2] rejecting: base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0,
base-4.8.2.0, base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1,
base-4.7.0.0, base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0,
base-4.4.1.0, base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2,
base-4.2.0.1, base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2,
base-3.0.3.1 (constraint from non-upgradeable package requires installed
instance)
[__2] fail (backjumping, conflict set: base, duckling, snap-server)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: snap-server, duckling, base

((我在Mac上,我认为问题出在我机器上工具的版本/依赖性)为什么我得到错误,或者如何调试它的任何想法?

haskell ghc cabal haskell-stack aeson
1个回答
0
投票

复制我的评论

显然,这也是使用ghc-8.6.3构建的。 ghc的这种版本在堆栈的快照13.11中可用。如果需要,请更改stack.yaml以将解析器设置为lts-13.11。它将下载不同版本的编译器和库。也许有效

根据您的评论

正如您所说的,您必须添加allow-newer: true才能正确解决依赖关系

© www.soinside.com 2019 - 2024. All rights reserved.