
Hi, these are last few lines of output when building nhc from sources. Note the Bus error - core dumped line. What is the problem? The system is FreeBSD 3.5. I'm not at the mailning list so please cc any response to V.Haisman@sh.cvut.cz. logout ~/tmp/nhc98-1.06>make cd src/compiler98; make fromC make[1]: Entering directory `/home/4/wilx/tmp/nhc98-1.06/src/compiler98' /home/4/wilx/tmp/nhc98-1.06/script//nhc98 -c -d /home/4/wilx/tmp/nhc98-1.06/targets/ix86-FreeBSD/obj/compiler98 *.hc cd /home/4/wilx/tmp/nhc98-1.06/targets/ix86-FreeBSD/obj/compiler98; /home/4/wilx/tmp/nhc98-1.06/script//nhc98 -H8M -o /home/4/wilx/tmp/nhc98-1.06/lib/ix86-FreeBSD/nhc98comp *.o strip /home/4/wilx/tmp/nhc98-1.06/lib/ix86-FreeBSD/nhc98comp make[1]: Leaving directory `/home/4/wilx/tmp/nhc98-1.06/src/compiler98' cd src/prelude/ix86-FreeBSD; make clean all # Patch machine-specific parts. make[1]: Entering directory `/home/4/wilx/tmp/nhc98-1.06/src/prelude/ix86-FreeBSD' rm -f *.hi rm -f DErrNo.hc rm -f /home/4/wilx/tmp/nhc98-1.06/targets/ix86-FreeBSD/obj/prelude/DErrNo/*.o *.o rm -f rm -f /home/4/wilx/tmp/nhc98-1.06/script/nhc98 -cpp -c +CTS -lib -redefine -CTS +RTS -H32M -RTS -o /home/4/wilx/tmp/nhc98-1.06/targets/ix86-FreeBSD/obj/prelude/DErrNo/DErrNo.o DErrNo.hs /home/4/wilx/tmp/nhc98-1.06/script/nhc98: /home/4/wilx/tmp/nhc98-1.06/lib/ix86-FreeBSD/hmake-PRAGMA: not found /home/4/wilx/tmp/nhc98-1.06/script/nhc98: /home/4/wilx/tmp/nhc98-1.06/lib/ix86-FreeBSD/hmake-PRAGMA: not found Bus error - core dumped make[1]: *** [/home/4/wilx/tmp/nhc98-1.06/targets/ix86-FreeBSD/obj/prelude/DErrNo/DErrNo.o] Error 1 make[1]: Leaving directory `/home/4/wilx/tmp/nhc98-1.06/src/prelude/ix86-FreeBSD' make: *** [targets/ix86-FreeBSD/compiler-gcc] Error 2 Vaclav Haisman V.Haisman@sh.cvut.cz

/home/4/wilx/tmp/nhc98-1.06/script/nhc98 -cpp -c +CTS -lib -redefine -CTS +RTS -H32M -RTS -o .../obj/prelude/DErrNo/DErrNo.o DErrNo.hs /home/4/wilx/tmp/nhc98-1.06/script/nhc98: /home/4/wilx/tmp/nhc98-1.06/lib/ix86-FreeBSD/hmake-PRAGMA: not found Bus error - core dumped
This looks rather like the kind of random crash we were experiencing for a while, due to a fault in the primitive implementation of putStr. Download the `putStr' patch from the website, or direct from ftp://ftp.cs.york.ac.uk/pub/haskell/nhc98/patch-1.06-putStr and apply it. Then just re-issue the command `make', and all should be well. (If not, then let us know.) Regards, Malcolm

I still fails at the same point ;( Vaclav Haisman /home/4/wilx/tmp/nhc98-1.06/script/nhc98 -cpp -c +CTS -lib -redefine -CTS +RTS -H32M -RTS -o /home/4/wilx/tmp/nhc98-1.06/targets/ix86-FreeBSD/obj/prelude/DErrNo/DErrNo.o DErrNo.hs /home/4/wilx/tmp/nhc98-1.06/script/nhc98: /home/4/wilx/tmp/nhc98-1.06/lib/ix86-FreeBSD/hmake-PRAGMA: not found /home/4/wilx/tmp/nhc98-1.06/script/nhc98: /home/4/wilx/tmp/nhc98-1.06/lib/ix86-FreeBSD/hmake-PRAGMA: not found Bus error - core dumped make[1]: *** [/home/4/wilx/tmp/nhc98-1.06/targets/ix86-FreeBSD/obj/prelude/DErrNo/DErrNo.o] Error 1 make[1]: Leaving directory `/home/4/wilx/tmp/nhc98-1.06/src/prelude/ix86-FreeBSD' make: *** [targets/ix86-FreeBSD/compiler-gcc] Error 2
/home/4/wilx/tmp/nhc98-1.06/script/nhc98 -cpp -c +CTS -lib -redefine -CTS +RTS -H32M -RTS -o .../obj/prelude/DErrNo/DErrNo.o DErrNo.hs /home/4/wilx/tmp/nhc98-1.06/script/nhc98: /home/4/wilx/tmp/nhc98-1.06/lib/ix86-FreeBSD/hmake-PRAGMA: not found Bus error - core dumped
This looks rather like the kind of random crash we were experiencing for a while, due to a fault in the primitive implementation of putStr.
Download the `putStr' patch from the website, or direct from ftp://ftp.cs.york.ac.uk/pub/haskell/nhc98/patch-1.06-putStr and apply it. Then just re-issue the command `make', and all should be well. (If not, then let us know.)
Regards, Malcolm

I am pretty disapointed. I cannot build nhc98 because it wants hmake-PRAGMA and I cannot make hmake because it will not build from sources without nhc98. How is somebody supposed to build any Haskell compiler when you need working Haskell compiler to build it?!? How can I break the circle? It is not only problem of nhc98, I have had similar problems when I tryed to build ghc. Vaclav Haisman

Hi Vaclav,
I am pretty disapointed.
And I am sorry that I have not been able to find the cause of the "Bus error" fault you found when building nhc98.
I cannot build nhc98 because it wants hmake-PRAGMA and I cannot make hmake because it will not build from sources without nhc98.
But hmake-PRAGMA can be built from C-sources, without a Haskell compiler. I am a little puzzled that it was not built automatically for you. Did you follow this sequence of steps to build nhc98? tar zxf nhc98src-1.06.tar.gz cd nhc98-1.06 ./configure --buildwith=gcc make This should build, first, nhc98's runtime system, then the Prelude and libraries, then hmake-PRAGMA, then the compiler, and finally greencard and hmake, all from C sources.
How is somebody supposed to build any Haskell compiler when you need working Haskell compiler to build it?!? How can I break the circle?
It is something we have tried very hard to provide, and building from C sources certainly works for me on Linux and Solaris machines. Perhaps there is a compatibility problem with FreeBSD that we have not discovered until now. What version of the GCC compiler do you have installed for instance? Regards, Malcolm

I am using gcc 3.0. The backtrace of hmake-PRAGMA in gdb shows this: #0 0x80497f7 in run () #1 0x8048ae1 in main () #2 0x80489b1 in _start () I was watching the build process more carefully now. It seems that everything goes well untill the Buss error. There are also some warnings: Bounded_Int.hc:32: warning: decimal constant is so large that it is unsigned Int.hc:1312: warning: decimal constant is so large that it is unsigned Int.hc:2266: warning: decimal constant is so large that it is unsigned Vaclav Haisman

I am using gcc 3.0.
I have heard that gcc 3.0 is quite buggy, since it is very new. Do you have any possibility of using an older version, such as 2.95? If so, it would be very useful if you try it, and report whether you get the same errors.
The backtrace of hmake-PRAGMA in gdb shows this:
#0 0x80497f7 in run () #1 0x8048ae1 in main () #2 0x80489b1 in _start ()
This is not very surprising. The run() routine is the main bytecode interpreter, where all programs built by nhc98 spend 95% or more of their time.
There are also some warnings:
Bounded_Int.hc:32: warning: decimal constant is so large that it is unsigned Int.hc:1312: warning: decimal constant is so large that it is unsigned Int.hc:2266: warning: decimal constant is so large that it is unsigned
These warnings are harmless - they relate to the largest possible 32-bit negative int -2147483648, which appears literally in the automatically-generated C code. Regards, Malcolm
participants (2)
-
Malcolm Wallace
-
Vaclav Haisman