Reputation: 47402
I can't build any packages with my current version of Cabal (1.16.0) on Mac OS X 10.9.1.
This includes Cabal itself, i.e. it is currently impossible to update to 1.18.x, and I see an error like
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.
The final lines of the error message (what I believe are the relevant ones) are
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’
I don't think that this actually has anything to do with the file "Threads.h", which seems to be syntactically valid, but I include the relevant lines here anyway --
#if !defined(mingw32_HOST_OS)
pid_t forkProcess (HsStablePtr *entry); // This is line 49
#else
pid_t forkProcess (HsStablePtr *entry)
GNU_ATTRIBUTE(__noreturn__);
#endif
The closest I can find to an explanation is this issue on the Cabal GitHub repository, which looks like it offers both (a) a patch and (b) a fix, but I haven't been able to get either of them to work -- mostly because I don't know where to find the ../cabal/Cabal/
folder on my system.
Can anyone offer any tips?
Upvotes: 1
Views: 322
Reputation: 15078
The issue doesn't look Cabal-specific since the syntax error is inside GHC RTS headers. I suspect that this is caused by gcc
being an alias for clang
on newer OS X versions. A workaround for this issue is described on the Haskell Platform OS X download page. The next version of Haskell Platform will work on OS X 10.9 out of the box.
Upvotes: 2