Bug #65919 mysql_client_test is not linked correctly

Submitted: 17 Jul 2012 9:08 Modified: 5 Feb 2013 8:33
Reporter: Alan Lastname Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.6.5-m8 OS:Any
Assigned to: CPU Architecture:Any

[17 Jul 2012 9:08] Alan Lastname
Description:
Compilation of mysql 5.6.5-m8 including the embedded library fails while trying to link mysql_client_test_embedded.

How to repeat:
bash$ cmake . \
-DBUILD_CONFIG=mysql_release \
-DINSTALL_LAYOUT=RPM \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSYSCONFDIR=/etc \
-DINSTALL_LIBDIR=lib \
-DINSTALL_PLUGINDIR=lib/mysql/plugin \
-DINSTALL_MANDIR=man \
-DWITH_LIBWRAP=0 \
-DWITH_SSL=system \
-DWITH_ZLIB=system \
-DMYSQL_UNIX_ADDR=/var/run/mysql/mysql.sock \
-DWITH_FEDERATED_STORAGE_ENGINE=OFF

bash$ make

...

[ 98%] Building CXX object libmysqld/CMakeFiles/sql_embedded.dir/__/sql/unireg.cc.o
/usr/ports/work/mysql-embedded/src/mysql-5.6.5-m8/sql/unireg.cc: In function 'bool mysql_create_frm(THD*, const char*, const char*, const char*, HA_CREATE_INFO*, List<Create_field>&, uint, KEY*, handler*)':
/usr/ports/work/mysql-embedded/src/mysql-5.6.5-m8/sql/unireg.cc:328:3: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/ports/work/mysql-embedded/src/mysql-5.6.5-m8/sql/unireg.cc:334:3: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/ports/work/mysql-embedded/src/mysql-5.6.5-m8/sql/unireg.cc:344:5: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/ports/work/mysql-embedded/src/mysql-5.6.5-m8/sql/unireg.cc:370:5: warning: dereferencing type-punned pointer will break strict-aliasing rules
Linking CXX static library libsql_embedded.a
[ 98%] Built target sql_embedded
[ 98%] Generating mysqlserver_depends.c
Scanning dependencies of target mysqlserver
[ 98%] Building C object libmysqld/CMakeFiles/mysqlserver.dir/mysqlserver_depends.c.o
Linking C static library libmysqld.a
/usr/bin/ar: creating /usr/ports/work/mysql-embedded/src/mysql-5.6.5-m8/libmysqld/libmysqld.a
[ 98%] Built target mysqlserver
Scanning dependencies of target mysql_client_test_embedded
[ 98%] Building C object libmysqld/examples/CMakeFiles/mysql_client_test_embedded.dir/__/__/tests/mysql_client_test.c.o
/usr/ports/work/mysql-embedded/src/mysql-5.6.5-m8/tests/mysql_client_test.c: In function 'test_bug9478':
/usr/ports/work/mysql-embedded/src/mysql-5.6.5-m8/tests/mysql_client_test.c:14577:7: warning: dereferencing type-punned pointer will break strict-aliasing rules
Linking CXX executable mysql_client_test_embedded
../libmysqld.a(md5.cc.o): In function `compute_md5_hash':
md5.cc:(.text+0x1f): undefined reference to `my_MD5Init'
md5.cc:(.text+0x35): undefined reference to `my_MD5Update'
md5.cc:(.text+0x44): undefined reference to `my_MD5Final'
collect2: ld returned 1 exit status
make[2]: *** [libmysqld/examples/mysql_client_test_embedded] Error 1
make[1]: *** [libmysqld/examples/CMakeFiles/mysql_client_test_embedded.dir/all] Error 2
make: *** [all] Error 2
[17 Jul 2012 12:12] MySQL Verification Team
Thank you for the bug report. Verified on Centos 6.2:

/usr/bin/ar: creating /home/miguel/Downloads/mysql-5.6.5-m8/libmysqld/libmysqld.a
../libmysqld.a(md5.cc.o): In function `compute_md5_hash':
/home/miguel/Downloads/mysql-5.6.5-m8/sql/md5.cc:65: undefined reference to `my_MD5Init'
/home/miguel/Downloads/mysql-5.6.5-m8/sql/md5.cc:65: undefined reference to `my_MD5Update'
/home/miguel/Downloads/mysql-5.6.5-m8/sql/md5.cc:65: undefined reference to `my_MD5Final'
collect2: ld returned 1 exit status
make[2]: *** [libmysqld/examples/mysql_client_test_embedded] Error 1
make[1]: *** [libmysqld/examples/CMakeFiles/mysql_client_test_embedded.dir/all] Error 2
make: *** [all] Error 2
[miguel@izalco mysql-5.6.5-m8]$
[5 Feb 2013 8:32] Tor Didriksen
I can repeat in 5.6.5-m8 but not in newer versions.
There have been a couple of worklogs, and multiple bugfixes,
in this area.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.