can't build head: parser file name / module name conflict

Austin Seipp aseipp at pobox.com
Thu Aug 22 13:41:15 CEST 2013


Carter is building with the new XCode, which only has Clang on OS X. This
error is a result of clang preprocessing Parser.y.pp, since it uses a
'double pass' CPP trick to pass -fcmm-sink to the stage2 compiler. I could
never fully come to understand the behavior of why this was an error, and
it seemed to be affected by whitespace in the resultant file from Happy.
Fiddling with whitespace made it work somehow, but I couldn't find out what
behavior (or changes in Clang) allowed this.

Looking back on it, the correct fix I think is to only pass -fcmm-sink if
Parser.hs is being built with the stage2 compiler, in the build system.
This is a lot less fragile, I feel. (Relatedly, we also need to make sure
that -fcmm-sink is passed to stage1, if boostrapping ghc >= 7.7, so 7.8 can
build itself once released.)

There's a host of OS X things that need attention at the moment
unfortunately, and my personal machine is a bit broken right now. But I
have a new 10.7 build machine I can use, so I'll try to get on it ASAP.


On Thu, Aug 22, 2013 at 2:28 AM, Simon Marlow <marlowsd at gmail.com> wrote:

> On 19/08/13 21:16, Carter Schonwald wrote:
>
>> hey all,
>> i'm trying to build head to test out some stuff, and i'm hitting the
>> following error message (http://ghc.haskell.org/trac/**ghc/ticket/8143<http://ghc.haskell.org/trac/ghc/ticket/8143>)
>>
>> compiler/stage1/build/Parser.**hs:1:1:
>>      File name does not match module name:
>>      Saw: `Main'
>>      Expected: `Parser'
>> make[1]: *** [compiler/stage1/build/.**depend-v.haskell] Error 1
>>
>
> Possibly your Parser.hs is corrupt somehow - take a look.  Remove the file
> and try again?
>
> Cheers,
>         Simon
>
>
>
> ______________________________**_________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/**mailman/listinfo/ghc-devs<http://www.haskell.org/mailman/listinfo/ghc-devs>
>



-- 
Regards,
Austin - PGP: 4096R/0x91384671
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130822/fc75223a/attachment.htm>


More information about the ghc-devs mailing list