[nhc-bugs] Building nhc98 on Windows 2000

C.Reinke C.Reinke@ukc.ac.uk
Thu, 04 Apr 2002 16:30:51 +0100


> I got curious, so I went to have a look at the nhc-bugs archives
> -- seems like what's at the root of it all is that the following
> ghc invocation:
> 
> ghc   -package lang -package posix -c \
>  -o /tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/QSort.o \
>  QSort.hs
> 
> Assembler messages:
> FATAL: Can't create \
> \tmp\nhc98-1.12\targets\ix86-CYGWIN_NT-5.0\obj\hmake\QSort.o
> 
> This is a known 'usability bug' with GHC - it doesn't check that
> the directory portion of the '-o' file exists, but just merrily
> hands it off to the assembler, which barfs with the above
> unfriendly message.
> 
> So, for whatever reason, that /tmp/... directory doesn't exist.

Question: which assembler is being called there?

In a standalone GHC, that can't be the cygwin assembler, so, unless
the call is routed via the cygwin shell, the assembler is unlikely
to know about cygwin's file system.

When I encountered that problem, a simple fix was to add the
necessary prefix to turn the cygwin path into a native path:

  c:/cygwin/tmp/nhc...

neither GHC nor cygwin have trouble with that path, and the
assembler was happy as well.

Claus