Closed pikajude closed 10 years ago
I wasn't aware of this... but I am now. Is it possible to invoke Clang's cpp in non-traditional mode and use ##
I wonder? I'll take a look when I get some free time, unless you get there before me. ;)
I got the same error. I've fixed it by installing a real gcc (I have gcc-4.9) and editing /path/to/ghc-$version/lib/ghc-$version/settings
as follows:
--- /usr/local/ghc/ghc-7.8.2/lib/ghc-7.8.2/settings.orig 2014-07-09 22:40:50.000000000 +0900
+++ /usr/local/ghc/ghc-7.8.2/lib/ghc-7.8.2/settings 2014-07-09 22:41:42.000000000 +0900
@@ -1,5 +1,5 @@
[("GCC extra via C opts", " -fwrapv"),
- ("C compiler command", "/usr/bin/gcc"),
+ ("C compiler command", "/usr/local/bin/gcc-4.9"),
("C compiler flags", " -m64 -fno-stack-protector"),
("C compiler link flags", " -m64"),
("ld command", "/usr/bin/ld"),
@maoe: GCC is unusable on 10.10 because it can't parse one of the system header files, which is included by everything in the stdlib.
It looks like thyme will build successfully with cpphs. I guess we need to push harder on the GHC people to make the compiler use cpphs by default.
Does the above commit fix things on Mavericks? It creates a dependency on cpphs for all Darwin users, but that's probably acceptable.
@liyang I just confirmed that your fix builds fine with vanilla GHC 7.8.2 on Mavericks, but when I ran the tests I got the same error as in the travis build..
@liyang: as @maoe says, commit fixes the build on Darwin, but causes the Travis failure.
The current Travis failure is due to tests/rewrite.hs
being built against an older version of Cabal
than what cabal-install
uses. I'm not sure how to get it to use the same version…
I'm sure you're probably aware of this already, but as of right now it doesn't look like GCC will be usable at all on OS X Yosemite. I'd like to be able to build this package using clang as my compiler.
To clarify, the output from
cabal install thyme -j1
:because the
LENS
macro inthyme.h
uses token pasting. clang's preprocessor in traditional mode is not capable of token pasting at all—the empty comment/**/
becomes a space.