Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 269342 - dev-lang/ghc build failure, along with other haskell-related build failures.
Summary: dev-lang/ghc build failure, along with other haskell-related build failures.
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-10 23:12 UTC by carl mackey
Modified: 2010-07-04 15:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
GHC 6.8.2 emerge log (build.log,34.66 KB, text/plain)
2009-05-10 23:16 UTC, carl mackey
Details
emerge --info (emergeinfo.txt,4.76 KB, text/plain)
2009-05-11 13:41 UTC, carl mackey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description carl mackey 2009-05-10 23:12:25 UTC
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.
Comment 1 carl mackey 2009-05-10 23:16:30 UTC
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.
Comment 2 Sebastian Luther (few) 2009-05-11 12:59:03 UTC
Please provide emerge --info.
Comment 3 carl mackey 2009-05-11 13:41:10 UTC
Created attachment 190934 [details]
emerge --info
Comment 4 Lennart Kolmodin (RETIRED) gentoo-dev 2009-12-01 07:21:37 UTC
Does any newer ghc version work for you, like ghc-6.10.4?
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2010-07-04 15:20:26 UTC
> /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.