trouble compiling under Solaris x86

Hi, I'm having difficulty compiling nhc-1.12 for Solaris 2.8 x86. The trouble seems to be with DErrno.hs: make[1]: Entering directory `/home/jon/tgz/nhc/nhc98-1.12/src/prelude/ix86-solaris2' rm -f *.hi rm -f DErrNo.hc rm -f /home/jon/tgz/nhc/nhc98-1.12/targets/ix86-solaris2/obj/prelude/DErrNo/*.o *.o rm -f rm -f /home/jon/tgz/nhc/nhc98-1.12/script/nhc98 -cpp -c +CTS -lib -redefine -CTS +RTS -H32M -RTS -o /home/jon/tgz/nhc/nhc98-1.12/targets/ix86-solaris2/obj/prelude/DErrNo/DErrNo.o DErrNo.hs Killed make[1]: *** [/home/jon/tgz/nhc/nhc98-1.12/targets/ix86-solaris2/obj/prelude/DErrNo/DErrNo.o] Error 1 make[1]: Leaving directory `/home/jon/tgz/nhc/nhc98-1.12/src/prelude/ix86-solaris2' make: *** [targets/ix86-solaris2/compiler-gcc] Error 2 I've tried replacing the generated DErrno.hs with the default version using only the GNU utils (ie, removing /usr/ccs/bin from my PATH) using gcc without any optimization applying both patches to 1.12 (the hmake and ranlib patches) to no avail. I'm attaching the generated DErrno.hs and the output of LD_OPTIONS="-L/opt/sfw/lib -R/opt/sfw/lib" ./configure --buildwith=gcc --buildopts="-I/opt/sfw/include" --prefix=/usr/local/$(basename $(pwd)) | tee install_notes I can of course send you any other files, output, etc you might need. By the way, on Solaris /usr/ccs/bin/make and /usr/xpg4/bin/make complain about unexpected end of lines in Makefile.inc (and other Makefiles). Thanks, Jon Bernard

jonbernard@iname.com writes:
I'm having difficulty compiling nhc-1.12 for Solaris 2.8 x86. The trouble seems to be with DErrno.hs:
In fact, the error building DErrno.hs is just a symptom of a different problem. You have bootstrapped nhc98 from C files using gcc, and the first time the new compiler is actually used is on the DErrno module. Thus, the error indicates a more general fault in the compiler itself, not a specific one with this source file. At a wild guess, is your version of gcc >= 3.0?
By the way, on Solaris /usr/ccs/bin/make and /usr/xpg4/bin/make complain about unexpected end of lines in Makefile.inc (and other Makefiles).
The nhc98 build requires GNU make, which might be installed as gmake on your system. Regards, Malcolm

I'm having difficulty compiling nhc-1.12 for Solaris 2.8 x86. The trouble seems to be with DErrno.hs:
In fact, the error building DErrno.hs is just a symptom of a different problem. You have bootstrapped nhc98 from C files using gcc, and the first time the new compiler is actually used is on the DErrno module. Thus, the error indicates a more general fault in the compiler itself, not a specific one with this source file.
At a wild guess, is your version of gcc >= 3.0?
Yes, that was the problem. Thanks.
By the way, on Solaris /usr/ccs/bin/make and /usr/xpg4/bin/make complain about unexpected end of lines in Makefile.inc (and other Makefiles).
The nhc98 build requires GNU make, which might be installed as gmake on your system.
And you say as much in the INSTALL file, which I should have looked at more closely. But there are other problems: 1. ./configure tells me that fullname isn't found (though judging from the script this would seem not to matter). 2. I get the same error messages as Feliks Kluzniak, who was trying to build nhc on a Sparc Solaris system, namely Fail: Can't find module FFI in . Or in standard libraries at Asked for by: HatTrace.gc [Check settings of -I or -P flags?] Stop - hmake dependency error. gmake[1]: *** [/tmp/nhc98-1.12/lib/ix86-solaris2/hat-observe] Error 255 gmake[1]: Leaving directory `/tmp/nhc98-1.12/src/hat/tools' gmake: *** [lib/ix86-solaris2/hat-stack] Error 2 As you suspected might be the case with Feliks, lib/ix86-solaris2/hmakerc does not exist. Poking around in configure, I see that script/hmake-config does something with (creates?) hmakerc. hmake-config ends with exec $HMAKEDIR/$MACHINE/MkConfig "$@" but there is no MkConfig in lib/ix86-solaris2. Could this be the problem? I tried building hmake from sources, in the hope of getting a MkConfig binary, but was unsuccessful. Thanks, Jon

Regarding nhc-1.12 for Solaris 2.8 on x86, Jon Bernard writes:
1. ./configure tells me that fullname isn't found (though judging from the script this would seem not to matter).
Yes, this is a harmless error.
lib/ix86-solaris2/hmakerc does not exist.
... there is no MkConfig in lib/ix86-solaris2. Could this be the problem?
That is most certainly a problem. I have looked at the Makefiles and I cannot see any reason why MkConfig could fail to be built. What build-target did you give to `make'? e.g. make make basic make all make tracer ? Regards, Malcolm
participants (3)
-
Jon Bernard
-
jonbernard@iname.com
-
Malcolm Wallace