From: Daniel Gryniewicz Date: Wed, 11 Dec 2019 18:41:15 +0000 (-0500) Subject: rgw: Add more spawn linking X-Git-Tag: v14.2.22~22^2~5^2~1^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=18b8b9839c437e9b7df97650d6d16111fc7bba99;p=ceph.git rgw: Add more spawn linking Signed-off-by: Daniel Gryniewicz (cherry picked from commit 4ca4201b7fe3e0ca172548204b4b888a0908d162) Signed-off-by: Mauricio Faria de Oliveira Conflicts: src/cls/CMakeLists.txt src/test/rgw/CMakeLists.txt - Add spawn headers to includes to fix the two build errors below. No linking is needed since the files don't use 'spawn::' at all. In file included from /git/ceph/src/rgw/rgw_common.h:31:0, from /git/ceph/src/cls/otp/cls_otp_client.cc:25: /git/ceph/src/common/async/yield_context.h:31:10: fatal error: spawn/spawn.hpp: No such file or directory #include ^~~~~~~~~~~~~~~~~ compilation terminated. src/cls/CMakeFiles/cls_otp_client.dir/build.make:62: recipe for target 'src/cls/CMakeFiles/cls_otp_client.dir/otp/cls_otp_client.cc.o' failed In file included from /git/ceph/src/rgw/rgw_dmclock_scheduler.h:21:0, from /git/ceph/src/rgw/rgw_dmclock_sync_scheduler.h:18, from /git/ceph/src/test/rgw/test_rgw_dmclock_scheduler.cc:17: /git/ceph/src/common/async/yield_context.h:31:10: fatal error: spawn/spawn.hpp: No such file or directory #include ^~~~~~~~~~~~~~~~~ compilation terminated. src/test/rgw/CMakeFiles/unittest_rgw_dmclock_scheduler.dir/build.make:62: recipe for target 'src/test/rgw/CMakeFiles/unittest_rgw_dmclock_scheduler.dir/test_rgw_dmclock_scheduler.cc.o' failed --- diff --git a/src/cls/CMakeLists.txt b/src/cls/CMakeLists.txt index d62273d4c4a2..dbe0a1b8a793 100644 --- a/src/cls/CMakeLists.txt +++ b/src/cls/CMakeLists.txt @@ -86,6 +86,10 @@ if (WITH_RADOSGW) otp/cls_otp_types.cc ) add_library(cls_otp_client STATIC ${cls_otp_client_srcs}) + if (WITH_BOOST_CONTEXT) + target_include_directories(cls_otp_client PRIVATE + $) + endif() endif (WITH_RADOSGW) # cls_refcount diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt index 009e0a2bcbf0..80380586d723 100644 --- a/src/rgw/CMakeLists.txt +++ b/src/rgw/CMakeLists.txt @@ -152,7 +152,8 @@ target_include_directories(rgw_common SYSTEM PUBLIC "services") target_include_directories(rgw_common PUBLIC "${CMAKE_SOURCE_DIR}/src/dmclock/support/src") if(WITH_BOOST_CONTEXT) - target_link_libraries(rgw_common PUBLIC spawn) + target_include_directories(rgw_common PRIVATE + $) endif() if(WITH_LTTNG) @@ -387,6 +388,9 @@ endif() if(WITH_RADOSGW_KAFKA_ENDPOINT) target_link_libraries(rgw_admin_user PRIVATE RDKafka::RDKafka) endif() +if(WITH_BOOST_CONTEXT) + target_link_libraries(rgw_admin_user PRIVATE spawn) +endif() if(WITH_TESTS) add_executable(ceph_rgw_jsonparser diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 2bb6e86124eb..5c249c83185e 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -301,6 +301,10 @@ target_link_libraries(ceph_test_librgw_file_nfsns ${UNITTEST_LIBS} ${EXTRALIBS} ) +if(WITH_BOOST_CONTEXT) + target_link_libraries(ceph_test_librgw_file_nfsns spawn) +endif() + # ceph_test_librgw_file_aw (nfs write transaction [atomic write] tests) add_executable(ceph_test_librgw_file_aw @@ -325,6 +329,9 @@ target_link_libraries(ceph_test_librgw_file_marker ${UNITTEST_LIBS} ${EXTRALIBS} ) +if(WITH_BOOST_CONTEXT) + target_link_libraries(ceph_test_librgw_file_marker spawn) +endif() # ceph_test_rgw_token add_executable(ceph_test_rgw_token diff --git a/src/test/librados/CMakeLists.txt b/src/test/librados/CMakeLists.txt index 4fc53d240661..d4d1c48d5519 100644 --- a/src/test/librados/CMakeLists.txt +++ b/src/test/librados/CMakeLists.txt @@ -133,6 +133,9 @@ add_executable(ceph_test_rados_api_tier_pp $) target_link_libraries(ceph_test_rados_api_tier_pp librados global ${UNITTEST_LIBS} Boost::system radostest-cxx) +if(WITH_BOOST_CONTEXT) + target_link_libraries(ceph_test_rados_api_tier_pp spawn) +endif() add_executable(ceph_test_rados_api_snapshots snapshots.cc) diff --git a/src/test/rgw/CMakeLists.txt b/src/test/rgw/CMakeLists.txt index 663763b1c26b..554444f8edd4 100644 --- a/src/test/rgw/CMakeLists.txt +++ b/src/test/rgw/CMakeLists.txt @@ -150,6 +150,8 @@ target_link_libraries(unittest_rgw_dmclock_scheduler radosgw_a dmclock) if(WITH_BOOST_CONTEXT) target_compile_definitions(unittest_rgw_dmclock_scheduler PRIVATE BOOST_COROUTINES_NO_DEPRECATION_WARNING) target_link_libraries(unittest_rgw_dmclock_scheduler Boost::coroutine Boost::context) + target_include_directories(unittest_rgw_dmclock_scheduler PRIVATE + $) endif() if(WITH_RADOSGW_AMQP_ENDPOINT)