
Hello, in trying to make hat work (on MacOSX 10.2.1) I consistently end up with: strip /Volumes/Apps/Install/nhc/lib/powerpc-Darwin-6.1/hat-trans touch targets/powerpc-Darwin-6.1/hat-trans-nhc cd src/hat/lib; make HC=nhc98 all install-nhc98 mkdir -p /Volumes/Apps/Install/nhc/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98 || /usr/bin/true mkdir -p /Volumes/Apps/Install/nhc/lib/powerpc-Darwin-6.1/hatlib/nhc98 || /usr/bin/true gcc -O -D__NHC__ -DVERSION="\"2.01\"" -I/Volumes/Apps/Install/nhc/include -c -o /Volumes/Apps/Install/nhc/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/hat.o hat.c nhc98 +RTS -K12M -H64M -RTS -cpp -c -o /Volumes/Apps/Install/nhc/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/TPreludeBuiltinTypes.o TPreludeBuiltinTypes.hs I/O error (user-defined), call to function `userError': Can't open any of: ./Hat.hi /usr/local/include/nhc98/Hat.hi when trying to read Hat. make[1]: *** [/Volumes/Apps/Install/nhc/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/TPreludeBuiltinTypes.o] Error 1 make: *** [targets/powerpc-Darwin-6.1/hat-lib-nhc] Error 2 [orff:Apps/Install/nhc] atze% find . -name Hat.hi -print [orff:Apps/Install/nhc] atze% That is, I downloaded hat-2.00 and cvs checked out nhc, configured for compiling with nhc98 (which did install ok), then 'make hat'. can you help me out here? thanks in advance, -- - Atze - Atze Dijkstra, Institute of Information & Computing Sciences, /|\ Utrecht University, PO Box 80089, 3508 TB Utrecht, Netherlands / | \ Tel.: +31-30-2534093/1454 | WWW : http://www.cs.uu.nl/~atze /--| \ Fax : +31-30-2513971 | Email: atze@cs.uu.nl / |___\

Atze Dijkstra
gcc -O -D__NHC__ -DVERSION="\"2.01\"" -I/Volumes/Apps/Install/nhc/include -c -o /Volumes/Apps/Install/nhc/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/hat.o hat.c
Hmm, looks like you are building Hat 2.01 (from CVS), not 2.00.
nhc98 +RTS -K12M -H64M -RTS -cpp -c -o /Volumes/Apps/Install/nhc/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/TPreludeBuiltinTypes.o TPreludeBuiltinTypes.hs I/O error (user-defined), call to function `userError': Can't open any of: ./Hat.hi /usr/local/include/nhc98/Hat.hi when trying to read Hat.
Is it possible that there is an old Hat.o file hanging around, but you have removed the corresponding Hat.hi file (with `make clean' or similar?) Look for /Volumes/Apps/Install/nhc/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/Hat.o and delete it if you find it.
That is, I downloaded hat-2.00 and cvs checked out nhc, configured for compiling with nhc98 (which did install ok), then 'make hat'.
You are making Hat 2.01 inside the nhc98 tree, rather than Hat 2.00 from the separately downloaded stable version. My guess is that, in the CVS tree you did ./configure make # build nhc98 make install # install nhc98 make hat The final step probably failed with ..../script/hat-trans: Command not found and you guessed you needed something like ./hat-configure make clean make hat If you really want the CVS version of Hat, then I suggest you start again with make realclean ./configure # configure nhc98 (but we don't need to re-build it) ./hat-configure # configure Hat make hat ./hat-configure --install # install Hat - do not use 'make install'. Regards, Malcolm

At 11:41 +0100 30/09/2002, Malcolm Wallace wrote:
Hmm, looks like you are building Hat 2.01 (from CVS), not 2.00.
Actually I started out with the 2.00 release, which gave the same error as the cvs extracted version. I tried the cvs version only because I could not build from the 'official' 2.00 source release.
/Volumes/Apps/Install/nhc/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/Hat.o and delete it if you find it.
In 2.00 Hat.o was not present, and in the cvs 2.01 neither.
If you really want the CVS version of Hat, then I suggest you start again with
make realclean ./configure # configure nhc98 (but we don't need to re-build it) ./hat-configure # configure Hat make hat ./hat-configure --install # install Hat - do not use 'make install'.
I tried your above suggestion, but it fails at the same spot. It looks as if Hat.hs is not compiled (perhaps an absent make dependency?), Hat.hs is present in the src tree. cheers, -- - Atze - Atze Dijkstra, Institute of Information & Computing Sciences, /|\ Utrecht University, PO Box 80089, 3508 TB Utrecht, Netherlands / | \ Tel.: +31-30-2534093/1454 | WWW : http://www.cs.uu.nl/~atze /--| \ Fax : +31-30-2513971 | Email: atze@cs.uu.nl / |___\

Atze Dijkstra
I tried your above suggestion, but it fails at the same spot. It looks as if Hat.hs is not compiled (perhaps an absent make dependency?), Hat.hs is present in the src tree.
Well, the relevant Makefile (in src/hat/lib) contains the following dependency line: $(OBJDIR)/TPreludeBuiltinTypes.o: $(OBJDIR)/Hat.o and it is clear that, on Jaguar, the make program is trying to build TPreludeBuiltinTypes.o before Hat.o. This suggests a bug in your version of make. Try using the make -d option for lots of debugging information about what files and timestamps are being compared. You might also try the -r option to eliminate built-in default rules. If you have difficulty deciding whether the output of make -d is correct, then send it to me and I'll have a look. Regards, Malcolm

At 14:11 +0100 30/09/2002, Malcolm Wallace wrote:
Atze Dijkstra
writes: I tried your above suggestion, but it fails at the same spot. It looks as if Hat.hs is not compiled (perhaps an absent make dependency?), Hat.hs is present in the src tree.
Well, the relevant Makefile (in src/hat/lib) contains the following dependency line:
$(OBJDIR)/TPreludeBuiltinTypes.o: $(OBJDIR)/Hat.o
and it is clear that, on Jaguar, the make program is trying to build TPreludeBuiltinTypes.o before Hat.o. This suggests a bug in your version of make.
Hmn, I found an already made 'hat.o'. The MacOSX HFS+ file system is (sometimes) case insignificant. Make (which is gnumake) somehow is insensitive to case is my guess (which is not contradicted, but confirmed by the output of make -d). I will try finding some info on the apple developer site about this, or submit a bugreport. This problem pops up sometimes.
Try using the make -d option for lots of debugging information about what files and timestamps are being compared. You might also try the -r option to eliminate built-in default rules.
The output tells it is pruning Hat.o (I guess as a prerequite): Finished prerequisites of target file `TPreludeBuiltinTypes.hs'. No need to remake target `TPreludeBuiltinTypes.hs'. Pruning file `/Volumes/Apps/Install/hat-2.00/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/Hat.o'. Finished prerequisites of target file `/Volumes/Apps/Install/hat-2.00/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/TPreludeBuiltinTypes.o'. Must remake target `/Volumes/Apps/Install/hat-2.00/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/TPreludeBuiltinTypes.o'. nhc98 +RTS -K12M -H64M -RTS -cpp -c -o /Volumes/Apps/Install/hat-2.00/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/TPreludeBuiltinTypes.o TPreludeBuiltinTypes.hs Got a SIGCHLD; 1 unreaped children. Make concludes Hat.o exists on the basis of hat.o's existence. I did 'fix' it by manually compiling Hat.hs. now the build stops with an internal error: /Volumes/Apps/Install/hat-2.00/script/hat-trans -trusted -prelude PreludeBasic.hs Wrote TPreludeBasic.hs nhc98 +RTS -K12M -H64M -RTS -cpp -c -o /Volumes/Apps/Install/hat-2.00/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/TPreludeBasic.o TPreludeBasic.hs Fatal internal error: StringTable data allocated too high in address space! gcc: /tmp/TPreludeBasic.21196.s: No such file or directory gcc: no input files rm: /tmp/TPreludeBasic.21196.s: No such file or directory make[1]: *** [/Volumes/Apps/Install/hat-2.00/targets/powerpc-Darwin-6.1/obj/hatlib/nhc98/TPreludeBasic.o] Error 1 make: *** [targets/powerpc-Darwin-6.1/hat-lib-nhc] Error 2 [orff:Apps/Install/hat-2.00] atze% cheers, -- - Atze - Atze Dijkstra, Institute of Information & Computing Sciences, /|\ Utrecht University, PO Box 80089, 3508 TB Utrecht, Netherlands / | \ Tel.: +31-30-2534093/1454 | WWW : http://www.cs.uu.nl/~atze /--| \ Fax : +31-30-2513971 | Email: atze@cs.uu.nl / |___\

Atze Dijkstra
$(OBJDIR)/TPreludeBuiltinTypes.o: $(OBJDIR)/Hat.o
Hmn, I found an already made 'hat.o'. The MacOSX HFS+ file system is (sometimes) case insignificant.
Ugh. I believe that various Windows filesystems suffer from the same wart, i.e. that "ABC" and "abc" are treated as the same filename. So this isn't really a bug in GNUmake at all, but a design flaw in the HFS+ filesystem. As a permanent workaround, we could rename one or both of the hat.c/Hat.hs modules so that the object files do not conflict.
now the build stops with an internal error:
nhc98 +RTS -K12M -H64M -RTS -cpp -c -o /Volumes/Apps/Install/hat-2.00/targets/powerpc-Darwin-6.1/obj/hatlib/... .../nhc98/TPreludeBasic.o TPreludeBasic.hs Fatal internal error: StringTable data allocated too high in address space! gcc: /tmp/TPreludeBasic.21196.s: No such file or directory
OK, the "StringTable data" error is not one I recognise. As far as I can tell, it is not produced by nhc98, nor gcc, nor ghc's runtime system (if you compiled nhc98 with ghc). Maybe it is part of some Darwin-only library? Try strings $comp | grep StringTable on each of the possible compilers (the actual executable binary, not the driver script), e.g. /usr/bin/gcc-2.95.2, /usr/local/lib/nhc98/powerpc-Darwin-6.1/nhc98comp /usr/local/lib/ghc-5.04/ghc-5.04 to determine where the message is coming from. Maybe try looking in the shell (/bin/bash?) as well. Another line of attack is to re-run the nhc98 commandline that produced the error, by hand, adding a `-v' flag to see what the driver script is doing. Regards, Malcolm
participants (2)
-
Atze Dijkstra
-
Malcolm Wallace