php-mysql from remi does not work with Percona-Server

Bug #1331402 reported by Aleksis Obuh
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
New
Undecided
Unassigned
5.6
Triaged
High
Unassigned
5.7
Triaged
High
Unassigned

Bug Description

After the library libmysqlclient.so.18 was renamed (http://www.percona.com/doc/percona-server/5.6/release-notes/Percona-Server-5.6.16-64.1.html#renaming-the-libmysqlclient-to-libperconaserverclient) to libperconaserverclient.so.18 php-fpm from remi repository (and I think other packages) does not see libmysql:

[root@centos5-php-test mysql]# php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysql.so' - /usr/lib64/libmysqlclient.so.18: version `libmysqlclient_16' not found (required by /usr/lib64/php/modules/mysql.so) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqli.so' - /usr/lib64/libmysqlclient.so.18: version `libmysqlclient_18' not found (required by /usr/lib64/php/modules/mysqli.so) in Unknown on line 0

Soname:

[root@centos5-php-test mysql]# readelf -a libperconaserverclient.so.18 | grep soname
 0x000000000000000e (SONAME) Library soname: [libperconaserverclient.so.18]

[root@centos5-php-test mysql]# rpm -q Percona-Server-shared-56.x86_64 --provides
libmysqlclient.so.18()(64bit)
libperconaserverclient.so.18()(64bit)
libperconaserverclient.so.18(libperconaserverclient_18)(64bit)

Seems php-mysql does not see the library that provides Percona-Server-shared-56.x86_64

Revision history for this message
Jericho Rivera (jericho-rivera) wrote :
Download full text (3.2 KiB)

On Centos 6.5 regular PHP packages work:

[root@vagrant-centos65 vagrant]# php -v
PHP 5.3.3 (cli) (built: Dec 11 2013 03:29:57)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[root@vagrant-centos65 vagrant]# mysql --version
mysql Ver 14.14 Distrib 5.6.17-66.0, for Linux (x86_64) using EditLine wrapper
[root@vagrant-centos65 vagrant]# rpm -qa Percona-Server-shared-56 --provides
libmysqlclient.so.18()(64bit)
libperconaserverclient.so.18()(64bit)
libperconaserverclient.so.18(libperconaserverclient_18)(64bit)
Percona-Server-shared-56 = 5.6.17-rel66.0.el6
Percona-Server-shared-56(x86-64) = 5.6.17-rel66.0.el6

But when remi repository is installed and try to do a yum update I get the following:

[root@vagrant-centos65 vagrant]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.linux.duke.edu
 * epel: mirror.cogentco.com
 * extras: mirror.linux.duke.edu
 * remi: mirrors.mediatemple.net
 * updates: centost5.centos.org
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.3.3-27.el6_5 will be updated
---> Package php.x86_64 0:5.4.29-3.el6.remi will be an update
---> Package php-cli.x86_64 0:5.3.3-27.el6_5 will be updated
---> Package php-cli.x86_64 0:5.4.29-3.el6.remi will be an update
---> Package php-common.x86_64 0:5.3.3-27.el6_5 will be updated
---> Package php-common.x86_64 0:5.4.29-3.el6.remi will be an update
---> Package php-fpm.x86_64 0:5.3.3-27.el6_5 will be updated
---> Package php-fpm.x86_64 0:5.4.29-3.el6.remi will be an update
---> Package php-mysql.x86_64 0:5.3.3-27.el6_5 will be updated
---> Package php-mysql.x86_64 0:5.4.29-3.el6.remi will be an update
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4.29-3.el6.remi.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: php-mysql-5.4.29-3.el6.remi.x86_64
---> Package php-pdo.x86_64 0:5.3.3-27.el6_5 will be updated
---> Package php-pdo.x86_64 0:5.4.29-3.el6.remi will be an update
--> Running transaction check
---> Package Percona-XtraDB-Cluster-shared-56.x86_64 1:5.6.15-25.5.759.rhel6 will be installed
--> Processing Conflict: 1:Percona-XtraDB-Cluster-shared-56-5.6.15-25.5.759.rhel6.x86_64 conflicts Percona-Server-shared-56
--> Finished Dependency Resolution
Error: Percona-XtraDB-Cluster-shared-56 conflicts with Percona-Server-shared-56-5.6.17-rel66.0.el6.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

However, if I remove Percona Server 56 and disable Percona repo then run a yum update then install PS 5.6 back then everything works.
[root@vagrant-centos65 vagrant]# php -v
PHP 5.4.29 (cli) (built: Jun 5 2014 16:07:48)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

[root@vagrant-centos65 vagrant]# rpm -q Percona-Server-shared-56 --provides
libmysqlclient.so.18()(64bit)
libperconaserverclient.so.18()(64bit)
libperconaserverclient.so.18(libperconaserverclient_18)(64bit)
Percona-Server-shared-56 = 5.6.17-r...

Read more...

Revision history for this message
Aleksis Obuh (axis-78) wrote :

I think you also have libmysqlclient.so.18 from remi repo. Usually at /usr/lib64/mysql
But Percona library usually at /usr/lib64

You can check with:
cd /usr/lib64/php/modules
ldd mysql.so

which library uses your php-mysql package ...

Revision history for this message
Jericho Rivera (jericho-rivera) wrote :

@Aleksis

Indeed, I have libmysqlclient.so.18 on /usr/lib64/mysql and libperconaserverclient.so.18 on /usr/lib64

And in my case php-mysql uses libmysqlclient.so.18
[root@vagrant-centos65 modules]# ldd mysql.so | grep mysql
 libmysqlclient.so.18 => /usr/lib64/mysql/libmysqlclient.so.18 (0x00007f3f37a20000)

Aleksis Obuh (axis-78)
description: updated
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Why is Percona-Server-shared-56 installed for libmysqlclient.so.18 dependency.
Percona-Server-shared-55 should be installed for it. If it got pulled
automatically, then it is probably due to https://bugs.launchpad.net/percona-server/+bug/1329911

Secondly, even then, symbol versioning looks broken. Any applications which depend
on that or verify it (like postfix) may still complain, as the readelf also
confirms.

Revision history for this message
Aleksis Obuh (axis-78) wrote :

Right the same with 55, difference is in --provides :

5.6.17:
[root@centos5-php-test yum.repos.d]# rpm -q Percona-Server-shared-56.x86_64 --provides
libmysqlclient.so.18()(64bit)
libperconaserverclient.so.18()(64bit)
libperconaserverclient.so.18(libperconaserverclient_18)(64bit)
Percona-Server-shared-56 = 5.6.17-rel66.0.el6
Percona-Server-shared-56(x86-64) = 5.6.17-rel66.0.el6

and

5.6.16:
[root@centos5-php-test yum.repos.d]# rpm -q Percona-Server-shared-56-5.6.16-rel64.2.el6.x86_64 --provides
libmysqlclient.so.18()(64bit)
libperconaserverclient.so.18()(64bit)
libperconaserverclient.so.18(libperconaserverclient_18)(64bit)
Percona-Server-shared-56 = 5.6.16-rel64.2.el6
Percona-Server-shared-56(x86-64) = 5.6.16-rel64.2.el6

and

5.6.15
[root@centos5-php-test yum.repos.d]# rpm -q Percona-Server-shared-56.x86_64 --provides
libmysqlclient.so.18()(64bit)
libmysqlclient.so.18(libmysqlclient_16)(64bit)
libmysqlclient.so.18(libmysqlclient_18)(64bit)
libmysqlclient.so.18(libmysqlclient_18_1)(64bit)
mysql-libs
mysql-shared
Percona-Server-shared-56 = 5.6.15-rel63.0.519.rhel6
Percona-Server-shared-56(x86-64) = 5.6.15-rel63.0.519.rhel6

tags: added: pkg
Revision history for this message
Stefan Skotte (screemo) wrote :

Just a quick note - but installing Percona-XtraDB-Cluster-shared-56-5.6.15-25.5.759.rhel6.x86_64 solves libmysqlclient.so.18 problem.

Revision history for this message
Stefan Skotte (screemo) wrote :

So all combined it works like this:

Percona-Server-client-55-5.5.38-rel35.2.el6.x86_64
Percona-Server-server-55-5.5.38-rel35.2.el6.x86_64
Percona-Server-shared-compat-5.1.68-rel14.6.551.rhel6.x86_64
Percona-XtraDB-Cluster-shared-56-5.6.15-25.5.759.rhel6.x86_64
Percona-Server-shared-55-5.5.38-rel35.2.el6.x86_64

And then php-mysql from the remi repo works.

Revision history for this message
Olivier Doucet (odoucet) wrote :

I confirm behaviour. Solution given on comment #6 is still working.

Revision history for this message
monty solomon (monty+launchpad) wrote :

This bug appears to be related to bug 1291249.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-796

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.