diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt
index 57cb2a5b94..57a9ceb78b 100644
--- src/rgw/CMakeLists.txt
+++ src/rgw/CMakeLists.txt
@@ -182,7 +182,7 @@ if (WITH_RADOSGW_BEAST_FRONTEND AND WITH_RADOSGW_BEAST_OPENSSL)
 endif()
 
 add_executable(radosgw rgw_main.cc)
-target_link_libraries(radosgw radosgw_a librados
+target_link_libraries(radosgw radosgw_a rgw_a librados
   cls_rgw_client cls_lock_client cls_refcount_client
   cls_log_client cls_statelog_client cls_timeindex_client
   cls_version_client cls_replica_log_client cls_user_client
