[nhc-bugs] Building nhc98 on Windows 2000

C.Reinke C.Reinke@ukc.ac.uk
Wed, 03 Apr 2002 15:28:22 +0100


Hi again,

no real progress, but a few small points (--buildwith=gcc):

1) what exactly is "fullname" supposed to do in configure?

    if fullname 2>>/dev/null  # cope with symbolic links in directory paths
      then echo "$BUILDBINDIR/hmake-config $BUILDLIBDIR/$MACHINE/hmakerc \
           add `fullname ./script/nhc98`" \
           >>targets/$MACHINE/hmake3.config
    fi;

  And where is it supposed to come from? I can't find it, and neither 
  can configure:

    Updating targets/ix86-CYGWIN_NT-5.0/hmake3.config...
    fullname: not found
    Saving current configuration in
    targets/ix86-CYGWIN_NT-5.0/config.cache
    Done.

2) is this really the line you want to get (in MkConfig.hs:210)?

    $ grep 'NHC98INCDIR' /tmp/nhc98-1.12/script/nhc98 | cut -c27- | cut -d'}' 
-f1 | head -1
    find the hi files for the standard prelude,

  The path appears to be the second line in the output, just after
  the comment line;-)

3) after telling hmake-config not to bother with ghc, the case of
   the failing write to /tmp/.. appears to be in the second call
   to runAndReadStdout in MkConfig.hs (see 2), and all those calls 
   use the same tmpfile for output from "system" calls. If the
   "grep" is the second call, that means that one call has succeeded
   without permission problems.

   That looks a lot as if "noclobber" was set in the system shell 
   (causing output redirections to existing files to fail), only
   that if I just ask my toplevel bash, it claims that noclobber 
   is off. 

   Does system itself do anything fancy here (probably not)? If I 
   wouldn't be compiling from .hc-files, I could just play with 
   MkConfig.hs (using a different tmpfile for each call, or removing 
   the tmpfiles after use, or even using ">|" for redirection to 
   override noclobber). And I can't just run MkConfig.hs through
   hugs or ghc, because they would both defer system calls to the
   windows-shell, not to a version of sh, as the cygwin-based nhc
   will do, right? 

   Is there an easy way for me to generate MkConfig.hc from 
   MkConfig.hs, so that I can do some debugging?

Any other ideas? Anyone else in the game?-)
Claus