Repository navigation
changes to compile with latest seastar and C++20 - #45198
Merged
Merged
Conversation
Contributor
Author
|
this is an attempt to move #45133 forward. but it seems there is more hurdles ahead. probably it's worthy to get the partial work merged before the whole tree compiles with |
Contributor
Contributor
this looks like a similar issue to the bufferlist iterator one i fixed in c2d942f by replacing the implicit conversion with a converting constructor |
athanatos
approved these changes
Feb 28, 2022
to address following FTBFS:
/usr/bin/ccache /usr/bin/clang++-13 -DBOOST_ALL_NO_LIB -DBOOST_ASIO_DISABLE_CONCEPTS -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_T$
In file included from /var/ssd/ceph/src/crimson/os/seastore/seastore_types.cc:4:
In file included from /var/ssd/ceph/src/crimson/os/seastore/seastore_types.h:14:
In file included from /var/ssd/ceph/src/include/denc.h:47:
/var/ssd/ceph/src/include/buffer.h:98:37: error: no template named 'unique_ptr' in namespace 'std'; did you mean 'boost::movelib::unique_ptr'?
struct unique_leakable_ptr : public std::unique_ptr<T, ceph::nop_delete<T>> {
^~~~~~~~~~~~~~~
boost::movelib::unique_ptr
/opt/ceph/include/boost/move/unique_ptr.hpp:354:7: note: 'boost::movelib::unique_ptr' declared here
class unique_ptr
^
Signed-off-by: Kefu Chai <[email protected]>
seastar::metrics::label was dropped in a recent change. quote from the commit message which removed this type: > In practice, it's an over-kill and just add information in the reporting > layer. see also da395f31989a1ee333e489ffb251fc1152f12f0a in seastar repo Signed-off-by: Kefu Chai <[email protected]>
otherwise the aggregate initialization for this type would fail to work on C++20, as the user-declared ctor is defined for this struct. Signed-off-by: Kefu Chai <[email protected]>
std::iterator<> is deprecated in C++17, so let's just define the required traits directly. Signed-off-by: Kefu Chai <[email protected]>
std::iterator<> is deprecated in C++17, so let's just define the required traits directly. Signed-off-by: Kefu Chai <[email protected]>
to silence warning from clang13 with -std=c++20, like
ceph/src/crimson/osd/replicated_recovery_backend.cc:1098:21: warning: loop variable '[off, len]' creates a copy from type 'const std::pair<const unsigned long, unsigned long>' [-Wrange-loop-construct]
for (const auto [off, len] : extents) {
^
ceph/src/crimson/osd/replicated_recovery_backend.cc:1098:10: note: use reference type 'const std::pair<const unsigned long, unsigned long> &' to prevent copying
for (const auto [off, len] : extents) {
^~~~~~~~~~~~~~~~~~~~~~~
&
Signed-off-by: Kefu Chai <[email protected]>
see also 3fd91d7 Signed-off-by: Kefu Chai <[email protected]>
after the restructure of seastar source tree, we have to include metrics.hh for accessing the metrics types. Signed-off-by: Kefu Chai <[email protected]>
to avoid the pain of fixing the FTBFS with C++20 like
/var/ssd/ceph/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc:141:19: error: use of overloaded operator '!=' is ambiguous (with operand types 'crimson::os::seastore::omap_manager::StringKVInnerN$
assert(child_pt != iter_end());
~~~~~~~~ ^ ~~~~~~~~~~
/usr/include/assert.h:93:27: note: expanded from macro 'assert'
(static_cast <bool> (expr) \
^~~~
/var/ssd/ceph/src/crimson/os/seastore/omap_manager/btree/string_kv_node_layout.h:380:10: note: candidate function
bool operator==(const iter_t &rhs) const {
^
/var/ssd/ceph/src/crimson/os/seastore/omap_manager/btree/string_kv_node_layout.h:380:10: note: candidate function (with reversed parameter order)
also, to be explicit is advisable.
Signed-off-by: Kefu Chai <[email protected]>
std::iterator<> is deprecated in C++17, so let's just define the required traits directly. Signed-off-by: Kefu Chai <[email protected]>
…is happy if compiled with C++20, C++ concept is enabled. to ensure the constraints required by when_all_impl() is fulfilled, we need to specialize is_tuple_of_futures<> for interruptible_future. Signed-off-by: Kefu Chai <[email protected]>
Signed-off-by: Kefu Chai <[email protected]>
Contributor
Author
|
jenkins test make check |
4 of 14 tasks
bazaah
added a commit
to bazaah/ceph
that referenced
this pull request
Feb 25, 2025
This trait has been deprecated in C++17, with users instructed to migrate to defining each associated type when implementing an iterator. This quiets the _GLIBCXX17_DEPRECATED warnings when compiling the project on a sufficiently new gcc. This follows on from previous efforts in 8b8a96d (ceph#45198). References: ceph#45198 References: https://www.fluentcpp.com/2018/05/08/std-iterator-deprecated/ Signed-off-by: Paul Stemmet <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox