[Bug 1995569] [NEW] std::experimental::filesystem missing exception specification noexcept build error regression (libstdc++-11-dev 11.3.0-1ubuntu1~22.04 upgrade)
Andreas Mohr
1995569 at bugs.launchpad.net
Thu Nov 3 08:36:59 UTC 2022
Public bug reported:
Summary:
On Ubuntu 22.04.1 LTS using clang 11, I'm newly (REGRESSION) getting build errors on std::experimental::filesystem consumption cases:
.
.
.
In file included from ............./../../Compiler/StdFileSystem.h:37:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/experimental/filesystem:38:
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/experimental/bits/fs_path.h:1209:9: error: 'begin' is missing exception specification 'noexcept'
path::begin() const
This very likely has been introduced by (dpkg.log)
2022-10-27 13:18:37 upgrade libstdc++-11-dev:amd64 11.2.0-19ubuntu1 11.3.0-1ubuntu1~22.04
Details:
No issues seen (working build) until very recently.
Analysis:
extraction of
libstdc++-11-dev_11.2.0-19ubuntu1_amd64.deb
( http://security.ubuntu.com/ubuntu/pool/main/g/gcc-11/ ), where
usr/include/c++/11/experimental/bits/fs_path.h
has:
// iterators
class iterator;
typedef iterator const_iterator;
iterator begin() const;
.
.
.
inline path::iterator
path::begin() const
{
if (_M_type == _Type::_Multi)
return iterator(this, _M_cmpts.begin());
return iterator(this, false);
}
, as opposed to 11.3.0-1ubuntu1~22.04:
// iterators
class iterator;
typedef iterator const_iterator;
iterator begin() const noexcept;
.
.
.
inline path::iterator
path::begin() const
{
if (_M_type == _Type::_Multi)
return iterator(this, _M_cmpts.begin());
return iterator(this, false);
}
(witness "noexcept" specification newly added, but
INCONSISTENTLY:
at declaration location only, and missing at implementation site)
Apparently fixed by
git://gcc.gnu.org/git/gcc.git commit
42eff613d0c10f "libstdc++: Add 'noexcept' to path::iterator members"
(but currently published for gcc >= 12 release tags only!).
A workaround might be
applying
-Wno-missing-exception-spec
( https://clang.llvm.org/docs/DiagnosticsReference.html )
in all std::experimental::filesystem consumption cases (only!).
Or being forced to
instead actively (source / config modification) switch to
std::filesystem (which
does not seem to have this INCONSISTENCY bug, in
/usr/include/c++/11/bits/fs_path.h
).
$ lsb_release -rd
Description: Ubuntu 22.04.1 LTS
Release: 22.04
$ apt-cache policy libstdc++-11-dev
libstdc++-11-dev:
Installed: 11.3.0-1ubuntu1~22.04
Candidate: 11.3.0-1ubuntu1~22.04
Version table:
*** 11.3.0-1ubuntu1~22.04 500
500 http://de.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
100 /var/lib/dpkg/status
11.2.0-19ubuntu1 500
500 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
Thank you for all your awesome service efforts!
P.S.: I got
"In what package did you find this bug?"
"libstdc++-11-dev" does not exist in Ubuntu. Please choose a different package. If you're unsure, please select "I don't know"
( at https://launchpad.net/ubuntu/+source/gcc-11/+filebug )
Though libstdc++-11-dev clearly *is* a "package".
--> this process is overly confusing, thus
possibly should be corrected.
** Affects: gcc-11 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-11 in Ubuntu.
https://bugs.launchpad.net/bugs/1995569
Title:
std::experimental::filesystem missing exception specification noexcept
build error regression (libstdc++-11-dev 11.3.0-1ubuntu1~22.04
upgrade)
Status in gcc-11 package in Ubuntu:
New
Bug description:
Summary:
On Ubuntu 22.04.1 LTS using clang 11, I'm newly (REGRESSION) getting build errors on std::experimental::filesystem consumption cases:
.
.
.
In file included from ............./../../Compiler/StdFileSystem.h:37:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/experimental/filesystem:38:
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/experimental/bits/fs_path.h:1209:9: error: 'begin' is missing exception specification 'noexcept'
path::begin() const
This very likely has been introduced by (dpkg.log)
2022-10-27 13:18:37 upgrade libstdc++-11-dev:amd64 11.2.0-19ubuntu1 11.3.0-1ubuntu1~22.04
Details:
No issues seen (working build) until very recently.
Analysis:
extraction of
libstdc++-11-dev_11.2.0-19ubuntu1_amd64.deb
( http://security.ubuntu.com/ubuntu/pool/main/g/gcc-11/ ), where
usr/include/c++/11/experimental/bits/fs_path.h
has:
// iterators
class iterator;
typedef iterator const_iterator;
iterator begin() const;
.
.
.
inline path::iterator
path::begin() const
{
if (_M_type == _Type::_Multi)
return iterator(this, _M_cmpts.begin());
return iterator(this, false);
}
, as opposed to 11.3.0-1ubuntu1~22.04:
// iterators
class iterator;
typedef iterator const_iterator;
iterator begin() const noexcept;
.
.
.
inline path::iterator
path::begin() const
{
if (_M_type == _Type::_Multi)
return iterator(this, _M_cmpts.begin());
return iterator(this, false);
}
(witness "noexcept" specification newly added, but
INCONSISTENTLY:
at declaration location only, and missing at implementation site)
Apparently fixed by
git://gcc.gnu.org/git/gcc.git commit
42eff613d0c10f "libstdc++: Add 'noexcept' to path::iterator members"
(but currently published for gcc >= 12 release tags only!).
A workaround might be
applying
-Wno-missing-exception-spec
( https://clang.llvm.org/docs/DiagnosticsReference.html )
in all std::experimental::filesystem consumption cases (only!).
Or being forced to
instead actively (source / config modification) switch to
std::filesystem (which
does not seem to have this INCONSISTENCY bug, in
/usr/include/c++/11/bits/fs_path.h
).
$ lsb_release -rd
Description: Ubuntu 22.04.1 LTS
Release: 22.04
$ apt-cache policy libstdc++-11-dev
libstdc++-11-dev:
Installed: 11.3.0-1ubuntu1~22.04
Candidate: 11.3.0-1ubuntu1~22.04
Version table:
*** 11.3.0-1ubuntu1~22.04 500
500 http://de.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
100 /var/lib/dpkg/status
11.2.0-19ubuntu1 500
500 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
Thank you for all your awesome service efforts!
P.S.: I got
"In what package did you find this bug?"
"libstdc++-11-dev" does not exist in Ubuntu. Please choose a different package. If you're unsure, please select "I don't know"
( at https://launchpad.net/ubuntu/+source/gcc-11/+filebug )
Though libstdc++-11-dev clearly *is* a "package".
--> this process is overly confusing, thus
possibly should be corrected.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-11/+bug/1995569/+subscriptions
More information about the foundations-bugs
mailing list