Bug #1652 undefined non-weak symbols in libmysqlclient_r.so
Submitted: 24 Oct 2003 16:45 Modified: 19 Nov 2003 7:58
Reporter: Christian Hammers (Silver Quality Contributor) (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.15 OS:Linux (Debian GNU/Linux)
Assigned to: Lenz Grimmer CPU Architecture:Any

[24 Oct 2003 16:45] Christian Hammers
Description:
This is from a Debian bug report available as http://bugs.debian.org/215973

The bug seems only to apply for libmysqlclient_r.so, not for the non _r version.

-------------------------------
From: "J.H.M. Dassen (Ray)" <fsmla@xinara.org>
-------------------------------
ldd -r shows /usr/lib/libmysqlclient_r.so.12.0.0 to have undefined non-weak
symbols, (in particular, from /usr/lib/libcrypto.so.0.9.7) which means it
has incomplete inter-library dependency information and that users of
binaries that link against it won't profit much from the load time speedups
that can be gained through prelink(8).

Please see
        http://sources.redhat.com/ml/libc-alpha/2003-05/msg00034.html
        http://sources.redhat.com/ml/libc-alpha/2003-05/msg00035.html
for more information on this issue and change your library to be linked
against all its dependencies explicitly.

This type of bug is considered as a release critical issue for sarge by the
releasemaster; see http://people.debian.org/~ajt/sarge_rc_policy.txt (point 
5f).

Also please note that this is mostly a copy-and-paste bug report - if your
package contains other libraries, they may well have similar issues as well.

How to repeat:
ldd -r /usr/lib/libmysqlclient_r.so.12.0.0
        libz.so.1 => /usr/lib/libz.so.1 (0x40050000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x4005f000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4008c000)
        libm.so.6 => /lib/libm.so.6 (0x400a1000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x400c4000)
        libc.so.6 => /lib/libc.so.6 (0x40114000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
undefined symbol: ERR_get_error_line_data       (/usr/lib/libmysqlclient_r.so.12.0.0)
undefined symbol: SSL_set_fd    (/usr/lib/libmysqlclient_r.so.12.0.0)
undefined symbol: SSL_set_connect_state (/usr/lib/libmysqlclient_r.so.12.0.0)
undefined symbol: X509_free     (/usr/lib/libmysqlclient_r.so.12.0.0)
undefined symbol: SSL_shutdown  (/usr/lib/libmysqlclient_r.so.12.0.0)
undefined symbol: X509_NAME_oneline     (/usr/lib/libmysqlclient_r.so.12.0.0)
.....

Suggested fix:
not known. let me know if you need further information.
[27 Oct 2003 12:51] Christian Hammers
A quick patch could be:

--- libmysql_r/Makefile.in.ch   2003-10-27 22:35:23.000000000 +0100
+++ libmysql_r/Makefile.in  2003-10-27 22:47:19.000000000 +0100
@@ -135,7 +135,7 @@
 LDFLAGS = @LDFLAGS@
 LIBDL = @LIBDL@
 LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
+LIBS = @LIBS@ @openssl_libs@
 LIBTOOL = @LIBTOOL@
 LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
 LM_CFLAGS = @LM_CFLAGS@
[19 Nov 2003 7:58] Lenz Grimmer
Thanks for the report and the patch! Applied. It should appear in the next
4.0 release (4.0.17).