Bug #59078 libmysqlclient.so has not version information in default
Submitted: 21 Dec 2010 4:25 Modified: 1 Jul 2011 18:46
Reporter: Sharl Jimh.Tsin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.5.8 OS:Linux (centos)
Assigned to: CPU Architecture:Any

[21 Dec 2010 4:25] Sharl Jimh.Tsin
Description:
i compiled & installed MySQL 5.5.8 GA in default,and i found that the libraries generated have not provide the version information.

so,when i start the PHP-FPM,it failed.

[root@PowerPC mysql-5.5.8]# php-fpm
php-fpm: /usr/local/mysql/lib/libmysqlclient.so.16: no version
information available (required by php-fpm)

How to repeat:
download MySQL5.5.8 source tarball,

unpack it.

cmake . && make && make install

add mysql library folder path to ld.so.conf

ldconfig -v

run php-fpm

ERROR now.

Suggested fix:
no idea.
[21 Dec 2010 22:41] Sveta Smirnova
Thank you for the report.

Please send us compile options you used to compile MySQL.
[21 Dec 2010 22:55] Sveta Smirnova
Please ignorre previous comment: found "cmake . && make && make install"

But still is interesting how you compiled php-fpm: it works fine for me.
[22 Dec 2010 2:48] Sharl Jimh.Tsin
you know,the PHP-FPM is bundled with php package.

so just compile php with "--enable-fpm" string.
[22 Dec 2010 11:01] Sveta Smirnova
Thank you for the feedback.

You need to run php-fpm with same version of MySQL libraries which you used when compiled php-fpm. This is not MySQL bug. Please re-compile php-fpm with MySQL 5.5.8

Closed as "Not a Bug"
[9 Feb 2011 1:26] Clint Byrum
I'm not sure that I believe this is not a bug. The ABI of the library has actually changed dramatically.

If the SONAME was not changed, I should be able to run programs compiled against the previous version against the new library, and likewise, I should be able to run programs compiled against this version against the prior release. Requiring a recompile means that the ABI changed, and so the library's major version should be bumped to 17.

There are symbols present in libmysqlclient.so.16.0.0 from 5.1.54 that are not present in the new libraries, and there are new symbols in the new libraries. Likewise, there are exposed functions in the headers from 5.1 that are not present anymore in the 5.5 libraries:

Observe this test I just did on Linux (ubuntu natty alpha2):

objdump -T /usr/lib/libmysqlclient.so.16.0.0 | awk '{print $7}'|grep -v '^_'|sort -u > syms.5.1

and then against a similarly built 5.5 (see https://code.launchpad.net/~clint-fewbar/ubuntu/natty/mysql-5.1/mysql-5.5-packaging for the full build used)

objdump -T debian/tmp/usr/lib/libmysqlclient.so.16.0.0 | awk '{print $7}'|grep -v '^_'|sort -u > syms.5.5

Now when I diff these files:

--- syms.5.1	2011-02-08 16:40:42.073416000 -0800
+++ syms.5.5	2011-02-08 16:44:21.143416000 -0800
@@ -1,5 +1,20 @@
 
-TERMINATE
+PSI_hook
+PSI_server
+THR_COND_threads
+THR_KEY_mysys
+THR_LOCK_charset
+THR_LOCK_heap
+THR_LOCK_isam
+THR_LOCK_lock
+THR_LOCK_malloc
+THR_LOCK_myisam
+THR_LOCK_myisam_mmap
+THR_LOCK_net
+THR_LOCK_open
+THR_LOCK_threads
+THR_LOCK_time
+THR_thread_count
 TIME_to_ulonglong
 TIME_to_ulonglong_date
 TIME_to_ulonglong_datetime
@@ -9,12 +24,14 @@
 alloc_dynamic
 alloc_root
 allocate_dynamic
+args_separator

... the list goes on and on.

Any lines different from the 5.1 file, might have been used in the past, will cause a failure when trying to run against the 5.5 version of libmysqlclient.so.16.0.0, and likewise, if compiled and linked against the 5.5 version of libmysqlclient.so.16.0.0, will result in failing to run against the old libmysqlclient.so.16.0.0. It doesn't matter if they API stayed the same, if it requires a recompile to make linking programs work again, its an ABI change.

So your remedy is correct, the user must recompile everything to use the new library. But mysql needs to bump the SONAME to 17 as well so that packagers and users can ship both libraries until such time as they have recompiled and tested everything against the new one!
[11 Feb 2011 6:47] Norbert Tretkowski
According to #41728 (similar issue during a 5.0 minor update), this is a bug which needs to be fixed.
[17 Feb 2011 18:55] MySQL Verification Team
This is a bug in Building/Packaging.  This is "Not a Bug" as for "version information in default" far as the libmysql source is concerned. libmysqlclient.so version will be bumped.
[1 Jul 2011 18:46] Joerg Bruehe
This was handled in the context of bug#60061,
closed on 2011-March-9.

Sadly, this bug number was not mentioned in the change, so closing this bug was forgotten.