Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1912913
Summary: | gdb fails to build in Fedora rawhide | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> | ||||
Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED NEXTRELEASE | QA Contact: | |||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | aoliva, dmalcolm, fweimer, jakub, jan.kratochvil, jwakely, keiths, kevinb, law, mpolacek, msebor, nickc, patrick, pemensik, pmuldoon, sergiodj, sipoyare | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
URL: | https://koschei.fedoraproject.org/package/gdb | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2021-03-22 21:26:15 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1868278, 1890881, 1913339, 1926779 | ||||||
Attachments: |
|
Description
Miro Hrončok
2021-01-05 15:15:42 UTC
I'm able to reproduce this problem. I think the actual bug is in some other package, but will do some more investigation further before reassigning it... Created attachment 1745081 [details]
Test case showing problem with either g++ or libstdc++
I think that there is a bug in either g++ or libstdc++.
I was able to simplify the problematic file from the gdb sources to the attachment t.cc.
Instructions for compiling it are in the file (attachment), but I'll show it here as well.
Compile t.cc with the following command:
g++ -Werror -O2 -g -Wp,-D_GLIBCXX_ASSERTIONS -c t.cc
On f33, using gcc-c++-10.2.1-9.fc33.x86_64, it compiles without error.
However, on rawhide, using gcc-c++-11.0.0-0.11.fc34.x86_64, I see the following error:
[kevinb-fedora@rawhide-1 1912913]$ g++ -Werror -O2 -g -Wp,-D_GLIBCXX_ASSERTIONS -c t.cc
In file included from /usr/include/c++/11/string:40,
from t.cc:9:
In static member function ‘static std::char_traits<char>::char_type* std::char_traits<char>::copy(std::char_traits<char>::char_type*, const char_type*, std::size_t)’,
inlined from ‘static void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/11/bits/basic_string.h:351:21,
inlined from ‘static void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/11/bits/basic_string.h:346:7,
inlined from ‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/11/bits/basic_string.tcc:481:20,
inlined from ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/11/bits/basic_string.h:1445:19,
inlined from ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/11/bits/basic_string.h:676:28,
inlined from ‘std::string p()’ at t.cc:17:9:
/usr/include/c++/11/bits/char_traits.h:402:56: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ reading 9 bytes from a region of size 1 [-Werror=stringop-overread]
402 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
I'm switching the component (package) to gcc. I'm not positive that this is where the problem lies, but it seems like a good place to start. GCC PR 98465 tracks this warning: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465 I've pushed a change to gdb's spec file which allows the gdb package to build again. The release number has also been bumped (though not by me). That said, I have not made a new release because my testing shows a large number of regressions over the release built with an earlier version of gcc/g++. I'm investigating those regressions now. I'd prefer to keep this bug open until the gcc bug is fixed. The spec file change mentioned above should be viewed as a workaround that should be kept in place only until gcc is fixed. Dear Maintainer, your package has an open Fails To Build From Source bug for Fedora 34. Action is required from you. If you can fix your package to build, perform a build in koji, and either create an update in bodhi, or close this bug without creating an update, if updating is not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to acknowledge this. If you have already fixed this issue, please close this Bugzilla report. Following the policy for such packages [2], your package will be orphaned if this bug remains in NEW state more than 8 weeks (not sooner than 2021-03-02). A week before the mass branching of Fedora 35 according to the schedule [3], any packages not successfully rebuilt at least on Fedora 33 will be retired regardless of the status of this bug. [1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/ [2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/ [3] https://fedorapeople.org/groups/schedule/f-35/f-35-key-tasks.html This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34. Similar warning appeared on kyua (bug #1926779), which is broken on several architectures since f34 rebuild. It might have also other issues, but this one also. FWIW, my testing shows that this problem has been fixed in both Fedora 34 and Rawhide. Indeed. |