Created attachment 440420 [details] build.log Hi, after eix-sync I try to update the system with the command: emerge -aj --update --deep --with-bdeps=y --newuse @world but get an ERROR message: distcc[19842] (dcc_build_somewhere) Warning: failed to distribute, running locally instead {standard input}: Assembler messages: {standard input}:42748: Warning: end of file not at end of a line; newline inserted {standard input}:43113: Error: ']' expected -- `ldr r10,[r7,#16' armv7a-hardfloat-linux-gnueabi-g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.gentoo.org/> for instructions. distcc[19814] ERROR: compile /var/tmp/portage/sys-devel/binutils-2.25.1-r1/work/binutils-2.25.1/gold/powerpc.cc on localhost failed with exit code 4 Makefile:842: recipe for target 'powerpc.o' failed make[4]: *** [powerpc.o] Error 4 make[4]: *** Waiting for unfinished jobs.... mv -f .deps/tilegx.Tpo .deps/tilegx.Po mv -f .deps/arm.Tpo .deps/arm.Po mv -f .deps/mips.Tpo .deps/mips.Po make[4]: Leaving directory '/var/tmp/portage/sys-devel/binutils-2.25.1-r1/work/build/gold' Makefile:865: recipe for target 'all-recursive' failed make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory '/var/tmp/portage/sys-devel/binutils-2.25.1-r1/work/build/gold' Makefile:616: recipe for target 'all' failed make[2]: *** [all] Error 2 make[2]: Leaving directory '/var/tmp/portage/sys-devel/binutils-2.25.1-r1/work/build/gold' Makefile:6072: recipe for target 'all-gold' failed make[1]: *** [all-gold] Error 2 make[1]: Leaving directory '/var/tmp/portage/sys-devel/binutils-2.25.1-r1/work/build' Makefile:832: recipe for target 'all' failed make: *** [all] Error 2 * ERROR: sys-devel/binutils-2.25.1-r1::gentoo failed (compile phase): * emake failed
Created attachment 440422 [details] emeerge -pqv
Created attachment 440424 [details] environment
> armv7a-hardfloat-linux-gnueabi-g++: internal compiler error: Killed (program cc1plus) Please check dmesg for errors about killed processes.
This happen on my Raspberry Pi 2 Model.
I just checked out dmesg for errors about killed processes. I run 'dmesg -w' for this. Then I start 'pump emerge -j --update --deep --with-bdeps=y --newuse @world' and wait. I get the same error as yesterday. dmesg shows nothing new during this.
I'd bet the build fails because at some point cc1plus is killed as the system runs out of memory. In that case, dmesg should say so. It looks like that: [80150.151940] Out of memory: kill process XXXX (cc1plus) score 343 or sacrifice child [80150.151944] Killed process XXXX (cc1plus) As the Raspberry is somewhat limited on memory, MAKEOPTS set at -j4 is pretty taxing. I'd try MAKEOPTS="-j1" emerge --oneshot binutils .
Success! (In reply to Florian E. Teply from comment #6) > I'd bet the build fails because at some point cc1plus is killed as the > system runs out of memory. > In that case, dmesg should say so. It looks like that: > > [80150.151940] Out of memory: kill process XXXX (cc1plus) score 343 or > sacrifice child > [80150.151944] Killed process XXXX (cc1plus) > > As the Raspberry is somewhat limited on memory, MAKEOPTS set at -j4 is > pretty taxing. > > I'd try > MAKEOPTS="-j1" emerge --oneshot binutils > . Success! There was a dmsg message: [618774.466392] Out of memory: Kill process 29585 (cc1plus) score 252 or sacrifice child [618774.466405] Killed process 29585 (cc1plus) total-vm:275664kB, anon-rss:250712kB, file-rss:104kB but I was thinking that that it left out there and it should not apply to this case. Sorry! But now, with this command: MAKEOPTS="-j1" emerge --oneshot binutils there was no new such message anymore. So what should I do to avoid such issue in the future? I'm using distccd, but still was getting this message: out of memory. Should I put MAKEOPTS="-j4" in make.conf file? grep processor /proc/cpuinfo output this: processor : 0 processor : 1 processor : 2 processor : 3
I successfully emerge binutils package.
> So what should I do to avoid such issue in the future? > I'm using distccd, but still was getting this message: out of memory. Well, judging from the log you provided, distcc was not successfully used in that specific build process. And in that case the build is done locally. > Should I put MAKEOPTS="-j4" in make.conf file? > grep processor /proc/cpuinfo > output this: > processor : 0 > processor : 1 > processor : 2 > processor : 3 If you indeed have four cores available, then it absolutely makes sense to leave MAKEOPTS at "-j4" in order to make use of the available cores during compilation as that in general speeds up the process. There are a few cases however where the limitation is not processing power but RAM, and in these cases, having four compiler processes running simultaneously is not such a good idea as they compete for the limited amount of RAM available. So, my suggestion is to leave the setting as is. In most cases it just works the way it is expected to. When compilation fails, you now know the signs to look for (Out of memory message in dmesg output), and then you know to re-emerge that specific packet with MAKEOPTS="-j1". This usually is worth a try also when emerge fails for other reasons.
(In reply to Florian E. Teply from comment #9) > > So what should I do to avoid such issue in the future? > > I'm using distccd, but still was getting this message: out of memory. > > Well, judging from the log you provided, distcc was not successfully used in > that specific build process. And in that case the build is done locally. Indeed. I fixed it now. > So, my suggestion is to leave the setting as is. In most cases it just works > the way it is expected to. When compilation fails, you now know the signs to > look for (Out of memory message in dmesg output), and then you know to > re-emerge that specific packet with MAKEOPTS="-j1". This usually is worth a > try also when emerge fails for other reasons. OK In make.conf I have not any MAKEOPTS option now. I never had MAKEOPTS option out there so far, and I removed it now. Is this right? I shall do in the future as you advices me. Thank you very much!