From 78edb6a91788133334ceeeda0c95529df5f40da8 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Mon, 14 Feb 2022 07:42:08 -0500 Subject: [PATCH] rgw: cmake configure error on fedora-37/rawhide see https://kojipkgs.fedoraproject.org//work/tasks/6624/82706624/build.log, excerpted below ... CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle): "rgw_common" of type STATIC_LIBRARY depends on "dbstore" (weak) depends on "sqlite_db" (weak) "dbstore" of type SHARED_LIBRARY depends on "rgw_common" (weak) depends on "sqlite_db" (weak) "sqlite_db" of type SHARED_LIBRARY depends on "rgw_common" (weak) depends on "dbstore" (weak) At least one of these targets is not a STATIC_LIBRARY. Cyclic dependencies are allowed only among static libraries. CMake Generate step failed. Build files cannot be regenerated correctly. ... https://tracker.ceph.com/issues/54266 Signed-off-by: Kaleb S. KEITHLEY --- src/rgw/store/dbstore/CMakeLists.txt | 2 +- src/rgw/store/dbstore/sqlite/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/store/dbstore/CMakeLists.txt b/src/rgw/store/dbstore/CMakeLists.txt index 143ede3c094c9..18e032b73f54f 100644 --- a/src/rgw/store/dbstore/CMakeLists.txt +++ b/src/rgw/store/dbstore/CMakeLists.txt @@ -47,7 +47,7 @@ else() endif() include_directories(${CMAKE_INCLUDE_DIR}) -add_library(dbstore ${dbstore_mgr_srcs}) +add_library(dbstore STATIC ${dbstore_mgr_srcs}) target_link_libraries(dbstore ${CMAKE_LINK_LIBRARIES}) # testing purpose diff --git a/src/rgw/store/dbstore/sqlite/CMakeLists.txt b/src/rgw/store/dbstore/sqlite/CMakeLists.txt index cce59b9ec0aa9..909765e3058b6 100644 --- a/src/rgw/store/dbstore/sqlite/CMakeLists.txt +++ b/src/rgw/store/dbstore/sqlite/CMakeLists.txt @@ -12,5 +12,5 @@ include_directories(${CMAKE_INCLUDE_DIR}) set(SQLITE_COMPILE_FLAGS "-DSQLITE_THREADSAFE=1") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SQLITE_COMPILE_FLAGS}") -add_library(sqlite_db ${sqlite_db_srcs}) +add_library(sqlite_db STATIC ${sqlite_db_srcs}) target_link_libraries(sqlite_db sqlite3 dbstore_lib rgw_common)