Sunday, January 4, 2009

Bootstrapping 2

A test of the patched GHC 6.10.1 looks promising:
make stage=1 WAY=optc EXTRA_HC_OPTS=-L/data0/home/benl/lib

Gives:
Unexpected failures:
2594(optc) -- run segv. tests 64 bit FFI.
T2486(optc) -- diff top level specialisations, ok by hand.
andy_cherry(optc) -- timed out when compiling, ok by hand.
barton-mangler-bug(optc)
conc020(optc) -- does nothing. not sure.
concprog001(optc)
enum01(optc) -- run segv. 64 bit code? not sure.
enum02(optc) -- run segv. 64 bit code
enum03(optc) -- run segv. 64 bit code
ffi019(optc)
hClose002(optc)
hpc_raytrace(optc)
joao-circular(optc)
num012(optc)
process007(optc)
simpl015(optc)
tcrun007(optc)
user001(optc)


I'm getting linker problems when trying to build gdb on sparky.
gcc -g -O2      \
-o gdb gdb.o libgdb.a \
../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a -lintl
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -ldl -lncurses
-lsocket -lnsl -lm -lexpat ../libiberty/libiberty.a
Undefined first referenced
symbol in file
initscr32 libgdb.a(tui.o)
w32addch libgdb.a(tui-io.o)
w32attron libgdb.a(tui-wingeneral.o)
w32attroff libgdb.a(tui-wingeneral.o)
acs32map libgdb.a(tui-win.o)
getcurx libgdb.a(tui-io.o)
getcury libgdb.a(tui-io.o)


After some Googling around, it turns out these syms are defined in the Solaris /usr/ccs/libcurses.so library and not GNU libncurses.

Spent some time going through the current trac tickets. #186 says that Int64 code has been broken for some time, which will be the reason for many of the test failures.

On mavericks I have two builds running with a single thread, and another running with 4 threads. This is creating frequent 3-4 second pauses on the console, which I guess is due to memory starvation. The builds are also dying every 20 min due to race conditions, I'm giving up on parallel make.

The stage1 build of ghc-HEAD-work on mavericks died with:
basicTypes/Var.lhs:80:30:
Module
`IdInfo'
(hi-boot interface)
does not export
`GlobalIdDetails'

basicTypes/Var.lhs:80:47:
Module `IdInfo' (hi-boot interface) does not export `notGlobalId'

I think this was because the repo got into a weird state because I control-c'd darcs when it was running. The formatting of the first error message looks weird though.

Darcs failures.. zzzz
== running darcs pull --repodir testsuite
Pulling from "/data0/home/benl/devel/ghc/ghc-HEAD"...
darcs: bug in get_extra commuting patches:
First patch is:
Fri Sep 7 18:23:27 EST 2001 simonmar
* [project @ 2001-09-07 08:23:27 by simonmar]
Fix some signatures after Ord was removed as a superclass of Ix.
Second patch is:
Fri Sep 14 01:54:43 EST 2001 simonmar
* [project @ 2001-09-13 15:54:43 by simonmar]
Back out the change to remove Ord as a superclass of Ix; the revised
Haskell 98 report will no longer have this change.
darcs failed: 256 at ./darcs-all line 69.
benl@mavericks:~/devel/ghc/ghc-HEAD-work> darcs --version
2.1.0 (release)
benl@mavericks:~/devel/ghc/ghc-HEAD-work>

Hrm. stage1 build of ghc-HEAD-work on sparky completed, but trying to compile something results in:
benl@sparky:~/devel/ghc/ghc-HEAD-work/tmp$
~/devel/ghc/ghc-HEAD-work/ghc/stage1-inplace/ghc --make Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
ld: fatal: relocation error: R_SPARC_32: file /home/benl/devel/ghc/ghc-HEAD-work/libffi/libHSffi.a(v8.o):
symbol : offset 0xfd0559b6 is non-aligned

Trying GNU ld instead gives:
ld: gct: TLS definition in /home/benl/devel/ghc/ghc-HEAD-work/rts/libHSrts.a(GC.o)
section .tbss mismatches non-TLS reference in
/home/benl/devel/ghc/ghc-HEAD-work/rts/libHSrts.a(GCUtils.o)

I expect this happened because i changed my ~/bin/gcc during the build... yah. I'm trying to do too many things at once because the builds take so long. Rebuilt the runtime system and now I'm getting this:
/opt/gcc/bin/../../SUNW0scgfss/4.0.4/prod/bin/fbe: "StgCRun.s", line 17: error: statement syntax
/opt/gcc/bin/../../SUNW0scgfss/4.0.4/prod/bin/fbe: "StgCRun.s", line 31: error: statement syntax

This is with GHC 4.0.4 installed on sparky. Checking out the .s files at those lines shows:
    sethi   %hi(%l1),%i5
ld [%i5+%lo(%l1)],%i0

From the OpenSPARC 2007 architecture manual, both of those instructions are bad. This looks like a legitimate GCC bug. Time to upgrade.

1 comment:

  1. Try to reconfigure your gdb with --disable-tui. I've had the same issue recently on amd64/solaris.

    ReplyDelete