cppcheck fails to build with error: /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libz3.so.4.8.10.0: undefined reference to `std::__throw_bad_array_n ew_length()@GLIBCXX_3.4.29' collect2: error: ld returned 1 exit status Reproducible: Always
Created attachment 706704 [details] build log
After rebuilding z3 with gcc-10 (and later qtcore due to similar error with /usr/lib64/libQt5Core.so.5.15.2) cppcheck built fine. z3 builds fine with gcc-11 but apparently there are problems later with linking. This bug report should be probably renamed.
This would happen with almost any package providing C++ libraries, and this isn't something new (been happening since gcc4 or so). If you downgrade gcc, typically need to rebuild everything using libstdc++ https://wiki.gentoo.org/wiki/Upgrading_GCC#libstdc.2B.2B.so.6:_version_.60GLIBCXX_3.4.15.27_not_found