From: Kaleb S. KEITHLEY Date: Mon, 14 Feb 2022 12:42:08 +0000 (-0500) Subject: rgw: cmake configure error on fedora-37/rawhide X-Git-Tag: v17.2.8~117^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=722cfd467cfe1e5df073dfbeb37553f1b7d97e1a;p=ceph.git 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 (cherry picked from commit 78edb6a91788133334ceeeda0c95529df5f40da8) --- diff --git a/src/rgw/store/dbstore/CMakeLists.txt b/src/rgw/store/dbstore/CMakeLists.txt index 2af2638c0a9e..942643046f17 100644 --- a/src/rgw/store/dbstore/CMakeLists.txt +++ b/src/rgw/store/dbstore/CMakeLists.txt @@ -48,7 +48,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 cce59b9ec0aa..909765e3058b 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)