[nhc-bugs] Install Problems: IRIX6.5/gcc3.0.1

Jim Callahan jim@polaris.net, jim@xtra.co.nz
Thu, 04 Oct 2001 17:10:50 -0700


This is a multi-part message in MIME format.
--------------DD0994C064F4004128192C21
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


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
-------------------------------------------------------------------------------
--------------DD0994C064F4004128192C21
Content-Type: text/x-vcard; charset=us-ascii;
 name="jim.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jim Callahan
Content-Disposition: attachment;
 filename="jim.vcf"

begin:vcard 
n:Callahan;Jim
tel;work:64 4 384 1130
x-mozilla-html:FALSE
org:Core  
version:2.1
email;internet:jim@polaris.net
title:Mentor
adr;quoted-printable:;;61 Maida Vale Road=0D=0ARoseneath=0D=0A;Wellington;;;New Zealand
x-mozilla-cpt:;-26304
fn:Jim Callahan
end:vcard

--------------DD0994C064F4004128192C21--