[Pkg-rust-maintainers] Bug#1087825: rust-rust-apt: test are failing with apt 2.9.12, not using C++17

Julian Andres Klode jak at debian.org
Tue Nov 19 08:40:42 GMT 2024


Source: rust-rust-apt
Version: 0.7.0-3
Severity: serious
X-Debbugs-Cc: jak at debian.org

It seems rust-rust-apt is not compiling in C++17, but C++17 is the
default C++ level in gcc, and APT now exposes C++17 requirements
in the header.

 73s [rust-apt 0.7.0] cargo:warning=                 from /tmp/tmp.9f2NxaZKcl/target/x86_64-unknown-linux-gnu/debug/build/rust-apt-4a93e49bbf8ab672/out/cxxbridge/sources/rust-apt/src/raw/package.rs.cc:1:
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/macros.h:137:41: error: expected constructor, destructor, or type conversion before ‘;’ token
 73s [rust-apt 0.7.0] cargo:warning=  137 | AptScopeWrapper(F) -> AptScopeWrapper<F>;
 73s [rust-apt 0.7.0] cargo:warning=      |                                         ^
 73s [rust-apt 0.7.0] cargo:warning=In file included from /usr/include/apt-pkg/pkgcache.h:85,
 73s [rust-apt 0.7.0] cargo:warning=                 from /usr/include/apt-pkg/depcache.h:42:
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:49:39: error: expected ‘)’ before ‘const’
 73s [rust-apt 0.7.0] cargo:warning=   49 |     inline StringView(std::string_view const & str): data_(str.data()), size_(str.size()) {}
 73s [rust-apt 0.7.0] cargo:warning=      |                      ~                ^~~~~~
 73s [rust-apt 0.7.0] cargo:warning=      |                                       )
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:149:31: error: expected type-specifier
 73s [rust-apt 0.7.0] cargo:warning=  149 |     inline constexpr operator std::string_view() const { return {data_, size_}; }
 73s [rust-apt 0.7.0] cargo:warning=      |                               ^~~
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h: In function ‘std::ostream& APT::operator<<(std::ostream&, const StringView&)’:
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:154:35: error: ‘string_view’ in namespace ‘std’ does not name a type
 73s [rust-apt 0.7.0] cargo:warning=  154 |     return os << static_cast<std::string_view>(sv);
 73s [rust-apt 0.7.0] cargo:warning=      |                                   ^~~~~~~~~~~
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:154:30: note: ‘std::string_view’ is only available from C++17 onwards
 73s [rust-apt 0.7.0] cargo:warning=  154 |     return os << static_cast<std::string_view>(sv);
 73s [rust-apt 0.7.0] cargo:warning=      |                              ^~~
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h: At global scope:
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:165:29: error: declaration of ‘operator==’ as non-function
 73s [rust-apt 0.7.0] cargo:warning=  165 | template<class = void> bool operator ==(std::string_view const &other, APT::StringView const &that) { return that.operator==(other); }
 73s [rust-apt 0.7.0] cargo:warning=      |                             ^~~~~~~~
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:165:46: error: ‘string_view’ is not a member of ‘std’
 73s [rust-apt 0.7.0] cargo:warning=  165 | template<class = void> bool operator ==(std::string_view const &other, APT::StringView const &that) { return that.operator==(other); }
 73s [rust-apt 0.7.0] cargo:warning=      |                                              ^~~~~~~~~~~
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:165:46: note: ‘std::string_view’ is only available from C++17 onwards
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:165:88: error: expected primary-expression before ‘const’
 73s [rust-apt 0.7.0] cargo:warning=  165 | template<class = void> bool operator ==(std::string_view const &other, APT::StringView const &that) { return that.operator==(other); }
 73s [rust-apt 0.7.0] cargo:warning=      |                                                                                        ^~~~~
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:166:29: error: declaration of ‘operator!=’ as non-function
 73s [rust-apt 0.7.0] cargo:warning=  166 | template<class = void> bool operator !=(std::string_view const &other, APT::StringView const &that) { return that.operator!=(other); }
 73s [rust-apt 0.7.0] cargo:warning=      |                             ^~~~~~~~
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:166:46: error: ‘string_view’ is not a member of ‘std’
 73s [rust-apt 0.7.0] cargo:warning=  166 | template<class = void> bool operator !=(std::string_view const &other, APT::StringView const &that) { return that.operator!=(other); }
 73s [rust-apt 0.7.0] cargo:warning=      |                                              ^~~~~~~~~~~
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:166:46: note: ‘std::string_view’ is only available from C++17 onwards
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:166:88: error: expected primary-expression before ‘const’
 73s [rust-apt 0.7.0] cargo:warning=  166 | template<class = void> bool operator !=(std::string_view const &other, APT::StringView const &that) { return that.operator!=(other); }
 73s [rust-apt 0.7.0] cargo:warning=      |                                                                                        ^~~~~
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:167:75: error: ‘std::string_view’ has not been declared
 73s [rust-apt 0.7.0] cargo:warning=  167 | template<class = void> bool operator !=(APT::StringView const &that, std::string_view const &other) { return that.operator!=(other); }
 73s [rust-apt 0.7.0] cargo:warning=      |                                                                           ^~~~~~~~~~~
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h: In function ‘bool operator!=(const APT::StringView&, const int&)’:
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:167:126: error: cannot convert ‘const int’ to ‘APT::StringView’
 73s [rust-apt 0.7.0] cargo:warning=  167 | template<class = void> bool operator !=(APT::StringView const &that, std::string_view const &other) { return that.operator!=(other); }
 73s [rust-apt 0.7.0] cargo:warning=      |                                                                                                                              ^~~~~
 73s [rust-apt 0.7.0] cargo:warning=      |                                                                                                                              |
 73s [rust-apt 0.7.0] cargo:warning=      |                                                                                                                              const int
 73s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/string_view.h:138:33: note:   initializing argument 1 of ‘bool APT::StringView::operator!=(APT::StringView) const’
 73s [rust-apt 0.7.0] cargo:warning=  138 |     bool operator !=(StringView other) const { return !(*this == other); }
 73s [rust-apt 0.7.0] cargo:warning=      |                      ~~~~~~~~~~~^~~~~
 74s [rust-apt 0.7.0] cargo:warning=In file included from /usr/include/apt-pkg/version.h:22,
 74s [rust-apt 0.7.0] cargo:warning=                 from /tmp/tmp.9f2NxaZKcl/target/x86_64-unknown-linux-gnu/debug/build/rust-apt-4a93e49bbf8ab672/out/cxxbridge/crate/rust-apt/apt-pkg-c/util.h:6,
 74s [rust-apt 0.7.0] cargo:warning=                 from /tmp/tmp.9f2NxaZKcl/target/x86_64-unknown-linux-gnu/debug/build/rust-apt-4a93e49bbf8ab672/out/cxxbridge/crate/rust-apt/apt-pkg-c/package.h:8,
 74s [rust-apt 0.7.0] cargo:warning=                 from /tmp/tmp.9f2NxaZKcl/target/x86_64-unknown-linux-gnu/debug/build/rust-apt-4a93e49bbf8ab672/out/cxxbridge/sources/rust-apt/src/raw/package.rs.cc:2:
 74s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/strutl.h: At global scope:
 74s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/strutl.h:266:52: error: ‘string_view’ in namespace ‘std’ does not name a type
 74s [rust-apt 0.7.0] cargo:warning=  266 | static inline int StringViewCompareFast(const std::string_view & a, const std::string_view & b) {
 74s [rust-apt 0.7.0] cargo:warning=      |                                                    ^~~~~~~~~~~
 74s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/strutl.h:266:47: note: ‘std::string_view’ is only available from C++17 onwards
 74s [rust-apt 0.7.0] cargo:warning=  266 | static inline int StringViewCompareFast(const std::string_view & a, const std::string_view & b) {
 74s [rust-apt 0.7.0] cargo:warning=      |                                               ^~~
 74s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/strutl.h:266:80: error: ‘string_view’ in namespace ‘std’ does not name a type
 74s [rust-apt 0.7.0] cargo:warning=  266 | static inline int StringViewCompareFast(const std::string_view & a, const std::string_view & b) {
 74s [rust-apt 0.7.0] cargo:warning=      |                                                                                ^~~~~~~~~~~
 74s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/strutl.h:266:75: note: ‘std::string_view’ is only available from C++17 onwards
 74s [rust-apt 0.7.0] cargo:warning=  266 | static inline int StringViewCompareFast(const std::string_view & a, const std::string_view & b) {
 74s [rust-apt 0.7.0] cargo:warning=      |                                                                           ^~~
 74s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/strutl.h: In function ‘int StringViewCompareFast(const int&, const int&)’:
 74s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/strutl.h:267:11: error: request for member ‘size’ in ‘a’, which is of non-class type ‘const int’
 74s [rust-apt 0.7.0] cargo:warning=  267 |     if (a.size() != b.size())
 74s [rust-apt 0.7.0] cargo:warning=      |           ^~~~
 74s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/strutl.h:267:23: error: request for member ‘size’ in ‘b’, which is of non-class type ‘const int’
 74s [rust-apt 0.7.0] cargo:warning=  267 |     if (a.size() != b.size())
 74s [rust-apt 0.7.0] cargo:warning=      |                       ^~~~
 74s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/strutl.h:268:18: error: request for member ‘size’ in ‘a’, which is of non-class type ‘const int’
 74s [rust-apt 0.7.0] cargo:warning=  268 |         return a.size() - b.size();
 74s [rust-apt 0.7.0] cargo:warning=      |                  ^~~~
 74s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/strutl.h:268:29: error: request for member ‘size’ in ‘b’, which is of non-class type ‘const int’
 74s [rust-apt 0.7.0] cargo:warning=  268 |         return a.size() - b.size();
 74s [rust-apt 0.7.0] cargo:warning=      |                             ^~~~
 74s [rust-apt 0.7.0] cargo:warning=/usr/include/apt-pkg/strutl.h:270:14: error: request for member ‘compare’ in ‘a’, which is of non-class type ‘const int’
 74s [rust-apt 0.7.0] cargo:warning=  270 |     return a.compare(b);
 74s [rust-apt 0.7.0] cargo:warning=      |              ^~~~~~~
 74s [rust-apt 0.7.0] 

-- System Information:
Debian Release: trixie/sid
  APT prefers plucky
  APT policy: (500, 'plucky'), (500, 'oracular-security'), (100, 'plucky-proposed')
Architecture: amd64 (x86_64)

Kernel: Linux 6.11.0-9-generic (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en



More information about the Pkg-rust-maintainers mailing list