[nhc-bugs] hi Problems

Brent Fulgham brent.fulgham@xpsystems.com
Thu, 31 May 2001 09:55:45 -0700


Hi Malcom,

> > Type :? for help
> > [Std   module... /usr/include/nhc98/Prelude.hi]
> > Prelude> ord 'a'
> > [Compiling...Segmentation fault
> > bfulgham@hopper:~$ 
> 
> Hmmm.  Segfaults are really difficult to track down - I can't 
> reproduce this problem on my Linux machine.  Here's what I get:
>

[ ... snip ... ]
 
> > Prelude> :load Char
> > [Std   module...  /usr/local/include/nhc98/Prelude.hi]
> > [Std   module...  /usr/local/include/nhc98/Char.hi]
> > Char> ord 'a'
> > 97           
> > Char>
> 
> But of course this doesn't help you.  You said that you get the
> segfault under both Cygwin and Linux right?  That suggests a fault
> in the code, rather than an environment issue.  Can you tell me what
> compiler you used to build nhc98 etc with, under both Cygwin 
> and Linux?
> 

My compilation procedeed like so (on both architectures):

1.  Both builds were done using the "gcc" target, since I only had ghc5 and
the configuration utility (at that time) did not know how to recognize it.

2.  Did a make all/make install.

It would be interesting to see what happens if I recompile using nhc98 to
bootstrap itself.  Perhaps the generated C code in the distribution has some
subtle problem with respect to byte alignment or some similar minutia that
causes the compilation to fail when compiled for HInterpreter.

I'll try that and report back.

-Brent