gcc-looking error when building GHC 6.8.3 from source - "directives may not be used inside a macro argument"

Jeff Evans wayne.mokane at gmail.com
Wed Sep 10 22:21:34 EDT 2008

Hi everyone,

I am trying to build GHC 6.8.3 from source in a slightly nonstandard
environment (mostly with regard to the filesystem).  The build setup,
however, is fairly standard (32-bit x86 RHEL, gcc 3.4, glibc 2.3).  I
managed to get the bootstrap installation from the
"ghc-6.6.1-x86_64-unknown-linux" tarball (downloaded from
http://www.haskell.org/ghc/download_ghc_661.html#x86linux) working
without much trouble.  Now I'm trying to use that to build 6.8.3 from
source.  But I am hitting an error in the build target, apparently for
this rts component.  Output snippet here: http://hpaste.org/10252

The first of the ghc errors is "RtsFlags.c:1120:1: directives may not
be used inside a macro argument" which is followed by many more (I
think this is the real cause though).  I searched around and it seems
like a gcc "limitation" (not supporting something that is not part of
the C standard but people still wanted).  But even then it has
supposedly been supported since gcc 3.2, and I'm using 3.4.

To be honest, I don't know anything about the interaction between ghc
and gcc at this juncture so I'm a bit in the dark.  Any advice is
appreciated.  I can also provide more complete output/details if it
would be useful.  Thank you!

More information about the Glasgow-haskell-users mailing list