
When building hat, I get the error messages below. This seems to be due to #elif __GLASGOW_HASKELL__ >= 502 import Debug.Trace (trace) #else import IOExts (trace) #endif in compiler98/SysDeps.hs. Im using ghc 6.2 and I suppose the comparison with 502 fails. How to correct this properly? (The problem will reappear when ghc 6.4 will be released.) 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! -------------------------------------- myrtle$ gmake HC=ghc all Warning: package(s) lang not available in /proj/haskell/include/nhc98/packages Fail: Can't find module IOExts in user directories . src/hattrans src/compiler98 Or in installed libraries/packages at /proj/haskell/include/nhc98 /proj/haskell/include/nhc98/packages/base Asked for by: src/compiler98/SysDeps.hs Fix using the -I, -P, or -package flags. Stop - hmake dependency error. Warning: package(s) lang not available in /proj/haskell/include/nhc98/packages Fail: Can't find module IOExts in user directories . src/hattrans src/compiler98 Or in installed libraries/packages at /proj/haskell/include/nhc98 /proj/haskell/include/nhc98/packages/base Asked for by: src/compiler98/SysDeps.hs Fix using the -I, -P, or -package flags. Stop - hmake dependency error.

Olaf Chitil
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

Ok, I understand the refererence to nhc98 libraries in the error message. Nonetheless, my hmake is definitely from cvs. It seems that the Makefile calls hmake (which processes SysDeps) at least 3 times! The first time indeed __NHC__ is true and hence that branch taken. (I inserted a bogus import in that case and got one error message about it). However, Makefile calls hmake also twice(!) with __NHC__ undefined, so that the last default branch is taken, causing the two error messages. Note that all these calls of hmake happen before the directory hattrans is entered. Any ideas? myrtle$ gmake hat Warning: package(s) lang not available in /proj/haskell/include/nhc98/packages Fail: Can't find module IOExts in user directories . src/hattrans src/compiler98 Or in installed libraries/packages at /proj/haskell/include/nhc98 /proj/haskell/include/nhc98/packages/base Asked for by: src/compiler98/SysDeps.hs Fix using the -I, -P, or -package flags. Stop - hmake dependency error. Warning: package(s) lang not available in /proj/haskell/include/nhc98/packages Fail: Can't find module IOExts in user directories . src/hattrans src/compiler98 Or in installed libraries/packages at /proj/haskell/include/nhc98 /proj/haskell/include/nhc98/packages/base Asked for by: src/compiler98/SysDeps.hs Fix using the -I, -P, or -package flags. Stop - hmake dependency error. cd src/hattrans; gmake HC=ghc all gmake[1]: Entering directory `/nfs/myrtle/d23/part1/home/cur/oc/hat/src/hattrans' .... continues build
participants (2)
-
Malcolm Wallace
-
Olaf Chitil