-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
circleci: build with C++20 modules enabled #1998
Merged
Merged
Conversation
This file contains 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
|
should be fixed by #1999 |
tchaikov
force-pushed
the
ci-with-cxx-modules
branch
from
December 29, 2023 01:02
f3e58db
to
603ab3d
Compare
tchaikov
force-pushed
the
ci-with-cxx-modules
branch
4 times, most recently
from
December 29, 2023 01:29
4a26418
to
98d2e18
Compare
This comment was marked as resolved.
This comment was marked as resolved.
tchaikov
force-pushed
the
ci-with-cxx-modules
branch
3 times, most recently
from
December 29, 2023 03:34
4f074bb
to
6354c11
Compare
@avikivity hi Avi, thank you for updating the build image. with which, this change is able to build. but in order to address the build failures when building the seastar module, more fixes are needed. i am including them in this changeset. if you think we should have them in separated PR(s), i am happy to extract them out. |
in 6bdef1e, Crypto++ was dropped in favor of GnuTLS, but we failed to update seastar.cc to include the gnutls/crypto.h. also, <compare> is used in the implementation. when compiling seastar C++20 module, all global headers should be included in seastar.cc. so, in this change, the used headers are included. see aa1c8b3. Signed-off-by: Kefu Chai <[email protected]>
include the header before it is "tainted" by the building environment, to avoid the warning like: ``` FAILED: src/CMakeFiles/seastar-module.dir/core/alien.cc.o /usr/bin/clang++-17 -DBOOST_NO_CXX98_FUNCTION_BASE -DFMT_SHARED -DSEASTAR_API_LEVEL=7 -DSEASTAR_COROUTINES_ENABLED -DSEASTAR_MODULE -DSEASTAR_SCHEDULING_GROUPS_COUNT=16 -DSEASTAR_SSTRING -Dseastar_module_EXPORTS -I/home/circleci/project/include -I/home/circleci/project/build/debug/gen/include -I/home/circleci/project/src -g -std=c++20 -fPIC -U_FORTIFY_SOURCE -MD -MT src/CMakeFiles/seastar-module.dir/core/alien.cc.o -MF src/CMakeFiles/seastar-module.dir/core/alien.cc.o.d @src/CMakeFiles/seastar-module.dir/core/alien.cc.o.modmap -o src/CMakeFiles/seastar-module.dir/core/alien.cc.o -c /home/circleci/project/src/core/alien.cc In module 'seastar' imported from /home/circleci/project/src/core/alien.cc:33: /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/compare:398:22: error: 'std::__detail::__common_cmp_cat' has different definitions in different modules; definition in module 'seastar.<global>' first difference is function body 398 | constexpr auto __common_cmp_cat() | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ 399 | { | ~ 400 | constexpr unsigned __cats = (__cmp_cat_id<_Ts> | ...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 401 | // If any Ti is not a comparison category type, U is void. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 402 | if constexpr (__cats & 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~ 403 | return; | ~~~~~~~ 404 | // Otherwise, if at least one Ti is std::partial_ordering, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 405 | // U is std::partial_ordering. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 406 | else if constexpr (bool(__cats & __cmp_cat_id<partial_ordering>)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 407 | return partial_ordering::equivalent; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 408 | // Otherwise, if at least one Ti is std::weak_ordering, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 409 | // U is std::weak_ordering. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 410 | else if constexpr (bool(__cats & __cmp_cat_id<weak_ordering>)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 411 | return weak_ordering::equivalent; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 412 | // Otherwise, U is std::strong_ordering. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 413 | else | ~~~~ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/compare:398:22: note: but in '' found a different body 398 | constexpr auto __common_cmp_cat() | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ 399 | { | ~ 400 | constexpr unsigned __cats = (__cmp_cat_id<_Ts> | ...); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 401 | // If any Ti is not a comparison category type, U is void. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 402 | if constexpr (__cats & 1) | ~~~~~~~~~~~~~~~~~~~~~~~~~ 403 | return; | ~~~~~~~ 404 | // Otherwise, if at least one Ti is std::partial_ordering, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 405 | // U is std::partial_ordering. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 406 | else if constexpr (bool(__cats & __cmp_cat_id<partial_ordering>)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 407 | return partial_ordering::equivalent; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 408 | // Otherwise, if at least one Ti is std::weak_ordering, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 409 | // U is std::weak_ordering. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 410 | else if constexpr (bool(__cats & __cmp_cat_id<weak_ordering>)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 411 | return weak_ordering::equivalent; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 412 | // Otherwise, U is std::strong_ordering. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 413 | else | ~~~~ 1 error generated. ``` Signed-off-by: Kefu Chai <[email protected]>
in 6bdef1e, Crypto++ was dropped, and later the updated build image removed it as well. but it still exists in seastar.cc and src/CMakeLists.txt, let's drop them as well. Signed-off-by: Kefu Chai <[email protected]>
add one more build with the combination of "clang++17", C++20, debug with C++20 modules enabled. so that we can at least test with C++20 modules build without doubling the size of the test matrix. Signed-off-by: Kefu Chai <[email protected]>
tchaikov
force-pushed
the
ci-with-cxx-modules
branch
from
December 29, 2023 05:51
6354c11
to
6bc4db7
Compare
graphcareful
pushed a commit
to graphcareful/seastar
that referenced
this pull request
Mar 20, 2024
add one more build with the combination of "clang++17", C++20, debug with C++20 modules enabled. so that we can at least test with C++20 modules build without doubling the size of the test matrix. Closes scylladb#1998 * github.com:scylladb/seastar: circleci: build with C++20 modules enabled seastar.cc: replace cryptopp with gnutls when building seastar modules alien: include used header seastar.cc: include used headers in the global purview
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.
add one more build with the combination of "clang++17", C++20, debug with C++20 modules enabled. so that we can at least test with C++20 modules build without doubling the size of the test matrix.