Cabal: cabal配置失败

5
这个问题只是为了 yak-shaving 尝试解决 另一个问题
因此,为了诊断我的另一个问题,我被建议尝试:
cabal unpack base
cd base-4.3.1.0
cabal haddock

为了查看它的作用。

只是,当我执行cabal unpack base时,它解压了base-3.0.3.2。然后cabal haddock抱怨我需要先运行cabal configure,然后失败了(遗憾的是,失去了确切的错误信息)。

所以我决定安装base-4.3.1.0,只是为了能够完全重现指令。
即使安装完成后,cabal unpack base仍会解压base-3.0.3.2,尽管cabal unpack base-4.3.1.0会解压base-4.3.1.0

现在我无法配置任何一个:

% cabal unpack base
Unpacking to base-3.0.3.2/
% cd base-3.0.3.2
% cabal haddock
cabal: Run the 'configure' command first.
% cabal configure
Resolving dependencies...
Configuring base-3.0.3.2...
cabal: At least the following dependencies are missing:
base >=4.0 && <4.3, syb ==0.1.*
% cd ..
%
% cabal unpack base-4.3.1.0
Unpacking to base-4.3.1.0/
% cd base-4.3.1.0
% cabal haddock
cabal: Run the 'configure' command first.
% cabal configure
Resolving dependencies...
Configuring base-4.3.1.0...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking for gcc... gcc
checking whether the C compiler works... yes
...
checking for library containing iconv... -liconv
checking for library containing locale_charset... none required
configure: creating ./config.status
config.status: error: cannot find input file: `base.buildinfo.in'
% cd ..

此外,我无法回退到3.0.3.2基础版本,因为它依赖于基础版本>=4.0 <4.3(什么鬼?),而我无法安装基础版本4.2.0.2,因为它失败了,找不到base.buildinfo.in
% cabal --version
cabal-install version 0.10.2
using version 1.10.1.0 of the Cabal library
% cabal info base
* base             (library)
    Synopsis:      Basic libraries (backwards-compatibility version)
    Versions available: 3.0.3.1, 3.0.3.2, (4.0.0.0), (4.1.0.0), (4.2.0.0),
                        (4.2.0.1), (4.2.0.2), (4.3.0.0), (4.3.1.0)
    Versions installed: (4.3.1.0)
    Homepage:      [ Not specified ]
    Bug reports:   http://hackage.haskell.org/trac/ghc/newticket?component=libraries/base
    Description:   This is a backwards-compatible version of the base package.
                   It depends on a later version of base, and was probably
                   supplied with your compiler when it was installed.
    License:       BSD3
    Maintainer:    libraries@haskell.org
    Source repo:   http://darcs.haskell.org/packages/base3-compat
    Dependencies:  base >=4.0 && <4.3, syb ==0.1.*
    Documentation: /usr/local/share/doc/ghc/html/libraries/base-4.3.1.0
    Cached:        Yes
    Modules:
    ...
%

我做错了什么,该怎么修复?
1个回答

5
没有人打算自行编译base。它与特定的ghc安装程序绑定,因此如果您构建了它,则无法使用任何其他基础包。我不惊讶,从hackage构建基础包失败;很可能没有人尝试过构建它。
无论如何,我建议您检查ghc源代码base.buildinfo.in文件将在基础包存储库中。您可以将文件从存储库复制到未打包的分发版中,但最好还是从已检出的源代码构建。
只确保安装文档而不是库即可。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接