libtool: compile: /var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/./gcc/xgcc -shared-libgcc -B/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/./gcc -nostdinc++ -L/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -fno-checking -I/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/gcc-12-20220625/libstdc++-v3/../libgcc -I/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/gcc-12-20220625/libstdc++-v3/libsupc++ -std=gnu++17 -nostdinc++ -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=fs_ops.lo -fimplicit-templates -g -march=native -pipe -O2 -D_GNU_SOURCE -c /var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/gcc-12-20220625/libstdc++-v3/src/c++17/fs_ops.cc -fPIC -DPIC -D_GLIBCXX_SHARED -o fs_ops.o during RTL pass: ree In file included from /var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/deque:67, from /var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/stack:60, from /var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/gcc-12-20220625/libstdc++-v3/src/c++17/fs_ops.cc:39: /var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/deque.tcc: In member function ‘void std::deque<_Tp, _Alloc>::_M_insert_aux(iterator, _ForwardIterator, _ForwardIterator, size_type) [with _ForwardIterator = std::filesystem::__cxx11::path::iterator; _Tp = std::filesystem::__cxx11::path; _Alloc = std::allocator<std::filesystem::__cxx11::path>]’: /var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/deque.tcc:855:7: internal compiler error: Segmentation fault 855 | } | ^ Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://bugs.gentoo.org/> for instructions. make[6]: *** [Makefile:585: fs_ops.lo] Error 1 Reproducible: Always Steps to Reproduce: 1. emerge 2. 3. Not sure if it is or not a duplicate of #835069. Here, gcc fail during the first compilation stage.
Created attachment 790067 [details] build logs
It's probably not a duplicate of bug 835069 unless you're on prefix (you'd know if you were). Can you follow https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide?
(In reply to Sam James from comment #2) > It's probably not a duplicate of bug 835069 unless you're on prefix (you'd > know if you were). > > Can you follow https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide? Yes, I will try.
Thanks! Could you also include emerge --info?
Created attachment 790070 [details] emerge --info '=sys-devel/gcc-12.1.1_p20220625::gentoo'
dmesg say nothing wrong. memtest86 do nothing, it just hang at startup from grub. When running the emerge compile command into the build directory, I get the same issue but at another place of the code: make --output-sync=line -j3 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' STAGE1_CFLAGS=-freport-bug LIBPATH=/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1 'BOOT_CFLAGS=-m64 -march=native -pipe -O2' bootstrap-lean ... snip ... make[10]: Entering directory '/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/src/c++98' /bin/sh ../../libtool --tag CXX --tag disable-shared --mode=compile /var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/./gcc/xgcc -shared-libgcc -B/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/./gcc -nostdinc++ -L/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/src -L/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/src/.libs -L/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/libsupc++/.libs -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -fno-checking -m32 -I/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/gcc-12-20220625/libstdc++-v3/../libgcc -I/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/include/x86_64-pc-linux-gnu -I/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/include -I/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/gcc-12-20220625/libstdc++-v3/libsupc++ -std=gnu++98 -prefer-pic -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=monetary_members.lo -g -march=native -pipe -O2 -D_GNU_SOURCE -m32 -c -o monetary_members.lo monetary_members.cc libtool: compile: /var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/./gcc/xgcc -shared-libgcc -B/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/./gcc -nostdinc++ -L/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/src -L/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/src/.libs -L/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/libsupc++/.libs -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -fno-checking -m32 -I/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/gcc-12-20220625/libstdc++-v3/../libgcc -I/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/include/x86_64-pc-linux-gnu -I/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/include -I/var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/gcc-12-20220625/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=monetary_members.lo -g -march=native -pipe -O2 -D_GNU_SOURCE -m32 -c monetary_members.cc -fPIC -DPIC -D_GLIBCXX_SHARED -o monetary_members.o during RTL pass: sched2 monetary_members.cc: In member function ‘void std::__cxx11::moneypunct<_CharT, _Intl>::_M_initialize_moneypunct(std::__c_locale, const char*) [with _CharT = char; bool _Intl = false]’: monetary_members.cc:517:5: internal compiler error: Segmentation fault 517 | } | ^ Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://bugs.gentoo.org/> for instructions. make[10]: *** [Makefile:657: monetary_members.lo] Error 1 If I go into that dir and run the /bin/sh command, it succeed.
(In reply to Dominique Michel from comment #6) > dmesg say nothing wrong. > memtest86 do nothing, it just hang at startup from grub. > Try sys-apps/memtest86+?
(In reply to Sam James from comment #7) > > Try sys-apps/memtest86+? All is fine with it. I ran several passes of all tests on all the RAM, that for each 3 CPU modes and with a result of 0 error.
Working when you run the command again is pretty suspicious. What if you try running the /var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/./gcc/xgcc [...] part (full command) when it fails? (Go into the dir first)
(In reply to Sam James from comment #9) > Working when you run the command again is pretty suspicious. What if you try > running the > /var/tmp/notmpfs/portage/sys-devel/gcc-12.1.1_p20220625/work/build/./gcc/ > xgcc [...] part (full command) when it fails? (Go into the dir first) It work fine, and if I run the general make command, it continue until another similar failure. If I run the specific g(x)cc command on that new failure. it work. Also, if I run emerge or 'ebuild gcc-...ebuild compile', the first failure is reproducible, it fail each time on the same file. Maybe I must try to cross-compile gcc-11.3 into another machine, install it over the installed one and see if that solve that bug.
If I boot into that installation, make a chroot into /mnt/gentoo with a stage 3 and some bind mounted directories, and run 'FEATURES="buildpkg" emerge --deep --update --newuse @system', gcc-12.1.1_p20220625 compile fine with the stage3 gcc-11.3.0. Which imply it must not be the running kernel that trigger that bug. That also imply I am stuck with that bug. I have not installed the packages done inside the chroot at that time, but I still have no clue how to reproduce that bug when I follow https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide, that in order to get the needed preprocessed file.
That installation is a 10 years old install. So maybe some obscure bug or some mistake of me triggered that bug with time and multiple updates.