不能用ghc-7.8构建lambdabot(@ haskell-src-exts)

时间:2014-04-28 09:49:56

标签: haskell cabal

我尝试使用ghc-7.8.2安装lambdabot,但在安装haskell-src-exts时遇到错误。为了诊断问题,我尝试了

cabal install haskell-src-exts -v3

并收到以下错误。我使用的是Windows XP 64位。我不知道这是否与windows目录名中的空格有关。任何想法/指针如何解决问题?

...
[_18] next goal: array (dependency of haskell-src-exts-1.15.0.1)
[_18] trying: array-0.5.0.0/installed-d6d...
[_19] done
Ready to install haskell-src-exts-1.15.0.1
Extracting C:\Documents and Settings\ting\Application
Waiting for install task to finish...
Data\cabal\packages\hackage.haskell.org\haskell-src-exts\1.15.0.1\haskell-src-exts-1.15.0.1.tar.gz
to C:\DOCUME~1\ting\LOCALS~1\Temp\haskell-src-exts-1.15.0.1-3008...
Renaming
'C:\DOCUME~1\ting\LOCALS~1\Temp\haskell-src-exts-1.15.0.1-3008\haskell-src-exts-1.15.0.1\dist'
to
'C:\DOCUME~1\ting\LOCALS~1\Temp\haskell-src-exts-1.15.0.1-3008\haskell-src-exts-1.15.0.1\dist-tmp'.
creating
C:\DOCUME~1\ting\LOCALS~1\Temp\haskell-src-exts-1.15.0.1-3008\haskell-src-exts-1.15.0.1\dist
Renaming
'C:\DOCUME~1\ting\LOCALS~1\Temp\haskell-src-exts-1.15.0.1-3008\haskell-src-exts-1.15.0.1\dist-tmp'
to
'C:\DOCUME~1\ting\LOCALS~1\Temp\haskell-src-exts-1.15.0.1-3008\haskell-src-exts-1.15.0.1\dist'.
Failed to install haskell-src-exts-1.15.0.1
Last 10 lines of the build log ( C:\Documents and Settings\ting\Application Data\cabal\logs\haskell-src-exts-1.15.0.1.log ):
cabal.exe: C:\Documents and Settings\ting\Application
Data\cabal\logs\haskell-src-exts-1.15.0.1.log: does not exist

1 个答案:

答案 0 :(得分:7)

我明白了。我试图找到日志文件作为评论建议。但是,在cabal / log文件夹中,在新的ghc-7.8安装上running cabal-install lambdabot之后,哈希表和haskline只有两个日志文件。

要查看此错误是否与默认cabal目录中的空格有关,我使用了一个没有空格的文件夹并进行了手动安装:

$ cd /d/temp
$ cabal get haskell-src-exts
Unpacking to haskell-src-exts-1.15.0.1\
$ cd haskell-src-exts-1.15.0.1/ && cabal configure
Resolving dependencies...
[1 of 1] Compiling Main             ( dist\setup\setup.hs, dist\setup\Main.o )
Linking .\dist\setup\setup.exe ...
Configuring haskell-src-exts-1.15.0.1...
setup.exe: The program 'happy' version >=1.17 is required but it could not be
found.

因此,依赖项中的happy以某种方式丢失并且未被cabal检测到。结果happy使用默认的cabal install命令也存在问题,可以通过手动安装来解决,例如/d/temp

cabal get happy && cd happy* && cabal configure && cabal install

这将安装happy并对haskell-src-exts执行相同操作正确安装软件包。但是在安装lambdabot的过程中还有其他错误,其中没有一个似乎与haskell-src-exts和happy一起遇到的错误。