Skip to content

Commit 8fcb951

Browse files
committed
Bug#32886430 MYSQL CLUSTER DOCKER BUILD FAILS FOR NDBXFRM (ERROR: UNDEFINED REFERENCE)
Description =========== Builds of "rpm-dock" docker images for MySQL Cluster fails with lots of undefined reference errors. [ 67%] Linking CXX executable ../../../runtime_output_directory/ndbxfrm ... storage/ndb/include/util/ndbxfrm_readfile.h:32: error: undefined reference to 'ndb_openssl_evp::operation::~operation()' The cause is that ndbxfrm tool are incorrectly linked against ndbclient instead of the internal convenience libraries for its use of among other ndbxfrm_readfile and ndb_file classes. When linked with static ndbclient library these dependencies are implicitly brought in. While linking against dynamic ndbclient library these classes are not brought in, which is correct since these classes is not part of public NdbAPI. The use of dynamic linking of ndbclients is controlled by providing NDB_UTILS_LINK_DYNAMIC=1 in packaging/rpm-docker/mysql.spec.in. Note that the "tar-gz" docker build do not fail since it uses static linking. How To Repeat ============= Check PB2:mysql-trunk-cluster-docker at May 13 2021. Or build with NDB_UTILS_LINK_DYNAMIC on $ cmake -DWITH_NDBCLUSTER=1 -DNDB_UTILS_LINK_DYNAMIC=1 /path/to/source $ make Suggested Fix ============= ndbxfrm should not link against ndbclient at all, rather to the internal convenience libraries ndbgeneral (for ndbxfrm_readfile and more) and ndbportlib (for ndb_file). Also ndb_restore should link with convenience libraries ndbgeneral and ndbportlib (but also ndbclient since it uses the ndbapi). Change-Id: I58c273a40b56b75d1ec81b6d5ddec0997cb4ab27
1 parent 047e3f4 commit 8fcb951

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

storage/ndb/tools/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ NDB_ADD_EXECUTABLE(ndb_restore
155155
${LINK_NDBCLIENT}
156156
COMPONENT ClusterTools
157157
ENABLE_EXPORTS
158+
LINK_LIBRARIES ndbgeneral ndbportlib
158159
)
159160
NDB_ADD_EXECUTABLE(ndb_import
160161
ndb_import.cpp
@@ -206,9 +207,9 @@ NDB_ADD_EXECUTABLE(ndb_move_data
206207

207208
NDB_ADD_EXECUTABLE(ndbxfrm
208209
ndbxfrm.cpp
209-
${LINK_NDBCLIENT}
210210
COMPONENT ClusterTools
211211
ENABLE_EXPORTS
212+
LINK_LIBRARIES ndbgeneral ndbportlib
212213
)
213214

214215
IF(NOT WIN32 AND NOT SOLARIS)

0 commit comments

Comments
 (0)