我无法在 Mac OS X 10.9.1 上使用当前版本的 Cabal (1.16.0) 构建任何软件包。
这包括 Cabal 本身,即目前无法更新到 1.18.x,并且我看到类似的错误
Failed to install Cabal-1.18.1.2
cabal: Error: some packages failed to install:
Cabal-1.18.1.2 failed during the configure step. The exception was:
ExitFailure 1
cabal-install-1.18.0.2 depends on Cabal-1.18.1.2 which failed to install.
错误消息的最后几行(我认为是相关的)是
In file included from /Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/lib/ghc-7.6.3/include/Rts.h:234,
from /var/folders/w8/w_9g62j15xs9pls1fxw3kkk00000gn/T/ghc26435_0/ghc26435_0.c:1:0:
/Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/lib/ghc-7.6.3/include/rts/Threads.h:19:23:
error: sys/types.h: No such file or directory
In file included from /Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/lib/ghc-7.6.3/include/Rts.h:234,
from /var/folders/w8/w_9g62j15xs9pls1fxw3kkk00000gn/T/ghc26435_0/ghc26435_0.c:1:0:
/Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/lib/ghc-7.6.3/include/rts/Threads.h:49:0:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘forkProcess’
我不认为这实际上与文件“Threads.h”有任何关系,这似乎在语法上是有效的,但我还是在这里包含了相关的行——
#if !defined(mingw32_HOST_OS)
pid_t forkProcess (HsStablePtr *entry); // This is line 49
#else
pid_t forkProcess (HsStablePtr *entry)
GNU_ATTRIBUTE(__noreturn__);
#endif
我能找到的最接近解释的是Cabal GitHub 存储库上的这个问题,看起来它提供了(a)补丁和(b)修复,但我无法让它们中的任何一个工作 - - 主要是因为我不知道在哪里可以找到../cabal/Cabal/
我系统上的文件夹。
任何人都可以提供任何提示吗?