Bug #4831 libmysqlclient linked against specific version of libssl and libcrypto
Submitted: 30 Jul 2004 16:33 Modified: 2 Aug 2004 13:52
Reporter: Eric Brunson Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:4.1.3 OS:Linux (GNU/Linux)
Assigned to: Assigned Account CPU Architecture:Any

[30 Jul 2004 16:33] Eric Brunson
Perhaps there is a compatibilty reason for this linkage, but the dependency in the RPM and the linkage of libmysqlclient against the specific version 0.9.6 of libssl and libcrypto require installation with --nodeps on an up to date Fedora Core-2, Fedora Core-2 and RH8.  

It also makes it impossible to link new binaries against libmysqlclient.so once installed.  I haven't tried kludging the link against 0.9.7a libraries, but the linkage seems to work when I fake a link againt the 0.9.6a libs.

How to repeat:
rpm -i MySQL-shared-compat-4.1.3-0.i386.rpm -> failed dependency on libssl.so.0.9.6


(clipped from building postfix with mysql support)
gcc -I/usr/include/mysql -o output some.o files.o -L/usr/lib/mysql -lmysqlclient -> ld fails when not finding libopenssl.so.0.9.6 (this is a libmysqlclient.so requirement, not a postfix build rule).

Suggested fix:
At a minimum, link against /lib/libssl.so.2 which is a symlink to libssl.so.0.9.6* and make dependencies libssl >= 0.9.6 and libssl < 0.9.7.

This will require the minimum version of 0.9.6 for openssl, but the requirement of libssl.so.2 will keep it from linking against 0.9.7, because the link has been bumped to libssl.so.4.

Unless there is some very specific requirement for 0.9.6 and not 0.9.6+. 0.9.6a included a change of des_encrypt() to des_encrypt1() to prevent name clashes, but libmysqlclient doesn't seem to use this symbol, I believe it may only be used internally.  

Releases 0.9.6[a-h] incorporate many important bug and security fixes, but 0.9.7 has been the production release for a while and has had one bug fix release so far.  Future releases of MySQL should probably be tested and linked against 0.9.7 and require libssl >= 0.9.6.  

Fedora Core ships with 0.9.7a, but has a compatibility package for 0.9.6a.
[30 Jul 2004 19:44] Matthew Lord
Dear Sir,

Thank you for a great bug report!  

You shouldn't have problems when building mysql.  I've build 4.1.3 with ssl support
on RH 9 using the --with-openssl and --with-vio options.

booty-[~]$ldd /usr/local/mysql/libexec/mysqld | grep ssl
        libssl.so.4 => /lib/libssl.so.4 (0x4003f000)
booty-[~]$ls -l /lib/libssl.so.4 
lrwxrwxrwx    1 root     root           16 Aug 13  2003 /lib/libssl.so.4 -> libssl.so.0.9.7a

You can see that it automatically linked against 0.9.7a although I have the 0.9.6 library as well.
Do you know exactly how mysql was being configured and built by the postfix install?

I'm going to check the RPM now.

Best Regards
[30 Jul 2004 23:01] Matthew Lord
The  MySQL-shared-4.1.3-0.i386.rpm
does have a dependancy on libssl.so.0.9.6.

I'm not sure how this should be handled but I will leave it up to the engineering team.
[30 Jul 2004 23:03] Matthew Lord

The same is true for libcrypto as the user mentions.  Here's a full list of the deps:

mysqldev@build:~/mlord> rpm -qpi --requires MySQL-shared-4.1.3-0.i386.rpm 
Name        : MySQL-shared                 Relocations: (not relocateable)
Version     : 4.1.3                             Vendor: MySQL AB
Release     : 0                             Build Date: Wed 30 Jun 2004 02:53:21 PM MEST
Install date: (not installed)               Build Host: build.mysql.com
Group       : Applications/Databases        Source RPM: MySQL-4.1.3-0.src.rpm
Size        : 2246158                          License: GPL
Packager    : Lenz Grimmer <build@mysql.com>
URL         : http://www.mysql.com/
Summary     : MySQL - Shared libraries
Description :
This package contains the shared libraries (*.so*) which certain
languages and applications need to dynamically load and use MySQL.
[2 Aug 2004 13:52] Lenz Grimmer
This bug has been marked as a duplicate of BUG#1043