
"William S."
OK, got past the first problem. Have this now:
gcc -S -DHIGH_BYTE_FIRST -O3 -I/usr/people/wstan/nhc98-1.16/include -DVERSION="\"1.16\"" -o - newtables.c | sed '/.align 32/s/32/4/' |\ gcc -c -x assembler -DHIGH_BYTE_FIRST -O3 -I/usr/people/wstan/nhc98-1.16/include -DVERSION="\"1.16\"" -o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Kernel /newtables.o - as ERROR: -E or specified language required when input is from standard input
Strange. The second call to gcc does indeed get its input from stdin, but it also explicitly specifies the language with '-x assembler'. Because of the mention of the -E option (indicating the C pre-processor), it is possible that on mips-IRIX6 you actually require the language to be '-x assembler-with-cpp'. You can change this option in src/runtime/Kernel/Makefile, in the rule for ${SOBJS}.
Easy fix or should I try the Cygwin branch? (not sure how to select for that).
No, Cygwin's quirks are not relevant here. Regards, Malcolm

Malcolm, Made the change here: 'src/runtime/Kernel/Makefile' as follows. ${SOBJS}: ${OBJDIR}/%.o: %.c ${CC} -S ${CFLAGS} -o - $< | sed '/.align 32/s/32/4/' |\ ${CC} -c -x assembler-with-cpp ${CFLAGS} -o $@ - Now I have: wstan@octane 4% gmake cd src/runtime; gmake install nhc98heap gmake[1]: Entering directory `/usr/people/wstan/nhc98-1.16/src/runtime' cd Kernel; gmake all gmake[2]: Entering directory `/usr/people/wstan/nhc98-1.16/src/runtime/Kernel' Link bytecode.h already exists. Link cinterface.h already exists. Link mutlib.h already exists. Link newmacros.h already exists. Link node.h already exists. Link runtime.h already exists. Link stableptr.h already exists. Link newbytecode.h already exists. Link bytecode_o.h already exists. gmake[2]: Leaving directory `/usr/people/wstan/nhc98-1.16/src/runtime/Kernel' cd Integer; gmake all gmake[2]: Entering directory `/usr/people/wstan/nhc98-1.16/src/runtime/Integer' Link flt.h already exists. gcc -c -I../Kernel -I/usr/people/wstan/nhc98-1.16/include -O3 -DHIGH_BYTE_FIRST -o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Integer/mpz_div. o mpz_div.c In file included from longlong.h:75, from mpz_div.c:25: asmlong.h:3:12: missing terminating " character asmlong.h:7:40: missing terminating " character ...many lines of the same sort.... mpz_div.c:28: warning: assignment makes integer from pointer without a cast gmake[2]: *** [/usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Integ er/mpz_div.o] Error 1 gmake[2]: Leaving directory `/usr/people/wstan/nhc98-1.16/src/runtime/Integer' gmake[1]: *** [afile] Error 2 gmake[1]: Leaving directory `/usr/people/wstan/nhc98-1.16/src/runtime' gmake: *** [targets/mips-IRIX6/runtime] Error 2 On Fri, Dec 12, 2003 at 01:31:01PM +0000, Malcolm Wallace wrote:
Strange. The second call to gcc does indeed get its input from stdin, but it also explicitly specifies the language with '-x assembler'. Because of the mention of the -E option (indicating the C pre-processor), it is possible that on mips-IRIX6 you actually require the language to be '-x assembler-with-cpp'.
You can change this option in src/runtime/Kernel/Makefile, in the rule for ${SOBJS}.
-- Bill Amsterdam, NL

"William S."
asmlong.h:3:12: missing terminating " character asmlong.h:7:40: missing terminating " character ...many lines of the same sort....
OK, you have a newer version of gcc, which changes the interpretation of literal string constants. Replace the file src/runtime/Integer/asmlong.h with the copy attached to this message, and continue the build. Regards, Malcolm

Malcolm, The added file took me along the process a bit more. But it stopped here: gcc -c -I../Kernel -I/usr/people/wstan/nhc98-1.16/include -O3 -DHIGH_BYTE_FIRST -o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Integer/mpn_mul.o mpn_mul.c gcc -c -I../Kernel -I/usr/people/wstan/nhc98-1.16/include -O3 -DHIGH_BYTE_FIRST -o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Integer/mpn_rshift.o mpn_rshift.c gcc -c -I../Kernel -I/usr/people/wstan/nhc98-1.16/include -O3 -DHIGH_BYTE_FIRST -o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Integer/fltcode.o fltcode.c gcc -c -I../Kernel -I/usr/people/wstan/nhc98-1.16/include -O3 -DHIGH_BYTE_FIRST -o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Integer/dblcode.o dblcode.c gcc -c -I../Kernel -I/usr/people/wstan/nhc98-1.16/include -O3 -DHIGH_BYTE_FIRST -o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Integer/alloca.o alloca.c alloca.c: In function `alloca': alloca.c:7: error: too many arguments to function `abort' gmake[2]: *** [/usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Integer/alloca.o] Error 1 gmake[2]: Leaving directory `/usr/people/wstan/nhc98-1.16/src/runtime/Integer' gmake[1]: *** [afile] Error 2 gmake[1]: Leaving directory `/usr/people/wstan/nhc98-1.16/src/runtime' gmake: *** [targets/mips-IRIX6/runtime] Error 2 On Fri, Dec 12, 2003 at 03:57:44PM +0000, Malcolm Wallace wrote:
OK, you have a newer version of gcc, which changes the interpretation of literal string constants. Replace the file src/runtime/Integer/asmlong.h with the copy attached to this message, and continue the build.
-- Bill Amsterdam, NL

"William S."
gcc -c -I../Kernel -I/usr/people/wstan/nhc98-1.16/include -O3 -DHIGH_BYTE_FIRST -o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Integer/alloca.o alloca.c alloca.c: In function `alloca': alloca.c:7: error: too many arguments to function `abort'
Apparently the call to abort(-1) should be simply abort() with no arguments. Regards, Malcolm

Malcolm, Appreciate your patience. Made the correction; Did a gmake clean; configure; and gmake. Got as far as here: gmake[2]: Leaving directory `/usr/people/wstan/nhc98-1.16/src/runtime/Mk' cp /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Kernel/Runtime.a /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6 ar r /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/Runtime.a /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Integer/*.o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Builtin/*.o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Mk/*.o ranlib /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/Runtime.a gmake[1]: ranlib: Command not found gmake[1]: *** [install] Error 127 gmake[1]: Leaving directory `/usr/people/wstan/nhc98-1.16/src/runtime' gmake: *** [targets/mips-IRIX6/runtime] Error 2 On Sat, Dec 13, 2003 at 01:47:49PM +0000, Malcolm Wallace wrote:
"William S."
writes: gcc -c -I../Kernel -I/usr/people/wstan/nhc98-1.16/include -O3 -DHIGH_BYTE_FIRST -o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/runtime/Integer/alloca.o alloca.c alloca.c: In function `alloca': alloca.c:7: error: too many arguments to function `abort'
Apparently the call to abort(-1) should be simply abort() with no arguments.
-- Bill Amsterdam, NL

Got as far as here:
ranlib /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/Runtime.a gmake[1]: ranlib: Command not found
If ranlib doesn't exist on your system, then it is safe to omit this step. Simply remove or comment out the 'ranlib' line in the files src/runtime/Makefile, and src/prelude/Makefile. Regards, Malcolm

Malcolm, Here is the latest: ld32: WARNING 84 : /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/Runtime.a is not used for resolving any symbol. ld32: WARNING 84 : /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/Prelude.a is not used for resolving any symbol. ld32: WARNING 84 : /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/Runtime.a is not used for resolving any symbol. strip /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/nhc98comp gmake[1]: Leaving directory `/usr/people/wstan/nhc98-1.16/src/compiler98' cd src/prelude/mips-IRIX6/NHC; gmake clean all # Patch machine-specific parts. gmake[1]: Entering directory `/usr/people/wstan/nhc98-1.16/src/prelude/mips-IRIX6/NHC' rm -f *.hi rm -f DErrNo.hc rm -f /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/prelude/DErrNo/*.o *.o rm -f rm -f /usr/people/wstan/nhc98-1.16/script/nhc98 -cpp -c +CTS -lib -redefine -CTS +RTS -H32M -RTS -o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/prelude/DErrNo/DErrNo.o DErrNo.hs What, run() returned! What, run() returned! What, run() returned! gmake[1]: *** [/usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/prelude/DErrNo/DErrNo.o] Error 1 gmake[1]: Leaving directory `/usr/people/wstan/nhc98-1.16/src/prelude/mips-IRIX6/NHC' gmake: *** [targets/mips-IRIX6/compiler-gcc] Error 2 On Sat, Dec 13, 2003 at 05:20:55PM +0000, Malcolm Wallace wrote:
Got as far as here:
ranlib /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/Runtime.a gmake[1]: ranlib: Command not found
If ranlib doesn't exist on your system, then it is safe to omit this step. Simply remove or comment out the 'ranlib' line in the files src/runtime/Makefile, and src/prelude/Makefile.
-- Bill Amsterdam, NL

"William S."
Here is the latest:
ld32: WARNING 84 : /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/Runtime.a is not used for resolving any symbol.
These warnings are harmless, and can safely be ignored.
/usr/people/wstan/nhc98-1.16/script/nhc98 -cpp -c +CTS -lib -redefine -CTS +RTS -H32M -RTS -o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/prelude/DErrNo/DErrNo.o DErrNo.hs What, run() returned! What, run() returned! What, run() returned!
This is the first test-use of the freshly-built nhc98 compiler, and clearly indicates that it does not work. I suspect it is a similar problem to one already reported several times, whereby the build fails at the same point with a segmentation fault, rather than an error message. We do not yet know the exact cause, or a fix, although we think it is probably something to do with changes in the gcc-3.x series compiler that break various assumptions made by the nhc98 code generator. Sorry that the build did not work out for you. I think probably the only currently-maintained Haskell system that you will be able to install on your machine is Hugs. (The last version of ghc that was distributed for mips-sgi-irix6 was 2.10, which is now 6 years old.) Regards, Malcolm

OK. No problem. I understand the circumstance. It was a nice effort and I appreciate you guiding me through it. On Mon, Dec 15, 2003 at 11:44:37AM +0000, Malcolm Wallace wrote:
Sorry that the build did not work out for you. I think probably the only currently-maintained Haskell system that you will be able to install on your machine is Hugs. (The last version of ghc that was distributed for mips-sgi-irix6 was 2.10, which is now 6 years old.)
-- Bill Amsterdam, NL

I wrote earlier:
We do not yet know the exact cause, or a fix, although we think it is probably something to do with changes in the gcc-3.x series compiler that break various assumptions made by the nhc98 code generator.
In fact, by chance another nhc98-user reported a similar failure
yesterday, and was able to give me access to the machine on which the
failure occurred. This enabled me to discover the cause and find
a fix, which in his case was due to a change in the assembler code
format between gcc-3.2 and gcc-3.3.
If you are also using gcc-3.3, then it is possible that the same fix
might cure your build error as well.
To try it out, please delete your build tree, and unpack a fresh copy.
Then apply the patch attached to this message, which should contain
all the fixes we already discussed for the mips-irix6 build, together
with the new fix. If you are not familiar with the patch utility,
it should be as simple as this:
cd nhc98-1.16
patch -p1

Malcolm, wstan@octane % gcc -dumpversion 3.3 I got a new source and patched it according to your directions. Then, ./configure gmake basic ld32: WARNING 84 : /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/Runtime.a is not used for resolving any symbol. ld32: WARNING 84 : /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/Prelude.a is not used for resolving any symbol. ld32: WARNING 84 : /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/Runtime.a is not used for resolving any symbol. strip /usr/people/wstan/nhc98-1.16/lib/mips-IRIX6/nhc98comp gmake[1]: Leaving directory `/usr/people/wstan/nhc98-1.16/src/compiler98' cd src/prelude/mips-IRIX6/NHC; gmake clean all # Patch machine-specific parts. gmake[1]: Entering directory `/usr/people/wstan/nhc98-1.16/src/prelude/mips-IRIX6/NHC' rm -f *.hi rm -f DErrNo.hc rm -f /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/prelude/DErrNo/*.o *.o rm -f rm -f /usr/people/wstan/nhc98-1.16/script/nhc98 -cpp -c +CTS -lib -redefine -CTS +RTS -H32M -RTS -o /usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/prelude/DErrNo/DErrNo.o DErrNo.hs What, run() returned! What, run() returned! What, run() returned! gmake[1]: *** [/usr/people/wstan/nhc98-1.16/targets/mips-IRIX6/obj/prelude/DErrNo/DErrNo.o] Error 1 gmake[1]: Leaving directory `/usr/people/wstan/nhc98-1.16/src/prelude/mips-IRIX6/NHC' gmake: *** [targets/mips-IRIX6/compiler-gcc] Error 2 On Tue, Dec 16, 2003 at 04:40:21PM +0000, Malcolm Wallace wrote:
If you are also using gcc-3.3, then it is possible that the same fix might cure your build error as well.
To try it out, please delete your build tree, and unpack a fresh copy. Then apply the patch attached to this message, which should contain all the fixes we already discussed for the mips-irix6 build, together with the new fix. If you are not familiar with the patch utility, it should be as simple as this: cd nhc98-1.16 patch -p1
-- Bill Amsterdam, NL

"William S."
I got a new source and patched it according to your directions.
Error: What, run() returned!
OK, the problem still remains. Is it possible that your mips machine is 64-bit? nhc98 will only compile properly for 32-bit machines. Regards, Malcolm

That could be the reason then. I was looking here to see if there would be a way around that, but nothing looks promising: http://freeware.sgi.com/howto.html % uname -mnrs IRIX64 octane 6.5 IP30 On Tue, Dec 16, 2003 at 08:11:02PM +0000, Malcolm Wallace wrote:
OK, the problem still remains. Is it possible that your mips machine is 64-bit? nhc98 will only compile properly for 32-bit machines.
-- Bill Amsterdam, NL

"William S."
[64-bit mips] I was looking here to see if there would be a way around that, but nothing looks promising:
Thanks for the pointer. One final thing to try, suggested by that page. Use the SGI C compiler in 32-bit compatibility mode. After "./configure", but before "gmake basic", edit the configuration file at lib/mips-irix6/config changing the line CC=gcc to CC="cc -32" Regards, Malcolm

Malcolm, Got new source and applied the patch. Then ./configure and edited the file. # gmake basic Makefile:283: warning: overriding commands for target `-32"' Makefile:279: warning: ignoring old commands for target `-32"' Makefile:289: warning: overriding commands for target `-32"' Makefile:283: warning: ignoring old commands for target `-32"' Makefile:295: warning: overriding commands for target `-32"' Makefile:289: warning: ignoring old commands for target `-32"' Makefile:301: warning: overriding commands for target `-32"' Makefile:295: warning: ignoring old commands for target `-32"' Makefile:304: warning: overriding commands for target `-32"' Makefile:301: warning: ignoring old commands for target `-32"' Makefile:307: warning: overriding commands for target `-32"' Makefile:304: warning: ignoring old commands for target `-32"' Makefile:311: warning: overriding commands for target `-32"' Makefile:307: warning: ignoring old commands for target `-32"' gmake: *** No rule to make target `basic-gcc', needed by `basic'. Stop. On Wed, Dec 17, 2003 at 11:11:12AM +0000, Malcolm Wallace wrote:
"William S."
writes: [64-bit mips] I was looking here to see if there would be a way around that, but nothing looks promising:
Thanks for the pointer. One final thing to try, suggested by that page. Use the SGI C compiler in 32-bit compatibility mode. After "./configure", but before "gmake basic", edit the configuration file at lib/mips-irix6/config changing the line CC=gcc to CC="cc -32"
-- Bill Amsterdam, NL
participants (2)
-
Malcolm Wallace
-
William S.