错误与堆栈

问题描述:

使用stack 1.2.0LTS 7.0我收到以下错误安装shuffle库安装洗牌库:错误与堆栈

$ cabal get shuffle 
$ cd shuffle-0.1.3.3 
$ stack build 
... 
/tmp/shuffle-0.1.3.3/Setup.hs:2:1: error: 
    Failed to load interface for ‘Distribution.Simple.UUAGC’ 
    Perhaps you meant 
     Distribution.Simple.UHC (from Cabal-1.24.0.0) 
     Distribution.Simple.GHC (from Cabal-1.24.0.0) 
     Distribution.Simple.JHC (from Cabal-1.24.0.0) 
    Use -v to see a list of the files searched for. 

/tmp/shuffle-0.1.3.3/Setup.hs:3:1: error: 
    Failed to load interface for ‘UU.UUAGC’ 
    Use -v to see a list of the files searched for. 

-- While building package shuffle-0.1.3.3 using: 
     /usr/local/bin/ghc --make -odir /tmp/shuffle-0.1.3.3/.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/setup -hidir /tmp/shuffle-0.1.3.3/.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/setup -i -i. -package=Cabal-1.24.0.0 -clear-package-db -global-package-db -package-db=/home/asr/.stack/snapshots/x86_64-linux/lts-7.0/8.0.1/pkgdb /tmp/shuffle-0.1.3.3/Setup.hs -o /tmp/shuffle-0.1.3.3/.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/setup/setup 
    Process exited with code: ExitFailure 1 

我使用以下stack.yaml文件:

resolver: lts-7.0 

# Local packages, usually specified by relative directory name 
packages: 
- '.' 
extra-deps: 
- logict-state-0.1.0.2 
- pqueue-1.3.1.1 
- uhc-util-0.1.6.6 
- uuagc-0.9.52.1 
- uuagc-cabal-1.0.6.0 
- uulib-0.9.22 

待办事项我需要在图书馆或stack.yaml中添加/更改某些内容? (我使用cabal-install没有问题)。

我能得到这个通过添加下列到stack.yaml工作:

explicit-setup-deps: 
    shuffle: true 

欲了解更多信息,请参见:https://docs.haskellstack.org/en/stable/yaml_configuration/#explicit-setup-deps

看来这个软件包要求您安装uuagc-cabal来构建它。从Cabal-1.23开始,可以在cabal文件的custom-setup部分中捕获Setup.hs文件的这些程序包依赖关系。

大约有此功能的堆栈票,似乎是从这里相通:

+0

'uuagc-cabal'程序列在'stack.yaml'文件中。它不应该够了吗? – asr

+1

我不这么认为,堆栈只使用extra-deps来解决依赖关系,它似乎并没有积极地安装它们。没有cabal文件中的额外信息,就无法知道这个软件包是否需要作为依赖项。 – glguy

+0

我看到[#897](https://github.com/commercialhaskell/stack/issues/897)被固定在'stack'上游。我是否需要等待释放,包括修复或我可以使用'stack' 1.2.0来安装'shuflle'吗? – asr