[nhc-bugs] Trouble building nhc98 for AIX

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Thu Sep 30 11:20:03 EDT 2004


John Goerzen <jgoerzen at excelhustler.com> writes:

> > Thanks, I'll add those tests to CVS.
> 
> I've got one other patch I'll send along yet once I've got everything 
> built.

Please do.

> /home/jgoerzen/programs/nhc98-1.16/script/nhc98 ....  DErrNo.hs
> 80554 Segmentation fault(coredump)
> 
> If I can help you with debugging, let me know.  I'm decent with gdb but 
> I have no idea what to do to debug nhc98.

gdb is next to useless on any program compiled with nhc98, since
there are almost no C-like function entries or stacks to look at.

Fortunately, I think we tracked down this seg fault a few months back.
It is some new kind of interaction with gcc >= 3.3, whereby the latter
places data differently in memory to previous versions.

> Core was generated by `hmake-PRAGMA'.
> Program terminated with signal 11, Segmentation fault.
> (gdb) bt
> #0  0x10000920 in run ()
> #1  0x100006c8 in text ()
> #2  0x100006c8 in text ()
> #3  0x100001cc in __start ()

This is exactly what I would expect - run() is the entry point to
the nhc98 runtime system, and everything else is internal to that.

> I suppose hmake-PRAGMA needs to be built with debugging symbols.  I'll 
> see if I can figure out how.

For the reason I have just outlines, I don't think it is worth it.

There have been a few recent patches, additional to those on the
website, for fixing nhc98's interaction with gcc-3.3.x.  Rather than
try to extract them, I'm going to suggest you collect a snapshot of
the current CVS, which has these fixes plus several more improvements.
Then, if you still can't get it to build, we will at least be sure
that the problem does not lie with inadequate patch management,
but with the current codebase.

    ftp://ftp.cs.york.ac.uk/pub/haskell/nhc98/nhc98src-1.17.tar.gz

Regards,
    Malcolm



More information about the Nhc-bugs mailing list