The complete error message is like: /usr/x86_64-pc-linux-gnu/bin/ar: /var/tmp/portage-ondisk/portage/sys-devel/gcc-8.3.0-r3/work/build/x86_64-pc-linux-gnu/libstdc++-v3/ src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/lib64/libz3.so.4.8) ../libtool: line 1132: 85538 Segmentation fault (core dumped) /usr/x86_64-pc-linux-gnu/bin/ar rc .libs/libstdc++.a [list of object files] At an earlier build failure (dated at Jan 9) the library pointed to by the required by part inside the parens was /usr/lib/llvm/9/lib64/../lib64/libLLVMCodeGen.so.9, so I wouldn't count on the libz3 library having sth to do with this. The error first popped up during my upgrade from amd64 to ~amd64, after an update from dev-libs/isl-0.21 to first isl-0.22 and stayed after updating to isl-0.22-r1 a few days later, but I'm not sure, it's related to this update. Dmesg contains the lines [199661.381024] ar[3307960]: segfault at 0 ip 00007f3307a0e9a3 sp 00007ffea53b1170 error 4 in libpthread-2.30.so[7f3307a0e000+13000] [199661.381030] Code: 82 e8 02 00 00 e0 ff ff ff be 18 00 00 00 48 89 ba d8 02 00 00 48 89 ba e0 02 00 00 b8 11 01 00 00 0f 05 48 8b 05 15 86 01 00 <48> 8b 00 64 48 89 04 25 98 06 00 00 48 8d 05 ba c9 01 00 48 8d 8a after the failure. Reproducible: Always I append build log and emerge --info as files.
Created attachment 603108 [details] gcc-8.3.0-r3:20200112-173417.log.lzma build log
Created attachment 603110 [details] emerge-info-gcc-8.3.0-r3.txt output of emerge --info
> ld GNU gold (Gentoo 2.33.1 p2 2.33.1) 1.16 I guess your GNU gold is linked against libstdc++ from gcc-9.2.0. While gcc-8.3.0 is build it attempts to use libstdc++ from just built gcc-8.3.0 and fails.
Do you have sys-devel/llvmgold installed by chance?
It is as you say. But how can I the solve this? Binutils doesn't have a static USE flag, to temporarily disable dynamic linking against libstdc++. Also I tried using "LD=/usr/bin/ld.bfd emerge gcc:8.3.0" with no success. Do I need to downgrade binutils to 2.32 and binutils-config to 5.1-r1, so I have the --linker flag to binutils-config and re-emerge gcc:9.2.0 using ld.bfd?
Yes, I have llvmgold installed
(In reply to Bernd from comment #5) > Do I need to downgrade binutils to 2.32 and binutils-config to 5.1-r1, so I > have the --linker flag to binutils-config and re-emerge gcc:9.2.0 using > ld.bfd? Note: the program that SIGSEGVs for you is not 'ld', but 'ar'. Having --linker (or changing handling of ld) will have no no effect here. sys-devel/llvmgold injects huge chunk of c++ code into every binutils binary via plugins mechanism: be it ar, ld, strip, etc. > It is as you say. But how can I the solve this? Binutils doesn't have a > static USE flag, to temporarily disable dynamic linking against libstdc++. > Also I tried using "LD=/usr/bin/ld.bfd emerge gcc:8.3.0" with no success. A few worlarounds that might work: 1. Uninstall sys-devel/llvmgold for a short time of rebuilding gcc. sys-devel/llvmgold only provides a symlink. 2. Rebuild sys-devel/binutils with USE=-plugins. [1.] should be lightest way to do it.
*** This bug has been marked as a duplicate of bug 644772 ***
Thanks, the first workaround did the job.