https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: sci-libs/hipSPARSE-5.0.2 fails to compile. Discovered on: amd64 (internal ref: ci)
Created attachment 776423 [details] build.log build log and emerge --info
Error(s) that match a know pattern in addition to what has been reported in the summary: FAILED: clients/tests/CMakeFiles/hipsparse-test.dir/__/common/utility.cpp.o /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/experimental/bits/fs_path.h:1209:9: error: 'begin' is missing exception specification 'noexcept'
This bug is caused by clang-14 and clang-13 cannot compile gcc-11.3 experimental/filesystem. A minimum reproduction is: ```c++ #include <iostream> #include <experimental/filesystem> int main() { std::cout<<"Hi"<<std::endl; } Compile with clang-14 returns: ``` /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.1/include/g++-v11/experimental/bits/fs_path.h:1209:9: error: 'begin' is missing exception specification 'noexcept' path::begin() const ^ /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.1/include/g++-v11/experimental/bits/fs_path.h:428:14: note: previous declaration is here iterator begin() const noexcept; ^ /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.1/include/g++-v11/experimental/bits/fs_path.h:1217:9: error: 'end' is missing exception specification 'noexcept' path::end() const ^ /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.1/include/g++-v11/experimental/bits/fs_path.h:429:14: note: previous declaration is here iterator end() const noexcept; ^ 2 errors generated. ``` Both =sys-devel/gcc-11.3.0 and =sys-devel/gcc-11.3.1_p20220603 can cause the issue. gcc-11.2 does not suffer, because: --- 11.2.1/include/g++-v11/experimental/bits/fs_path.h +++ 11.3.1/include/g++-v11/experimental/bits/fs_path.h @@ -425,8 +425,8 @@ namespace __detail class iterator; typedef iterator const_iterator; - iterator begin() const; - iterator end() const; + iterator begin() const noexcept; + iterator end() const noexcept; /// @cond undocumented // Create a basic_string by reading until a null character.
The corresponding upstream commits are https://github.com/gcc-mirror/gcc/commit/944da70a5d1cdc5bd4327b2d32420f57b6883985 and https://github.com/gcc-mirror/gcc/commit/42eff613d0c10f88dc7a44b14981876401a09981 It is a surprise that the headers are still not consistent.
(In reply to Benda Xu from comment #4) > The corresponding upstream commits are > > https://github.com/gcc-mirror/gcc/commit/ > 944da70a5d1cdc5bd4327b2d32420f57b6883985 > > and > > https://github.com/gcc-mirror/gcc/commit/ > 42eff613d0c10f88dc7a44b14981876401a09981 > > > It is a surprise that the headers are still not consistent. The 42eff613d0 commit is a sequel of 944da70a, but gcc-11.3.0 only have the former but not the latter.
Hi Toolchain Team, I have confirmed that this is a gcc bug. > The 42eff613d0 commit is a sequel of 944da70a, but gcc-11.3.0 only have the former but not the latter. In my previous comment, the two commits should have been reversed. 944da70a (authored on 2021-09-17) is the sequel of 42eff613d0 (on 2022-04-01). By applying By applying 42eff613d0c10f88 to gcc-11.3.0, both hipSPARSE and rocSPARSE can compile.
(In reply to Benda Xu from comment #6) > Hi Toolchain Team, > > I have confirmed that this is a gcc bug. > > > The 42eff613d0 commit is a sequel of 944da70a, but gcc-11.3.0 only have the former but not the latter. > > In my previous comment, the two commits should have been reversed. 944da70a > (authored on 2021-09-17) is the sequel of 42eff613d0 (on 2022-04-01). By > applying > > By applying 42eff613d0c10f88 to gcc-11.3.0, both hipSPARSE and rocSPARSE can > compile. Thanks. As per my github comment on the PR, please report this upstream on their Bugzilla and link it here if you can. You're able to better describe the issue than I can as you've just looked into it. Thanks a lot!
(In reply to Benda Xu from comment #6) > Hi Toolchain Team, > > I have confirmed that this is a gcc bug. > > > The 42eff613d0 commit is a sequel of 944da70a, but gcc-11.3.0 only have the former but not the latter. > > In my previous comment, the two commits should have been reversed. 944da70a > (authored on 2021-09-17) is the sequel of 42eff613d0 (on 2022-04-01). By > applying My bad.... 944da70a (authored on 2021-09-27) is the sequel of 42eff613d0 (on 2021-09-17).