
Hi, I'm trying to get GHC working on Mac OS X 10.2. I downloaded and installed the binary distribution of GHC 6.0.1, and it seems to compile the 'hello world' application. However, when i try to compile another program (e.g. GHC 6.0.1 itself), it seems that GHC doesn't recognize '#ifdef' statements in code, and reports back with the error: Package.hs:1: parse error on input `#' Can anyone tell what's going on here ? thanks, Remko

Can anyone tell what's going on here ?
I found out that it was CPP generating #line directives on top of its output. I am probably using a newer version of GCC than the one with which GHC was compiled, and it doesn't pass enough flags to the preprocessor (i guess it should pass -P). Is there an easy way to pass extra flags to the preprocessor ? I can't just use -F pgmF cpp, there's probably more to it, right ? cheers, Remko

No, the real problem is that GHC uses the gcc preprocessor and only certain versions work. If you have both 2.95.3 and 3.1 installed, try using the gcc_select command and building it both ways (I forget at the moment which version of GHC stopped building with gcc 2.95.3). Getting useful help with OS X 10.2 is getting harder and harder. I pulled support for Jaguar out of the darwinports port of GHC because it would no longer build on the standard installation and it was nearly impossible to find people who could test changes. Darwinports builds GHC correctly on Panther and Tiger, if that's any help. Best Wishes, Greg On Jun 25, 2005, at 8:38 AM, Remko Troncon wrote:
Can anyone tell what's going on here ?
I found out that it was CPP generating #line directives on top of its output. I am probably using a newer version of GCC than the one with which GHC was compiled, and it doesn't pass enough flags to the preprocessor (i guess it should pass -P). Is there an easy way to pass extra flags to the preprocessor ? I can't just use -F pgmF cpp, there's probably more to it, right ?
cheers, Remko _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (2)
-
Gregory Wright
-
Remko Troncon