From c9f38d52cbc170f3d87617a143b4b5b21e86c45f Mon Sep 17 00:00:00 2001 From: Yoshinori Matsunobu Date: Fri, 20 Jan 2023 12:54:15 -0800 Subject: [PATCH] Fix static MyRocks library linkage error with gcc Upstream commit ID: https://github.com/facebook/mysql-5.6/commit/c75bf30d86a214a3a7106e5df0df47a130306c2f PS-8755: Merge percona-202301 (https://jira.percona.com/browse/PS-8755) Summary: Commit 8a8708b71da379daea13fcae90e3bb1af5d60f32 (MyRocks to support both dynamic and static plugins) caused compiler error on Ubuntu 22.04 with gcc (Issue #1262). This diff fixes it. squash with: D41313174 Reviewed By: lth Differential Revision: D42646920 fbshipit-source-id: 16e77bc5b0cbcc464be7ce587b37da78b4b3de8f --- storage/rocksdb/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt index 6787ed8abdc6..4ddb3ee677c8 100644 --- a/storage/rocksdb/CMakeLists.txt +++ b/storage/rocksdb/CMakeLists.txt @@ -328,6 +328,8 @@ IF (ROCKSDB_DYNAMIC_PLUGIN) ELSE() MYSQL_ADD_PLUGIN(rocksdb_se ${ROCKSDB_SOURCES} STORAGE_ENGINE DEFAULT STATIC_ONLY LINK_LIBRARIES ${rocksdb_static_libs}) + # to fix linkage error on partition_base + TARGET_LINK_LIBRARIES(rocksdb_se sql_main) ENDIF() IF (NOT HAVE_EXTERNAL_ROCKSDB)