[Hat] Build problems

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Fri Jul 30 10:35:43 EDT 2004


Olaf Chitil <O.Chitil at kent.ac.uk> writes:

> When building hat, I get the error messages below.
> Despite these error messages the build continues and seems to succeed.
> Nonetheless I find the error message strange. Why does it search in the 
> nhc98 libraries? I'm building with ghc!

Ah.  I can see why this is confusing.  The top-level Makefile calls
'hmake' to determine which files from src/hattrans and src/compiler98
are depended upon (-M option):

    HATTRANS= src/hattrans/Makefile* \
		$(shell hmake -package lang -M HatTrans.hs \
		-Isrc/hattrans -Isrc/compiler98 \
		| cut -d':' -f1 | sed -e 's/\.o$$/.hs/' | sed -e '/^. /d' )

This call of hmake does not actually build anything.  Also, it does
not specify the compiler to use, since that is largely irrelevant
if you aren't building anything.  So hmake is selecting your default
compiler, nhc98, and hence the error messages.

I'm not sure why you get the same error twice in a single invocation
of the toplevel Makefile however.

Also, in the following code:

> #elif __GLASGOW_HASKELL__ >= 502
> import Debug.Trace (trace)
> #else
> import IOExts      (trace)
> #endif

you omitted to mention the preceding

  #if defined(__NHC__)
  import NonStdTrace

which should be valid, and should avoid the error.  Not sure why this
is failing for you.  Perhaps you are picking up an older version of
hmake in your PATH?

Regards,
    Malcolm


More information about the Hat mailing list