Discussion:
netbsd-6 CVS branch amd64 build fails with gcc internal error
J. Lewis Muir
2014-09-23 20:08:25 UTC
Permalink
Hello, NetBSD Users.

I tried to build the netbsd-6 CVS branch (i.e. stable branch) from
source for amd64 on a NetBSD 6.1.4 amd64 machine using the BUILD-NetBSD
program from the sysutils/etcmanage 0.8.2 package, but the build
fails partway through with the message, "x86_64--netbsd-gcc: Internal
error: Killed (program cc1 received signal 9)". :-(

The console output for the beginning and end (after "[snip]") of the
build is below. Right near the top is the actual build.sh command that
was run.

The machine is a VMware virtual machine. I checked available disk
space, and that seems fine. The machine has 256 MB of memory; I assume
that's fine. The build is running with '-j2'; I assume that's fine,
but I could try no parallelism if that might help, but I'd be surprised
since I assume most everyone builds with parallelism.

I updated the CVS branch source just yesterday before building.

Does anyone know what's wrong and how to fix it?

Thank you!

Lewis

~~
$ cd /usr
$ BUILD-NetBSD all
BUILDALL OVERALL start Mon Sep 22 21:47:28 CDT 2014
Building with branch token 6
Not ROOT: doing UNPRIVed build
ALL: doing full build to iso
BUILDALL MAIN release start Mon Sep 22 21:47:28 CDT 2014
===> build.sh command: ./build.sh -m amd64 -j2 -u -U -O /usr/obj/stable-6/amd64 -T /usr/obj/stable-6/tools -D /usr/obj/stable-6/destdir/amd64 -R /usr/obj/stable-6/releasedir -X /usr/xsrc release
===> build.sh started: Mon Sep 22 21:47:28 CDT 2014
===> NetBSD version: 6.1_STABLE
===> MACHINE: amd64
===> MACHINE_ARCH: x86_64
===> Build platform: NetBSD 6.1.4 amd64
===> HOST_SH: /bin/sh
===> No $TOOLDIR/bin/nbmake, needs building.
===> Bootstrapping nbmake
checking for sh... /bin/sh
checking for gcc... cc
[snip]
--- insn-preds.o ---
# compile backend/insn-preds.o
/usr/obj/stable-6/tools/bin/x86_64--netbsd-gcc -O2 -std=gnu99 -Werror -Wno-stack-protector -I. -I/usr/src/external/gpl3/gcc/usr.bin/backend/../gcc/arch/x86_64 -DIN_GCC -DHAVE_CONFIG_H -I/usr/src/external/gpl3/gcc/dist/gcc -I/usr/src/external/gpl3/gcc/dist/gcc/. -I/usr/src/external/gpl3/gcc/dist/gcc/../include -I/usr/src/external/gpl3/gcc/dist/gcc/../libcpp/include -I/usr/src/external/gpl3/gcc/dist/gcc/../libdecnumber -I/usr/src/external/gpl3/gcc/dist/gcc/../libdecnumber/dpd -I/usr/include/libelf -DTARGET_NAME=\"x86_64--netbsd\" -I/usr/src/external/gpl3/gcc/dist/libgcc --sysroot=/usr/obj/stable-6/destdir/amd64 -DLOCALEDIR=\"/usr/share/locale\" -DNETBSD_NATIVE -I. -std=gnu89 -c insn-preds.c -o insn-preds.o
/usr/obj/stable-6/tools/bin/x86_64--netbsd-objcopy -x insn-preds.o
--- insn-recog.o ---
# compile backend/insn-recog.o
/usr/obj/stable-6/tools/bin/x86_64--netbsd-gcc -O2 -std=gnu99 -Werror -Wno-stack-protector -I. -I/usr/src/external/gpl3/gcc/usr.bin/backend/../gcc/arch/x86_64 -DIN_GCC -DHAVE_CONFIG_H -I/usr/src/external/gpl3/gcc/dist/gcc -I/usr/src/external/gpl3/gcc/dist/gcc/. -I/usr/src/external/gpl3/gcc/dist/gcc/../include -I/usr/src/external/gpl3/gcc/dist/gcc/../libcpp/include -I/usr/src/external/gpl3/gcc/dist/gcc/../libdecnumber -I/usr/src/external/gpl3/gcc/dist/gcc/../libdecnumber/dpd -I/usr/include/libelf -DTARGET_NAME=\"x86_64--netbsd\" -I/usr/src/external/gpl3/gcc/dist/libgcc --sysroot=/usr/obj/stable-6/destdir/amd64 -DLOCALEDIR=\"/usr/share/locale\" -DNETBSD_NATIVE -I. -std=gnu89 -c insn-recog.c -o insn-recog.o
x86_64--netbsd-gcc: Internal error: Killed (program cc1 received signal 9)
Please submit a full bug report.
See <http://www.NetBSD.org/Misc/send-pr.html> for instructions.
*** [insn-recog.o] Error code 1
nbmake: stopped in /usr/src/external/gpl3/gcc/usr.bin/backend
--- insn-attrtab.o ---
/usr/obj/stable-6/tools/bin/x86_64--netbsd-objcopy -x insn-attrtab.o
1 error
nbmake: stopped in /usr/src/external/gpl3/gcc/usr.bin/backend
*** [dependall] Error code 2
nbmake: stopped in /usr/src/external/gpl3/gcc/usr.bin/backend
1 error

nbmake: stopped in /usr/src/external/gpl3/gcc/usr.bin/backend
*** [dependall-backend] Error code 2
nbmake: stopped in /usr/src/external/gpl3/gcc/usr.bin
1 error
nbmake: stopped in /usr/src/external/gpl3/gcc/usr.bin
*** [dependall-usr.bin] Error code 2
nbmake: stopped in /usr/src/external/gpl3/gcc
1 error

nbmake: stopped in /usr/src/external/gpl3/gcc
*** [dependall-gcc] Error code 2
nbmake: stopped in /usr/src/external/gpl3
1 error

nbmake: stopped in /usr/src/external/gpl3
*** [dependall-gpl3] Error code 2
nbmake: stopped in /usr/src/external
1 error

nbmake: stopped in /usr/src/external
*** [dependall-external] Error code 2
nbmake: stopped in /usr/src
1 error

nbmake: stopped in /usr/src
*** [do-build] Error code 2
nbmake: stopped in /usr/src
1 error

nbmake: stopped in /usr/src
*** [build] Error code 2
nbmake: stopped in /usr/src
1 error
nbmake: stopped in /usr/src
*** [distribution] Error code 2
nbmake: stopped in /usr/src
1 error

nbmake: stopped in /usr/src
*** [release] Error code 2

nbmake: stopped in /usr/src
1 error

nbmake: stopped in /usr/src

ERROR: Failed to make release
*** BUILD ABORTED ***
~~
J. Lewis Muir
2014-09-23 20:15:22 UTC
Permalink
Post by J. Lewis Muir
The machine is a VMware virtual machine. I checked available disk
space, and that seems fine. The machine has 256 MB of memory; I
assume that's fine. The build is running with '-j2'; I assume that's
fine, but I could try no parallelism if that might help, but I'd be
surprised since I assume most everyone builds with parallelism.
Hmm, I just noticed the following error message on the machine's
console:

UVM: pid 19753 (cc1), uid 1000 killed: out of swap

So, maybe I am running out of memory? Or a process has gone rogue? Or
some other problem?

Thanks,

Lewis
Manuel Bouyer
2014-09-23 20:58:59 UTC
Permalink
Post by J. Lewis Muir
Post by J. Lewis Muir
The machine is a VMware virtual machine. I checked available disk
space, and that seems fine. The machine has 256 MB of memory; I
assume that's fine. The build is running with '-j2'; I assume that's
fine, but I could try no parallelism if that might help, but I'd be
surprised since I assume most everyone builds with parallelism.
Hmm, I just noticed the following error message on the machine's
UVM: pid 19753 (cc1), uid 1000 killed: out of swap
So, maybe I am running out of memory?
Yes. gcc can become really large sometimes ...
--
Manuel Bouyer <***@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
Christos Zoulas
2014-09-23 22:59:59 UTC
Permalink
Post by Manuel Bouyer
Post by J. Lewis Muir
Post by J. Lewis Muir
The machine is a VMware virtual machine. I checked available disk
space, and that seems fine. The machine has 256 MB of memory; I
assume that's fine. The build is running with '-j2'; I assume that's
fine, but I could try no parallelism if that might help, but I'd be
surprised since I assume most everyone builds with parallelism.
Hmm, I just noticed the following error message on the machine's
UVM: pid 19753 (cc1), uid 1000 killed: out of swap
So, maybe I am running out of memory?
Yes. gcc can become really large sometimes ...
This makes "Eight Megabytes And Constantly Swapping" seem so dated :-)

christos
J. Lewis Muir
2014-09-24 02:12:01 UTC
Permalink
Post by Manuel Bouyer
Post by J. Lewis Muir
Hmm, I just noticed the following error message on the machine's
UVM: pid 19753 (cc1), uid 1000 killed: out of swap
So, maybe I am running out of memory?
Yes. gcc can become really large sometimes ...
Hi, Manuel.

OK, the machine had 256 MB of swap and 256 MB of RAM; I increased the
RAM to 512 MB, leaving the swap unchanged, and the build succeeded!

I didn't realize a build took so much memory. Thanks for the help!

Regards,

Lewis
Roy Bixler
2014-09-24 16:15:51 UTC
Permalink
Post by J. Lewis Muir
Post by Manuel Bouyer
Post by J. Lewis Muir
Hmm, I just noticed the following error message on the machine's
UVM: pid 19753 (cc1), uid 1000 killed: out of swap
So, maybe I am running out of memory?
Yes. gcc can become really large sometimes ...
OK, the machine had 256 MB of swap and 256 MB of RAM; I increased the
RAM to 512 MB, leaving the swap unchanged, and the build succeeded!
I didn't realize a build took so much memory. Thanks for the help!
I have a machine with even less RAM, 128M, and I succeeded in building
the system on it (although I would not do it again, since it took more
than a day to complete.) Where I had trouble with running out of
memory was in updating the binary package database with "pkgin". I
simply added another 128M of swap and then it worked for me.
--
Roy Bixler <***@nyx.net>
"The fundamental principle of science, the definition almost, is this: the
sole test of the validity of any idea is experiment."
-- Richard P. Feynman
Greg Troxel
2014-09-23 22:57:57 UTC
Permalink
Try -j1 (just edit the script) and give the VM 1024MB. 256MB can run a
lot of things, but seems small to build.
Loading...