Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 789081

Summary: dev-util/cppcheck-2.2 fails to build with sci-mathematics/z3-4.8.10 built with gcc-11
Product: Gentoo Linux Reporter: Piotr <piorekf>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal CC: ionen
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log

Description Piotr 2021-05-09 12:27:09 UTC
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
Comment 1 Piotr 2021-05-09 12:27:40 UTC
Created attachment 706704 [details]
build log
Comment 2 Piotr 2021-05-09 12:50:55 UTC
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.
Comment 3 Ionen Wolkens gentoo-dev 2021-05-09 13:04:32 UTC
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