Subject: port-sparc64/23344: With recent sparc64 kernel, gcc self-compilation gives "out of memory"
To: None <gnats-bugs@gnats.netbsd.org>
From: None <he@netbsd.org>
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
>Closed-Date:
>Last-Modified:
>Originator:     Havard Eidnes
>Release:        NetBSD 1.6ZE
>Organization:
>Environment:
System: NetBSD mizar.urc.uninett.no 1.6ZE NetBSD 1.6ZE (MIZAR) #17: Sun Nov 2 10:31:32 CET 2003 he@mizar.urc.uninett.no:/usr/obj/sys/arch/sparc64/compile/MIZAR sparc64
Architecture: sparc64
Machine: sparc64
>Description:
	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.

>How-To-Repeat:
	Update kernel to today's -current.  Watch the above problem
	occur during building.

>Fix:
	Sorry, don't know; hints for further debugging gratefully accepted.
>Release-Note:
>Audit-Trail:
>Unformatted: