繁体   English   中英

Haskell Stack无法安装easyrender

[英]Haskell Stack failing to install easyrender

我在Haskell堆栈上安装了GHC 8.0.2,我需要在项目上安装一定数量的软件包,其中一个是easyrender。

我使用以下命令安装它,该命令适用于所有其他软件包安装:

stack install easyrender

我得到以下输出:

easyrender-0.1.1.2: configure

--  While building package easyrender-0.1.1.2 using:
  /home/nathan/.stack/programs/x86_64-linux/ghc-8.0.2/bin/ghc --make -odir /tmp/stack5987/easyrender-0.1.1.2/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/setup -hidir /tmp/stack5987/easyrender-0.1.1.2/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/setup -i -i. -clear-package-db -global-package-db -package-db=/home/nathan/.stack/snapshots/x86_64-linux/ghc-8.0.2/8.0.2/pkgdb -package-db=/home/nathan/.stack/global-project/.stack-work/install/x86_64-linux/ghc-8.0.2/8.0.2/pkgdb -hide-all-packages -package-id=base-4.9.1.0 -package-id=superdoc-0.1.2.5-9gGVGYAJpHrGct376cUN41 -optP-include -optP/tmp/stack5987/easyrender-0.1.1.2/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/setup/setup_macros.h /tmp/stack5987/easyrender-0.1.1.2/Setup.hs /home/nathan/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -main-is StackSetupShim.mainOverride -o /tmp/stack5987/easyrender-0.1.1.2/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/setup/setup -threaded
Process exited with code: ExitFailure 1
Logs have been written to: /home/nathan/.stack/global-project/.stack-work/logs/easyrender-0.1.1.2.log

[1 of 2] Compiling Main             ( /tmp/stack5987/easyrender-0.1.1.2/Setup.hs, /tmp/stack5987/easyrender-0.1.1.2/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/setup/Main.o )
[2 of 2] Compiling StackSetupShim   ( /home/nathan/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack5987/easyrender-0.1.1.2/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/setup/StackSetupShim.o )

/home/nathan/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs:3:1: error:
    Failed to load interface for ‘Distribution.PackageDescription’
    It is a member of the hidden package ‘Cabal-2.0.1.0’.
    It is a member of the hidden package ‘Cabal-1.24.2.0’.
    Use -v to see a list of the files searched for.

/home/nathan/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs:4:1: error:
    Failed to load interface for ‘Distribution.Simple’
    It is a member of the hidden package ‘Cabal-2.0.1.0’.
    It is a member of the hidden package ‘Cabal-1.24.2.0’.
    Use -v to see a list of the files searched for.

/home/nathan/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs:5:1: error:
    Failed to load interface for ‘Distribution.Simple.Build’
    It is a member of the hidden package ‘Cabal-2.0.1.0’.
    It is a member of the hidden package ‘Cabal-1.24.2.0’.
    Use -v to see a list of the files searched for.

/home/nathan/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs:6:1: error:
    Failed to load interface for ‘Distribution.Simple.Setup’
    It is a member of the hidden package ‘Cabal-2.0.1.0’.
    It is a member of the hidden package ‘Cabal-1.24.2.0’.
    Use -v to see a list of the files searched for.

/home/nathan/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs:7:1: error:
    Failed to load interface for ‘Distribution.Simple.LocalBuildInfo’
    It is a member of the hidden package ‘Cabal-2.0.1.0’.
    It is a member of the hidden package ‘Cabal-1.24.2.0’.
    Use -v to see a list of the files searched for.

由于Cabal似乎是一个问题,因此我尝试运行stack install Cabal ,但这没有任何作用。 引用的日志文件仅表示与输出相同的内容。

有想法吗? 内森

这是easyrender软件包描述中的错误。 请注意,cabal-install的“ new-build”也遇到相同的问题。 请参阅我对此堆栈问题的评论: https : //github.com/commercialhaskell/stack/issues/3560#issuecomment-344075524

解决方法如Thomas的回答所述,也位于https://github.com/commercialhaskell/stack/issues/3560#issuecomment-343980627的问题中

下一个堆栈版本将发出有关这种情况的警告,这将减少将来的混乱。

不幸的是,easyrender没有问题跟踪器,它似乎只有一个黑客页面。 我已通过电子邮件发送给作者,要求他解决此问题。

cabal-install没有此类问题:

% cabal install easyrender
Resolving dependencies...
Downloading superdoc-0.1.2.5...
Configuring superdoc-0.1.2.5...
Building superdoc-0.1.2.5...
Installed superdoc-0.1.2.5
Downloading easyrender-0.1.1.2...
Configuring easyrender-0.1.1.2...
Building easyrender-0.1.1.2...
Installed easyrender-0.1.1.2

因此,我猜测这是堆栈以不同方式处理非简单构建的问题。 即,cabal-install似乎假定Cabal是setup.hs的依赖项,而堆栈则不是。

只是检查一下,我尝试过并且可能会产生相同的问题,但是将Cabal添加到easyrender.cabal setup-depends: easyrender.cabal其正常工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM