Closed snakamura closed 10 years ago
The problem is that the Clang preporcessor does not deal well with '
in macro. In this instance it stops expanding the macro parameters after the occurrence of hash' =
. I don't know if there are some Clang CPP flags to make this work. Alternatively, the source tarball could include pre-processed files.
I found that I could build it with cpphs. Just added this pragma and it built.
{-# OPTIONS_GHC -pgmP cpphs -optP --cpp #-}
Is it acceptable for you to depend on cpphs?
@TomMD: Do you have an opinion about this ?
personally I would recommend using Crypto.Hash (from cryptohash) directly to solve the problem :-)
My knee-jerk reaction is that forcing cpphs
is an acceptable short term solution. That or including post-processed filed in the distribution. The alternative is to select a naming scheme based on what a C preprocessor can handle and that just seems backwards.
I think I'm more inclined toward distributing the post-processed file directly than depending on cpphs.
Yes, including it with the distribution is common practice for things like generated parsers and lexers. This means only the package developers needs to have a reliable setup/workaround (e.g., in this case using cpphs if the developer is on Mac with Xcode 5).
Having the same problem with GHC-7.8.1-RC2 on OS X 10.9.2 with XCode 5.1. I'm sorry, but I didn't understand is there some solution?
Having same issue as well. Is there a solution where I don't have to clone the package to fix it?
This issue is related to XCode 5. It is possible to install GCC 4.7 and make GHC to use it. But I used another way: I've installed Yesod (in my case cryptohash-cryptoapi is dependency of Yesod) with constraint: cabal install --only-dependencies --constraint=cryptohash-cryptoapi==1.1.1
Now I can build it with Xcode 5.1 on Mac OS X. Thanks!
When I tried to build 0.1.2 on Mac OS X, I got these errors. It seems that it's something to do with clang problem, but do you have any idea to solve this?
I use ghc-7.6.3 with http://www.haskell.org/platform/ghc-clang-wrapper on Mac OS X 10.8.5 and Xcode 5.1.
Note that I can build 0.1.1 on the same environment.