
I'm having dificulties installing nhc-1.08 under IRIX 6.5 using gcc-3.0.1 to bootstrap the compiler. I followed the standard install directions and ran: $ ./configure --prefix=/local $ make The first problem I encountered was an incompatability between the prototype of the "system" call on my machine and the one used by nhc.
From /usr/include/stdlib.h:
extern int system(const char *); In the file: nhc98-1.08/src/prelude/System/SystemFun.hc I had to change the following lines (starting at 189) from: C_HEADER(FR_System_46primSystem_35) { NodePtr nodeptr; HsInt result; char* arg1; nodeptr = C_GETARG1(1); IND_REMOVE(nodeptr); arg1 = (char*)getPackedString(nodeptr); result = system(arg1); nodeptr = mkInt(result); INIT_PROFINFO(nodeptr,&pf_system); C_RETURN(nodeptr); } To the following: C_HEADER(FR_System_46primSystem_35) { NodePtr nodeptr; HsInt result; const char* arg1; nodeptr = C_GETARG1(1); IND_REMOVE(nodeptr); arg1 = (const char*)getPackedString(nodeptr); result = system(arg1); nodeptr = mkInt(result); INIT_PROFINFO(nodeptr,&pf_system); C_RETURN(nodeptr); } That seemed like a pretty innocuous change... I then resumed compiling and managed to buid the "nhc98comp" executable with no problems. But the first time the build process tried to use this executable it aborted with the following message: make[1]: Entering directory `/local/archive/internet/lang/haskell/nhc98/nhc98-1.08/src/prelude/mips-IRIX6' rm -f *.hi rm -f DErrNo.hc rm -f /local/archive/internet/lang/haskell/nhc98/nhc98-1.08/targets/mips-IRIX6/obj/prelude/DErrNo/*.o *.o rm -f rm -f /local/archive/internet/lang/haskell/nhc98/nhc98-1.08/script/nhc98 -cpp -c +CTS -lib -redefine -CTS +RTS -H32M -RTS -o /local/archive/internet/lang/haskell/nhc98/nhc98-1.08/targets/mips-IRIX6/obj/prelude/DErrNo/DErrNo.o DErrNo.hs What, run() returned! What, run() returned! What, run() returned! make[1]: *** [/local/archive/internet/lang/haskell/nhc98/nhc98-1.08/targets/mips-IRIX6/obj/prelude/DErrNo/DErrNo.o] Error 1 make[1]: Leaving directory `/local/archive/internet/lang/haskell/nhc98/nhc98-1.08/src/prelude/mips-IRIX6' make: *** [targets/mips-IRIX6/compiler-gcc] Error 2 Any ideas what is causing this or how to get around it would be most appreciated. I can send the full output of configure/make if it would be helpful... Thanks! ------------------------------------------------------------------------------- Jim Callahan jim@polaris.net, jimcal@xtra.co.nz -------------------------------------------------------------------------------