构建数据默认包的奇怪错误

时间:2015-04-02 01:06:26

标签: windows haskell cabal

我在尝试cabal install data-default时收到了一些奇怪的错误消息。即使在新鲜的沙箱中,该包装也会出现同样的基本现象。我可以毫无问题地安装其他软件包。

错误消息具有以下形式,但对于4个data-default-instances-包中的每一个都会出现:

[1 of 1] Compiling Data.Default.Instances.OldLocale ( Data\Default\Instances\OldLocale.hs, dist\dist-sandbox-6a114df1\build\Data\Default\Instances\OldLocale.o ) C:\Program Files (x86)\MinGHC-7.10.1\ghc-7.10.1\mingw\bin\ar.exe: dist/dist-sandbox-6a114df1\build\libHSdata-default-instances-old-locale-0.0.1-6jcjjaR25tK4x3nJhHHjFM.a-8696\libHSdata-default-instances-old-locale-0.0.1-6jcjjaR25tK4x3nJhHHjFM.a: No such file or directory

知道发生了什么事吗?

ghc-pkg check

的输出
C:\Users\Doug\Documents\GitHub\bird-brain [estimator]> ghc-pkg check
WARNING: cache is out of date: C:/Program Files (x86)/MinGHC-7.10.1/ghc-7.10.1\lib\package.conf.d\pa
ckage.cache
ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.
Warning: haddock-interfaces: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\QuickCh
eck-2.8\html\QuickCheck.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\QuickCheck-2.
8\html doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\tf-rand
om-0.5\html\tf-random.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\tf-random-0.5
\html doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\random-
1.1\html\random.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\random-1.1\ht
ml doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\primiti
ve-0.5.4.0\html\primitive.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\primitive-0.5
.4.0\html doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\mtl-2.2
.1\html\mtl.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\mtl-2.2.1\htm
l doesn't exist or isn't a directory

1 个答案:

答案 0 :(得分:1)

使用https://github.com/haskell/cabal/issues/2502处的策略可以解决此问题,这最终与Windows对总路径长度的限制有关。

使用堆栈是另一种解决方案,可能首先尝试使用堆栈,因为它内部使用的文件夹可能足够接近根路径以便工作。