Hi!
Unfortunately, I still have problems in compiling ghc-4.02 at our site. I
have included a failure report with everything I considered as important. If
something is missing, feel free to contact me, I'll happily provide you
everything you need...
You'll see two configurations, in both, hsc breaks, but I'm not sure,
whether the problem is the same, or different (more likely)...
configuration (1):
=======================
* Sun ULTRA-2 (SunOS 5.7 Generic October 1998, kernel arch sun4u)
* source package ghc-4.02-src.tar.gz
* installed ghc: binary distribution, version 3.03, patchlevel 0
* gcc-2.7.2.3
Problem:
The compilation procedure dumps core when compiling the libs
[in fptools/ghc/lib/std]
-------------------------------------------------------------------------------
rm -f PrelBase.o ; if [ ! -d PrelBase ]; then mkdir PrelBase; else find
PrelBase -name '*.o' -print | xargs rm -f __rm_food ; fi ;
../../../ghc/driver/ghc -optc-g -recomp -cpp -fglasgow-exts -fvia-C
-Rghc-timing -O -split-objs -odir PrelBase -H10m -c PrelBase.lhs -o
PrelBase.o -osuf o
Bus Error - core dumped
-------------------------------------------------------------------------------
hsc ist started with following options:
-------------------------------------------------------------------------------
/opt/i2/work1/install/ghc-4.02/fptools/ghc/driver/../compiler/hsc
,-N ,-W ,/tmp/ghc19872.cpp -fno-implicit-prelude -fglasgow-exts
-fglobalise-toplev-names -fdo-eta-reduction -fsimplify [
-fkeep-spec-pragma-ids -fessential-unfoldings-only -fsimpl-uf-use-threshold0
-fclone-binds -fmax-simplifier-iterations1 -fpedantic-bottoms ] -fspecialise
-fsimplify [ -ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case
-fdo-case-elim -fcase-merge -fdo-lambda-eta-expansion -freuse-con
-fpedantic-bottoms -fmax-simplifier-iterations4 -fclone-binds ]
-ffull-laziness -ffloat-inwards -fsimplify [ -ffloat-lets-exposing-whnf
-ffloat-primops-ok -fcase-of-case -fdo-case-elim -fcase-merge
-fdo-eta-reduction -fdo-lambda-eta-expansion -freuse-con -fpedantic-bottoms
-fmax-simplifier-iterations4 ] -fstrictness -fsimplify [
-ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case -fdo-case-elim
-fcase-merge -fdo-lambda-eta-expansion -freuse-con -flet-to-case
-fpedantic-bottoms -fmax-simplifier-iterations4 ] -ffloat-inwards
-fsimplify [ -ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case
-fdo-case-elim -fcase-merge -fdo-lambda-eta-expansion -freuse-con
-flet-to-case -fignore-inline-pragma -fpedantic-bottoms
-fmax-simplifier-iterations4 ] -flambda-lift -flet-no-escape
-fwarn-overlapping-patterns -fwarn-missing-methods -fwarn-duplicate-exports
-fhi-version=402
-himap=.%.hi:/opt/i2/work1/install/ghc-4.02/fptools/ghc/driver/../lib/exts%.hi:/opt/i2/work1/install/ghc-4.02/fptools/ghc/driver/../lib/exts%.hi:/opt/i2/work1/install/ghc-4.02/fptools/ghc/driver/../lib/std%.hi-hifile=/tmp/ghc19872.hi-C=/tmp/ghc19872.hc-F=/tmp/ghc19872_stb.c-FH=/tmp/ghc19872_stb.h+RTS-H10000000-K1000000-s/tmp/ghc19872.stat
-------------------------------------------------------------------------------
This is what gdb says to the core:
-------------------------------------------------------------------------------
Core was generated by
/opt/i2/work1/install/ghc-4.02/fptools/ghc/driver/../compiler/hsc ,-N ,-W,/tmp'.
Program terminated with signal 10, Bus error.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/platform/SUNW,Ultra-2/lib/libc_psr.so.1...done.
#0 0x89e4d4 in StdUpdFrameDirectReturn ()
(gdb) bt
#0 0x89e4d4 in StdUpdFrameDirectReturn ()
#1 0x25d4d4 in djn_c1ZD_2 () at /tmp/ghc15926.hc:160
#2 0x8f9a70 in _PRMarking_MarkNextRoot_closure ()
(gdb)
-------------------------------------------------------------------------------
Is 'StdUpdFrameDirectReturn()' part of ghc or a library function?
This is what truss (strace) says:
-------------------------------------------------------------------------------
[...]
open("/tmp/ghc20046.stat", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fstat64(3, 0xFFBEE348) = 0
brk(0x009020C0) = 0
brk(0x009060C0) = 0
ioctl(3, TCGETA, 0xFFBEE2D4) Err#25 ENOTTY
brk(0x009060C0) = 0
brk(0x009FA0C0) = 0
sysconfig(_CONFIG_PAGESIZE) = 8192
mprotect(0x0097E000, 8192, PROT_NONE) = 0
sigaction(SIGSEGV, 0xFFBEF160, 0x00000000) = 0
brk(0x009FA0C0) = 0
brk(0x013820C0) = 0
write(3, " h s c , - N , - W ".., 1936) = 1936
times(0xFFBEF260) = 183052287
times(0xFFBEF260) = 183052287
Incurred fault #5, FLTACCESS %pc = 0x0089E4D4
siginfo: SIGBUS BUS_ADRALN addr=0x00000001
Received signal #10, SIGBUS [default]
siginfo: SIGBUS BUS_ADRALN addr=0x00000001
*** process killed ***
-------------------------------------------------------------------------------
As said, if you need more information, ask me...
==================
configuration (2):
==================
* SUN Ultra-1 SunOS 5.6 Generic_105181-11 sun4u sparc
* source package ghc-4.02-src.tar.gz
* installed ghc: binary distribution (ghc-3.02-sparc-sun-solaris2.tar.gz), version
3.03, patchlevel 0
* gcc-2.8.1
Problem:
The compilation procedure dumps core when compiling the libs
[in fptools/ghc/lib/std]
-------------------------------------------------------------------------------
../../../ghc/driver/ghc -optc-g -recomp -cpp -fglasgow-exts -fvia-C
-Rghc-timing -O -split-objs -odir PrelBase -H10m -c PrelBase.lhs -o
PrelBase.o -osuf o
-------------------------------------------------------------------------------
hsc ist started with following options:
-------------------------------------------------------------------------------
/tmp/.mwe/fptools/ghc/driver/../compiler/hsc ,-N ,-W
,/tmp/ghc5739.cpp -fno-implicit-prelude -fglasgow-exts
-fglobalise-toplev-names -fdo-eta-reduction -fsimplify [
-fkeep-spec-pragma-ids -fessential-unfoldings-only -fsimpl-uf-use-threshold0
-fclone-binds -fmax-simplifier-iterations1 -fpedantic-bottoms ] -fspecialise
-fsimplify [ -ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case
-fdo-case-elim -fcase-merge -fdo-lambda-eta-expansion -freuse-con
-fpedantic-bottoms -fmax-simplifier-iterations4 -fclone-binds ]
-ffull-laziness -ffloat-inwards -fsimplify [ -ffloat-lets-exposing-whnf
-ffloat-primops-ok -fcase-of-case -fdo-case-elim -fcase-merge
-fdo-eta-reduction -fdo-lambda-eta-expansion -freuse-con -fpedantic-bottoms
-fmax-simplifier-iterations4 ] -fstrictness -fsimplify [
-ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case -fdo-case-elim
-fcase-merge -fdo-lambda-eta-expansion -freuse-con -flet-to-case
-fpedantic-bottoms -fmax-simplifier-iterations4 ] -ffloat-inwards
-fsimplify [ -ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case
-fdo-case-elim -fcase-merge -fdo-lambda-eta-expansion -freuse-con
-flet-to-case -fignore-inline-pragma -fpedantic-bottoms
-fmax-simplifier-iterations4 ] -flambda-lift -flet-no-escape
-fwarn-overlapping-patterns -fwarn-missing-methods -fwarn-duplicate-exports
-fhi-version=402
-himap=.%.hi:/tmp/.mwe/fptools/ghc/driver/../lib/exts%.hi:/tmp/.mwe/fptools/ghc/driver/../lib/exts%.hi:/tmp/.mwe/fptools/ghc/driver/../lib/std%.hi-hifile=/tmp/ghc5739.hi-C=/tmp/ghc5739.hc-F=/tmp/ghc5739_stb.c-FH=/tmp/ghc5739_stb.h+RTS-H10000000-K1000000-s/tmp/ghc5739.stat
-------------------------------------------------------------------------------
This is what gdb says to the core:
-------------------------------------------------------------------------------
Core was generated by /tmp/.mwe/fptools/ghc/driver/../compiler/hsc ,-N ,-W
,/tmp/ghc5739.cpp -fno-imp'.
Program terminated with signal 10, Bus error.
"/usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1": not in executable format:
File format not recognized.
#0 FastString_unpackFS_fast1 () at /tmp/ghc28418.hc:456
Source file is more recent than executable.
456 JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p)))));
(gdb) bt
#0 FastString_unpackFS_fast1 () at /tmp/ghc28418.hc:456
#1 0x6d2eac in djn_core_1 () at /tmp/ghc24426.hc:8369
#2 0x8ee2a0 in _PRMarking_MarkNextRoot_closure ()
(gdb) list 440,460
440 FB_
441 ARGS_CHK_A_LOAD_NODE(1,FastString_unpackFS_closure);
442 R1.p=*SpA;
443 SpA=SpA+1;
444 GRAN_EXEC(5,2,1,0,0);
445 JMP_(FastString_unpackFS_fast1);
446 FE_
447 }
448 FN_(FastString_unpackFS_fast1) {
449 FB_
450 STK_CHK(1,1,1,0,0,0,0);
451 SpB[1]=(W_)(RetReg);
452 RetReg=vtbl_ckpp;
453 SpB=SpB+1;
454 ENT_VIA_NODE();
455 GRAN_EXEC(3,1,1,1,0);
456 JMP_((P_)(ENTRY_CODE((D_)(INFO_PTR(R1.p)))));
457 FE_
458 }
459
SPEC_U_ITBL(FastString_unpackFS_vap_info,FastString_unpackFS_vap_entry,StdErrorCode,1,-1,2,1,const,EF_,0,0,0);
460 FN_(FastString_unpackFS_vap_entry)
-------------------------------------------------------------------------------
As you can see, this problem is different to the above (due to gcc-2.8.1 ?).
There seems to be a problem with the FastString-library:
FastString_unpackFS_fast1
The first part is the module name, the second is the function, but what does
'fast1' come from?
Another oddity is, that gdb does not like the installed libc_psr.so.1, but I
think it is loaded (truss says so...)
This is what truss (strace) says:
-------------------------------------------------------------------------------
[...]
open("/tmp/ghc5952.stat", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fstat64(3, 0xEFFFDDD0) = 0
brk(0x008F6B30) = 0
brk(0x008FAB30) = 0
ioctl(3, TCGETA, 0xEFFFDD5C) Err#25 ENOTTY
brk(0x008FAB30) = 0
brk(0x009EEB30) = 0
sysconfig(_CONFIG_PAGESIZE) = 8192
mprotect(0x00972000, 8192, PROT_NONE) = 0
sigaction(SIGSEGV, 0xEFFFEBF8, 0x00000000) = 0
brk(0x009EEB30) = 0
brk(0x01376B30) = 0
write(3, " h s c , - N , - W ".., 1867) = 1867
times(0xEFFFECF0) = 77475674
times(0xEFFFECF0) = 77475674
Incurred fault #5, FLTACCESS %pc = 0x0026B264
siginfo: SIGBUS BUS_ADRALN addr=0x00000056
Received signal #10, SIGBUS [default]
siginfo: SIGBUS BUS_ADRALN addr=0x00000056
*** process killed ***
-------------------------------------------------------------------------------
If you have any ideas, how to solve this (or even tips for me, how to
track down the problem), please, tell me! :->
Regards,
Michael