Subject: port-sparc64/23344: With recent sparc64 kernel, gcc self-compilation gives "out of memory"
To: None <>
From: None <>
List: netbsd-bugs
Date: 11/02/2003 13:49:02
>Number:         23344
>Category:       port-sparc64
>Synopsis:       Recent sparc64 kernel fails to self-compile gcc
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 02 12:50:01 UTC 2003
>Originator:     Havard Eidnes
>Release:        NetBSD 1.6ZE
System: NetBSD 1.6ZE NetBSD 1.6ZE (MIZAR) #17: Sun Nov 2 10:31:32 CET 2003 sparc64
Architecture: sparc64
Machine: sparc64
	After updating to today's -current kernel, gcc is no longer
	able to compile itself.  It bombs out with

#   compile  fold-const.o
/usr/tools/bin/sparc64--netbsd-gcc -O2  -Werror    -I. -I/usr/src/gnu/usr.bin/gcc3/backend/../arch/sparc64 -DIN_GCC -DHAVE_CONFIG_H -I/usr/src/gnu/dist/gcc/gcc -I/usr/src/gnu/dist/gcc/gcc/. -I/usr/src/gnu/dist/gcc/gcc/config -I/usr/src/gnu/dist/gcc/gcc/../include  -DTARGET_NAME=\"sparc64--netbsd\" -DLOCALEDIR=\"/usr/share/locale\" -DNETBSD_NATIVE   -nostdinc -isystem /usr/dest/usr/include -c    /usr/src/gnu/dist/gcc/gcc/fold-const.c -o fold-const.o.tmp
sbrk: grow 1015808 failed, error = 12

cc1: out of memory allocating 1009584 bytes after a total of 8048448 bytes

	This succeeded with the previous 1.6ZD kernel, which was
	dated Oct 22.

	I'm pretty certain that cc1 doesn't actually hit it's resource
	limit; it used to work with 128MB virtual size, but increasing
	the resource limit to 256MB or 384MB did not improve the situation,
	and the largest value I was able to follow cc1 go to with 'top'
	was around 74MB.

	Update kernel to today's -current.  Watch the above problem
	occur during building.

	Sorry, don't know; hints for further debugging gratefully accepted.