HeapStackCheck.cmm
Carter Schonwald
carter.schonwald at gmail.com
Tue Dec 10 21:46:48 UTC 2013
are you using GCC or Clang, what versions are they?
On Tue, Dec 10, 2013 at 4:43 PM, Alexander Pakhomov <ker0sin at yandex.ru>wrote:
> Thanks. I think preprocessor dump could help me:
> cpp -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header
> -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS
> -Irts/dist/build -Irts/dist/build/autogen rts/HeapStackCheck.cmm >
> cpp_dump
> That is ghc-stage1 -> cpp and all options that cpp doesn't accept removed.
> I hope ghc preprocessor is compatible with system C preprocessor.
>
> 11.12.2013, 01:06, "Simon Marlow" <marlowsd at gmail.com>:
> > On 10/12/13 00:35, Alexander Pakhomov wrote:
> >
> >> Hi. Trying to compile ghc HEAD on OpenBSD I got an error:
> >> rts/HeapStackCheck.cmm:97:18: parse error on input `['
> >> The code is following:
> >> 96 if (HpAlloc <= BLOCK_SIZE
> >> 97 && bdescr_link(CurrentNursery) != NULL) {
> >> which preprocesses to:
> >> if (HpAlloc <= (1<<12)
> >> && b0[CurrentNursery+15] != (0::bits64)) {
> >> This is the first occurrence of b0 in preprocessed file. I believe
> that it is due to undefined b0.
> >> Command that fails is:
> >> "inplace/bin/ghc-stage1" -static -H32m -O -Iincludes -Iincludes/dist
> -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header
> -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint -i
> -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build
> -Irts/dist/build/autogen -O2 -c rts/HeapStackCheck.cmm -o
> rts/dist/build/HeapStackCheck.o
> >> To preprocess do the following:
> >> cpp -O -Iincludes -Iincludes/dist
> -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header
> -Irts -Irts/dist/build -DCOMPILING_RTS -Irts/dist/build
> -Irts/dist/build/autogen rts/HeapStackCheck.cmm | less
> >>
> >> Can you please find source of b0 in preprocessed file?
> >
> > I think this means that something went wrong when generating
> > DerivedConstants.h, which is where the definition of bdescr_link() comes
> > from. In my build, I have the following, in the file
> > includes/dist-derivedconstants/header/:
> >
> > #define OFFSET_bdescr_link 16
> > #define REP_bdescr_link b64
> > #define bdescr_link(__ptr__) REP_bdescr_link[__ptr__+OFFSET_bdescr_link]
> >
> > This is auto-generated by the program in utils/deriveConstants. This
> > used to be a C program, but nowadays it's a Haskell program that
> > generates a C program for reasons that I forget. Anyway, your problem
> > is somewhere in there... see if you can find out where by dumping out
> > intermediate files and so forth. If you get stuck, tell us where you
> > get to and we'll try to help some more.
> >
> > Cheers,
> > Simon
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20131210/121f5260/attachment.html>
More information about the ghc-devs
mailing list