Bug #34231 libmysqlclient contains libz in MySQL-devel-community-5.1.22-0.rhel3.i386.rpm
Submitted: 1 Feb 2008 14:29 Modified: 19 Mar 2008 16:36
Reporter: Helmut Wirth Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Packaging Severity:S2 (Serious)
Version:5.1, 5.0, 6.0 OS:Linux
Assigned to: Alexander Nozdrin CPU Architecture:Any

[1 Feb 2008 14:29] Helmut Wirth
Description:
The compiled (static) libmysqlclient libraries contain also the link objects from zlib, which prevents rebuilding php with the mysql 5.1.22 community devel package installed.

How to repeat:
rebuild from src rpm on RHEL3, install, then look to the "ar tv" output for 
libmysqlclient.a:

...
rw-r--r-- 8972/8972   4212 Sep 25 05:30 2007 adler32.o
rw-r--r-- 8972/8972   4772 Sep 25 05:30 2007 compress.o
rw-r--r-- 8972/8972  15668 Sep 25 05:30 2007 crc32.o
rw-r--r-- 8972/8972  27048 Sep 25 05:30 2007 deflate.o
rw-r--r-- 8972/8972  20312 Sep 25 05:30 2007 gzio.o
rw-r--r-- 8972/8972  16020 Sep 25 05:30 2007 infback.o
rw-r--r-- 8972/8972   8064 Sep 25 05:30 2007 inffast.o
rw-r--r-- 8972/8972  24688 Sep 25 05:30 2007 inflate.o
rw-r--r-- 8972/8972   6220 Sep 25 05:30 2007 inftrees.o
rw-r--r-- 8972/8972  28060 Sep 25 05:30 2007 trees.o
rw-r--r-- 8972/8972   4184 Sep 25 05:30 2007 uncompr.o
rw-r--r-- 8972/8972   4400 Sep 25 05:30 2007 zutil.o

These link object's clearly shouldn't be there

Suggested fix:
Repair configure / Makefiles so the zlib link objekts will not be linked together with libmysqlclient.a
[13 Feb 2008 15:52] Susanne Ebrecht
Verified as described using bk tree for MySQL 5.0.58, 5.1.24-rc and 6.0.5
[19 Mar 2008 15:12] Georgi Kodinov
I think it's a good idea to use a specific zlib version for stability and compatibility reasons. 
And since it's not complicated to build from source (and use another value for --with-zlib-dir) I don't think we're going to change the way we build our binaries.
[19 Mar 2008 16:30] Helmut Wirth
But so the main issue remains - rebuilding php on RHEL5 / CentOS5 (even from the
original distribution src rpms) will fail when the original mysql-devel-community packages are installed. I'm aware that this could be fixed through changing the php build configuration, but is this really the way to go (breaking the default build of distribution packages?)
[19 Mar 2008 16:36] Helmut Wirth
But so the main issue remains - rebuilding php on RHEL3 / CentOS3 (even from the
original distribution src rpms) will fail when the original mysql-devel-community packages are installed. I'm aware that this could be fixed through changing the php build configuration, but is this really the way to go (breaking the default build of distribution packages?)
[15 Jul 2008 17:39] Kevin Regan
We are running into the same issue when compiling the MySQL++ package.  It seems like a bad idea to force all downstream packages to change the way they build.
[15 Jul 2008 17:51] Daniel Fischer
I'm sorry, but we can't influence how dependent packages are built. If you find that a package that depends on MySQL doesn't work, please report a bug to its maintainer.

We have been including libz for a long time now, this isn't something that has changed overnight three months ago.
[15 Jul 2008 17:55] Kevin Regan
Well, 5.0.45 works, whereas later versions don't.  That does seem like an overnight change.  This is going to cause a lot of pain to a lot of people.
[15 Jul 2008 18:02] Kevin Regan
Actually, the 5.0.51a version was working for us as well.  The current version on your website is 5.0.51b.

So, it is quite likely that folks won't notice this until you bump up the 5.0.x community addition to the version that contains this issue (we are seeing it in 5.0.64).