Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] sys-devel/gcc:12 Update Fails to Emerge on Gentoo…
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
RandomDSdevel
n00b
n00b


Joined: 28 Feb 2022
Posts: 46
Location: Kokomo, IN, USA

PostPosted: Sun Oct 16, 2022 5:07 pm    Post subject: [SOLVED] sys-devel/gcc:12 Update Fails to Emerge on Gentoo… Reply with quote

(Note: This thread's old, full title was 'sys-devel/gcc:12 Update Fails to Emerge on Gentoo on WSL2,' but it wouldn't fit when I marked it as solved by editing that.)

`sys-devel/gcc:12` keeps failing to build for me on the Gentoo instance I have running on/under Windows Subsystem for Linux v2 with the following error:
Code:

make[3]: Entering directory '/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/build/gcc'
/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/build/./prev-gcc/xg++ -B/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/build/./prev-gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs  -isystem /var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu  -isystem /var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include  -isystem /var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libstdc++-v3/libsupc++ -L/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs  -fno-PIE -c -fno-PIE    -m64 -march=native -mtune=native -pipe -O2 -fno-checking -gtoggle -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/gcc -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/gcc/. -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/gcc/../include -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/gcc/../libcpp/include -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/gcc/../libcody  -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/gcc/../libdecnumber -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/gcc/../libdecnumber/bid -I../libdecnumber -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/gcc/../libbacktrace   -o insn-emit.o -MT insn-emit.o -MMD -MP -MF ./.deps/insn-emit.TPo insn-emit.cc
{standard input}: Assembler messages:
{standard input}:2063500: Warning: end of file not at end of a line; newline inserted
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
xg++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[3]: *** [Makefile:1145: insn-emit.o] Error 1
make[3]: Leaving directory '/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/build/gcc'
make[3]: *** Waiting for unfinished jobs....
make[3]: Entering directory '/var/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/build/gcc'

make[2]: *** [Makefile:5004: all-stage2-gcc] Error 2
make[1]: *** [Makefile:25337: stage2-bubble] Error 2
make: *** [Makefile:25560: bootstrap-lean] Error 2
ERROR: sys-devel/gcc-12.2.1_p20221008::gentoo failed (compile phase):
  emake failed

I don't know where that signal appeared from; I didn't issue any user interrupts. This was under Windows 11 Pro 22H2, build 22621.674, with Windows Feature Experience Pack 1000.22634.1000.0. My full build logs and environment information are here in this GitHub repository. I searched the Gentoo Bugzilla instance for issues with GCC 12.2.1_p20221008 and saw some, but I don't know if what I've run into is the same as any of those; I can formally open a new ticket if it isn't.


Last edited by RandomDSdevel on Tue Oct 18, 2022 5:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
RandomDSdevel
n00b
n00b


Joined: 28 Feb 2022
Posts: 46
Location: Kokomo, IN, USA

PostPosted: Sun Oct 16, 2022 5:28 pm    Post subject: Reply with quote

Oh, and, if I'm remembering correctly, I've tried this under both my `compiler-clang` and `compiler-gcc-no-lld` environments with the same, unsuccessful results.
Back to top
View user's profile Send private message
RandomDSdevel
n00b
n00b


Joined: 28 Feb 2022
Posts: 46
Location: Kokomo, IN, USA

PostPosted: Sun Oct 16, 2022 5:35 pm    Post subject: Reply with quote

Last time I attempted this with Clang, I think it might've been an older version pre-upgrade; let me that try again and report back.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55202
Location: 56N 3W

PostPosted: Sun Oct 16, 2022 6:23 pm    Post subject: Reply with quote

RandomDSdevel,

Code:
xg++: fatal error: Killed signal terminated program cc1plus

You ran out of real RAM.

Either give the VM more RAM or reduce MAKEOPTS.
With only one build thread, it might work in 2GB real RAM.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
RandomDSdevel
n00b
n00b


Joined: 28 Feb 2022
Posts: 46
Location: Kokomo, IN, USA

PostPosted: Sun Oct 16, 2022 8:00 pm    Post subject: Reply with quote

A-ha, there's an idea. That running out of memory was the problem isn't at all obvious from the error message, though. It doesn't say where that signal came from, though, from what you say, it'd likely be the process OOM killer. The only thing that running out of RAM's happened to me on before is a past attempt at building Rust from source instead of just using rust-bin, which I promptly gave up on; I've never seen this with any previous GCC releases. I'll try with fewer threads as soon as my most recent GCC build attempt with Clang inevitably fails.

(Addending edit: Oh, and I have 8 GB physical RAM. I haven't set any memory limits on WSL2, so whatever memory it gives Gentoo is out of my hands. Mock glares at a likely culprit: …I blame my open Microsoft Edge windows and tabs, ha-ha.)
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9632
Location: beyond the rim

PostPosted: Mon Oct 17, 2022 9:40 am    Post subject: Reply with quote

RandomDSdevel wrote:
(Addending edit: Oh, and I have 8 GB physical RAM. I haven't set any memory limits on WSL2, so whatever memory it gives Gentoo is out of my hands. Mock glares at a likely culprit: …I blame my open Microsoft Edge windows and tabs, ha-ha.)

8 GB RAM isn't much for Win10 these days, my work PC already needs that much directly after startup (fortunately has 64 GB available). Browsers can easily add 1-2 GB on top, even more when using multiple tabs with video content. For dealing with VMs (including WSL, docker and similar stuff) you definitely want more than 8 GB of RAM on the host system. Even if you don't strictly need it, it will reduce stress on the memory allocation and improve performance.
Back to top
View user's profile Send private message
RandomDSdevel
n00b
n00b


Joined: 28 Feb 2022
Posts: 46
Location: Kokomo, IN, USA

PostPosted: Tue Oct 18, 2022 5:51 pm    Post subject: Reply with quote

I have some more RAM to install, which will bring me up to 32 GB; I just haven't gotten around to it yet.
---
Attempting to `emerge` with `MAKEOPTS="-j1"` set in a new environment did the trick, so I've marked this as solved now. Thanks for the help, NeddySeagoon!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum