I don't know why, but GHC and other Haskell-related modules fail to emerge. They seem to have problems with C header files... somehow. These errors have been seen in header files that are from very mundane sources, like /usr/include/string.h but I can still build other programs. Creating ghcautoconf.h... Creating ghcplatform.h... Done. Done. ../utils/mkdependC/mkdependC -f .depend -- -O -march=pentium-m -O2 -pipe -Wa,--noexecstack -DTABLES_NEXT_TO_CODE -I. -I../rts -- mkDerivedConstants.c gcc -O -march=pentium-m -O2 -pipe -Wa,--noexecstack -DTABLES_NEXT_TO_CODE -I. -I../rts -c mkDerivedConstants.c -o mkDerivedConstants.o In file included from Regs.h:28, from Stg.h:150, from Rts.h:19, from mkDerivedConstants.c:23: /usr/include/gmp.h:524: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/gmp.h:524: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/gmp.h:524: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/gmp.h:524: error: expected declaration specifiers or ‘...’ before ‘size_t’ Reproducible: Always Steps to Reproduce: sudo emerge ghc Actual Results: As an example, GHC 6.8.2 spits out a very long list of errors regarding C header files (to be attached). Expected Results: I would expect the Glasgow Haskell Compiler to be installed. I had, not long before noticing this, been having problems with an GCC upgrade, though I had thought that to have been ironed out. I don't know if this is relevant.
Created attachment 190885 [details] GHC 6.8.2 emerge log The build log from attempting to emerge GHC version 6.8.2 I have tried re-emerging the packages responsible for those header files, with no change.
Please provide emerge --info.
Created attachment 190934 [details] emerge --info
Does any newer ghc version work for you, like ghc-6.10.4?
> /usr/include/gmp.h:524: error: expected declaration specifiers or ‘...’ before ‘size_t’ Looks like Carl found an error in his dev-libs/gmp package. His gcc does not declare 'size_t', but uses it. My current 'gmp.h' contains: #define __need_size_t /* tell gcc stddef.h we only want size_t */ #if defined (__cplusplus) #include <cstddef> /* for size_t */ #else #include <stddef.h> /* for size_t */ #endif #undef __need_size_t Closing as WORKSFORME. If you still experience this problem - please reopen and we will try to track down the real problem by writing small tests.