解决安装Keter vis Stack时的依赖性问题

时间:2018-11-27 12:31:40

标签: haskell-stack keter

我正在尝试将keter可执行文件安装到stack的隐式“ global-project”上。我使用目录中的stack install keter执行此操作。当我这样做时,我得到了错误。

In the dependencies for keter-1.4.3.2:
    http-reverse-proxy-0.5.0.1 from stack configuration does not match >=0.4.2 && <0.5  (latest matching version is 0.4.5)
    unix-compat-0.5.0.1 from stack configuration does not match >=0.3 && <0.5  (latest matching version is 0.4.3.1)
needed since keter is a build target.

Some different approaches to resolving this:

  * Set 'allow-newer: true' in <$HOME>/.stack/config.yaml to ignore all version constraints and build anyway.

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated
constraint errors, but results may be unpredictable.

  * Recommended action: try adding the following to your extra-deps in <$HOME>/.stack/global-project/stack.yaml:

http-reverse-proxy-0.4.5@sha256:7f2a181ec848e8fdc0bdb4d6e775e488897957ee7ae0a2b82a623360168ccf96
unix-compat-0.4.3.1@sha256:a291f209e9c9723204c49c978ed2c53997dbc9666e53fe7bf7a3548b2c8bb22c

当我执行建议的操作时(即,将以下内容添加到/.stack/global-project/stack.yaml):

extra-deps:
  - http-reverse-proxy-0.4.5@sha256:7f2a181ec848e8fdc0bdb4d6e775e488897957ee7ae0a2b82a623360168ccf96
  - unix-compat-0.4.3.1@sha256:a291f209e9c9723204c49c978ed2c53997dbc9666e53fe7bf7a3548b2c8bb22c

第二次stack install keter时出现另一个错误。

完成8个动作。

-使用以下命令构建软件包keter-1.4.3.2时:       /.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir = .stack-work / dist / x86_64-linux-tinfo6 / Cabal-2.0.1.0 build --ghc-options“ -ddump-hi -ddump-to-file -fdiagnostics-color = always”     进程退出,代码为:ExitFailure 1     日志已写入:/.stack/global-project/.stack-work/logs/keter-1.4.3.2.log

Configuring keter-1.4.3.2...
Preprocessing library for keter-1.4.3.2..
Building library for keter-1.4.3.2..
[ 1 of 18] Compiling Codec.Archive.TempTarball ( Codec/Archive/TempTarball.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.0.1.0/build/Codec/Archive/TempTarball.o )
[ 2 of 18] Compiling Data.Conduit.LogFile ( Data/Conduit/LogFile.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.0.1.0/build/Data/Conduit/LogFile.o )
[ 3 of 18] Compiling Data.Conduit.Process.Unix ( Data/Conduit/Process/Unix.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.0.1.0/build/Data/Conduit/Process/Unix.o )

/tmp/stack2837/keter-1.4.3.2/Data/Conduit/Process/Unix.hs:65:20: error:
    • The constructor ‘ProcessHandle’ should have 3 arguments, but has been given 2
    • In the pattern: ProcessHandle m _
      In an equation for ‘processHandleMVar’:
          processHandleMVar (ProcessHandle m _) = m
   |
65 | processHandleMVar (ProcessHandle m _) = m
   |                    ^^^^^^^^^^^^^^^^^

我的猜测是,keter最终仍会在构建时尝试使用0.5 *版本,这些版本具有不同的签名,因此构建会中断。关于如何正确安装keter的任何想法?

以下是一些调试信息:

`stack exec -- ghc -v`
Glasgow Haskell Compiler, Version 8.2.2, stage 2 booted by GHC version 8.0.2
Using binary package database: <$HOME>/.stack/programs/x86_64-linux/ghc-tinfo6-8.2.2/lib/ghc-8.2.2/package.conf.d/package.cache
Using binary package database: <$HOME>/.stack/snapshots/x86_64-linux-tinfo6/lts-11.5/8.2.2/pkgdb/package.cache
Using binary package database: <$HOME>/.stack/global-project/.stack-work/install/x86_64-linux-tinfo6/lts-11.5/8.2.2/pkgdb/package.cache
package flags []
loading package database <$HOME>/.stack/programs/x86_64-linux/ghc-tinfo6-8.2.2/lib/ghc-8.2.2/package.conf.d
loading package database <$HOME>/.stack/snapshots/x86_64-linux-tinfo6/lts-11.5/8.2.2/pkgdb
loading package database <$HOME>/.stack/global-project/.stack-work/install/x86_64-linux-tinfo6/lts-11.5/8.2.2/pkgdb
wired-in package ghc-prim mapped to ghc-prim-0.5.1.1
wired-in package integer-gmp mapped to integer-gmp-1.0.1.0
wired-in package base mapped to base-4.10.1.0
wired-in package rts mapped to rts
wired-in package template-haskell mapped to template-haskell-2.12.0.0
wired-in package ghc mapped to ghc-8.2.2
wired-in package dph-seq not found.
wired-in package dph-par not found.
*** Deleting temp files:
Deleting:
*** Deleting temp dirs:
Deleting:
ghc: no input files
Usage: For basic information, try the `--help' option.



stack --version
Version 1.9.1, Git revision f9d0042c141660e1d38f797e1d426be4a99b2a3c (6168 commits) x86_64 hpack-0.31.0

0 个答案:

没有答案