Thanks for pointing that out. It seems that the actual linker command that's segfaulting is: /usr/bin/ld -v --eh-frame-hdr -m elf_x86_64 -shared -o .libs/libstdc++.so. 6.0.29 -L/home/abenson/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/home/ abenson/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/home/abenson/ gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -L/home/abenson/ gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -L/home/abenson/ gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/home/abenson/gcc-build/ x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/home/abenson/gcc-build/./gcc -L/ lib/../lib64 -L/usr/lib/../lib64 -L/home/abenson/gcc-build/./gcc -L/lib/../ lib64 -L/usr/lib/../lib64 /usr/lib/../lib64/crti.o /home/abenson/gcc-build/./ gcc/crtbeginS.o .libs/compatibility.o .libs/compatibility-debug_list.o .libs/ compatibility-debug_list-2.o .libs/compatibility-c++0x.o .libs/compatibility- atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o .libs/compatibility-condvar.o --whole-archive ../libsupc++/.libs/libsupc+ +convenience.a ../src/c++98/.libs/libc++98convenience.a ../src/c++11/.libs/ libc++11convenience.a ../src/c++17/.libs/libc++17convenience.a ../src/c+ +20/.libs/libc++20convenience.a --no-whole-archive -lm -lc -lgcc_s /home/ abenson/gcc-build/./gcc/crtendS.o /usr/lib/../lib64/crtn.o -O1 -z relro --gc- sections --version-script=libstdc++-symbols.ver -soname libstdc++.so.6GNU ld version 2.20.51.0.2-5.42.el6 20100205 On Wednesday, September 22, 2021 2:37:27 PM PDT Jeff Law wrote: > On 9/22/2021 2:25 PM, Andrew Benson via Gcc-help wrote: > > I'm attempting to build GCC (current git master) but am running into a > > segfault. > > > > I'm configuring using: > > > > ./gcc-git/configure --prefix=/home/abenson--enable-languages=c,c++,fortran > > -- disable-multilib > > > > which appears to succeed. Then running make eventually gives > > > > libtool: link: /home/abenson/gcc-build/./gcc/xgcc -shared-libgcc -B/home/ > > abenson/gcc-build/./gcc -nostdinc++ > > -L/home/abenson/gcc-build/x86_64-pc-linux- gnu/libstdc++-v3/src > > -L/home/abenson/gcc-build/x86_64-pc-linux-gnu/libstdc++- v3/src/.libs > > -L/home/abenson/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/ > > libsupc++/.libs -B/home/abenson/Galacticus/Tools/x86_64-pc-linux-gnu/bin/ > > -B/ home/abenson/Galacticus/Tools/x86_64-pc-linux-gnu/lib/ -isystem > > /home/abenson/ Galacticus/Tools/x86_64-pc-linux-gnu/include -isystem > > /home/abenson/ Galacticus/Tools/x86_64-pc-linux-gnu/sys-include > > -fno-checking -fPIC -DPIC -D_GLIBCXX_SHARED -shared -nostdlib > > /usr/lib/../lib64/crti.o /home/abenson/ gcc-build/./gcc/crtbeginS.o > > .libs/compatibility.o .libs/compatibility- debug_list.o > > .libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o > > .libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o > > .libs/ compatibility-chrono.o .libs/compatibility-condvar.o > > -Wl,--whole-archive ../ libsupc++/.libs/libsupc++convenience.a > > ../src/c++98/.libs/libc+ > > +98convenience.a ../src/c++11/.libs/libc++11convenience.a > > ../src/c++17/.libs/ libc++17convenience.a > > ../src/c++20/.libs/libc++20convenience.a -Wl,--no-whole- archive > > -L/home/abenson/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc+ > > +/.libs -L/home/abenson/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src > > -L/ home/abenson/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -lm > > -L/home/ abenson/gcc-build/./gcc -L/lib/../lib64 -L/usr/lib/../lib64 -lc > > -lgcc_s /home/ abenson/gcc-build/./gcc/crtendS.o /usr/lib/../lib64/crtn.o > > -Wl,-O1 -Wl,-z - Wl,relro -Wl,--gc-sections > > -Wl,--version-script=libstdc++-symbols.ver -Wl,- soname > > -Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.29 > > collect2: fatal error: ld terminated with signal 11 [Segmentation fault] > > compilation terminated. > > make[6]: *** [libstdc++.la] Error 1 > > make[6]: Leaving directory `/home/abenson/gcc-build/x86_64-pc-linux-gnu/ > > libstdc++-v3/src' > > make[5]: *** [all-recursive] Error 1 > > make[5]: Leaving directory `/home/abenson/gcc-build/x86_64-pc-linux-gnu/ > > libstdc++-v3/src' > > make[4]: *** [all-recursive] Error 1 > > make[4]: Leaving directory `/home/abenson/gcc-build/x86_64-pc-linux-gnu/ > > libstdc++-v3' > > make[3]: *** [all] Error 2 > > make[3]: Leaving directory `/home/abenson/gcc-build/x86_64-pc-linux-gnu/ > > libstdc++-v3' > > make[2]: *** [all-stage1-target-libstdc++-v3] Error 2 > > make[2]: Leaving directory `/home/abenson/gcc-build' > > make[1]: *** [stage1-bubble] Error 2 > > make[1]: Leaving directory `/home/abenson/gcc-build' > > make: *** [all] Error 2 > > > > Using "git bisect" shows that the first bad commit causing this problem > > is: > > > > https://gcc.gnu.org/git/? > > p=gcc.git;a=commit;h=a68412117fa47786bd82ab79b009ec7933aef476 > > > > Has any one else found this problem, or know how to work around it? > > Note that you're actually getting a segfault in the linker which is part > of the binutils project. While the compiler might be generating > something the linker dislikes, the linker shouldn't be segfaulting. > > Jeff -- * Andrew Benson: https://abensonca.github.io * Galacticus: https://github.com/galacticusorg/galacticus