[MDEV-13615] MariaDB 10.2 client library (Debian 9/Stretch) not compatible with Perl MySQL DBI module Created: 2017-08-22  Updated: 2017-10-13  Resolved: 2017-09-28

Status: Closed
Project: MariaDB Server
Component/s: libmariadb, Platform Debian
Affects Version/s: 10.2.8
Fix Version/s: 10.2.9

Type: Bug Priority: Blocker
Reporter: Laurent Declercq Assignee: Sergei Golubchik
Resolution: Fixed Votes: 7
Labels: debian
Environment:

Debian Stretch 9.1


Issue Links:
Relates
relates to MDEV-12889 libmariadb3 no version information av... Closed
relates to MDEV-13588 /usr/lib/x86_64-linux-gnu/libmariadbc... Closed
relates to MDEV-13593 dlopen failure loading after upgrade ... Closed
relates to MDEV-13619 libmariadb missing version info for l... Closed

 Description   

Good morning,

MariaDB 10.2.8 client library as provided by the libmariadb3 package isn't compatible with the perl MySQL DBI module. There are changes made somewhere (surely in header files) that break linking:

Debian 9/Stretch provides MariaDB 10.1 and therefore the perl MySQL DBI module is build against the MariaDB 10.1 client library. However, for our software, we also provide latest MariaDB 10.2 through your own repository.

The problem is that when installing your libmariadb3 and libmariadbclient18 packages from your MariaDB 10.2 repository, linking for the Perl MySQL DBI module (libdbd-mysql-perl package from Debian 9/Stretch repository) is broken, resulting to the following error:

install_driver(mysql) failed: Can't load '/usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.so' for module DBD::mysql: /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18: version `libmariadbclient_18' not found (required by /usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.so) at /usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187

Further details:

root@stretch:~# ldd /usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.so
/usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.so: /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18: version `libmariadbclient_18' not found (required by /usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.so)
	linux-vdso.so.1 (0x00007ffdf55dd000)
	libmariadbclient.so.18 => /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18 (0x00007f4dae6dc000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4dae4bf000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4dae2a5000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4dadfa1000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4dadd9d000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4dad9fc000)
	libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f4dad790000)
	libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f4dad2fd000)
	/lib64/ld-linux-x86-64.so.2 (0x000055dfd3436000)
 
root@stretch:~# dpkg -S /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18
libmariadb3: /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18
 
root@stretch:~# LANG=C aptitude show libmariadbclient18
Package: libmariadbclient18              
Version: 10.2.8+maria~stretch
State: installed
Automatically installed: no
Priority: optional
Section: libs
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
Architecture: amd64
Uncompressed Size: 10.2 k
Depends: libmariadb3 (= 10.2.8+maria~stretch)
Provided by: libmariadb3 (10.2.8+maria~stretch)
Description: Virtual package to satisfy external depends
 MariaDB is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query language in the world.
 The main goals of MariaDB are speed, robustness and ease of use. 
 
 This is an empty package that depends on the libmariadb3 package.
Homepage: http://mariadb.org/
Tags: role::shared-lib
 
root@stretch:~# LANG=C apt-cache policy libmariadb3 libmariadbclient18
libmariadb3:
  Installed: 10.2.8+maria~stretch
  Candidate: 10.2.8+maria~stretch
  Version table:
 *** 10.2.8+maria~stretch 1001
       1001 http://mirror.netcologne.de/mariadb/repo/10.2/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status
libmariadbclient18:
  Installed: 10.2.8+maria~stretch
  Candidate: 10.2.8+maria~stretch
  Version table:
 *** 10.2.8+maria~stretch 1001
       1001 http://mirror.netcologne.de/mariadb/repo/10.2/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status
     10.1.23-9+deb9u1 500
        500 http://ftp.fr.debian.org/debian stretch/main amd64 Packages

The only way to fix the problem is to pin the libmariadbclient18 (10.1) package from Debian repository as follow:

Package: *
Pin: release o=MariaDB,n=stretch
Pin-Priority: 1001
 
Package: libmariadbclient18
Pin: release o=Debian,n=stretch
Pin-Priority: 1002

See also: https://github.com/i-MSCP/imscp/blob/2a63e423bbd3cf2bae08f89d4ed9818219c84fdc/autoinstaller/Packages/debian-stretch.xml#L288

Thank you.



 Comments   
Comment by Laurent Declercq [ 2017-08-22 ]

Related: https://jira.mariadb.org/projects/MDEV/issues/MDEV-13589

Comment by Laurent Declercq [ 2017-08-22 ]

Related: https://jira.mariadb.org/browse/MDEV-13588

Comment by Laurent Declercq [ 2017-08-22 ]

Related: https://jira.mariadb.org/browse/MDEV-12889

Comment by Sergei Golubchik [ 2017-08-22 ]

Thanks. We'll, obviously, fix that and I've just added this scenario to our CI system, so next time we'll catch and fix it before the release.

Sorry for this.

Comment by Mohit Chandel [ 2017-10-13 ]

Hi,

I have updated MariaDB to 10.2.9 and the issue is still not resolved. Still getting the following error:

 Transaction aborted because install_driver(mysql) failed: Can't load '/usr/lib/x86_64-linux-gnu/perl5/5.24/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmariadbclient.so.18: cannot open shared object file: No such file or directory at /usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187.

sysadmin@netmon:~$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 1351
Server version: 10.2.9-MariaDB-10.2.9+maria~stretch-log mariadb.org binary distribution
 
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> select @@version;
+-----------------------------------------+
| @@version                               |
+-----------------------------------------+
| 10.2.9-MariaDB-10.2.9+maria~stretch-log |
+-----------------------------------------+
1 row in set (0.00 sec)
 
MariaDB [(none)]>

System is already up to date:

sysadmin@netmon:~$ sudo apt-get upgrade
[sudo] password for sysadmin:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
sysadmin@netmon:~$

Perl Version installed on my System:

sysadmin@netmon:~$ dpkg -l | grep "ii  perl"
ii  perl                             5.24.1-3+deb9u2                amd64        Larry Wall's Practical Extraction and Report Language
ii  perl-base                        5.24.1-3+deb9u2                amd64        minimal Perl system
ii  perl-modules-5.24                5.24.1-3+deb9u2                all          Core Perl modules
ii  perl-openssl-defaults:amd64      3                              amd64        version compatibility baseline for Perl OpenSSL packages
sysadmin@netmon:~$

sysadmin@netmon:~$ apt-cache policy libmariadb3 libmariadbclient18
libmariadb3:
  Installed: 10.2.9+maria~stretch
  Candidate: 10.2.9+maria~stretch
  Version table:
 *** 10.2.9+maria~stretch 500
        500 http://download.nus.edu.sg/mirror/mariadb/repo/10.2/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status
libmariadbclient18:
  Installed: 10.2.9+maria~stretch
  Candidate: 10.2.9+maria~stretch
  Version table:
 *** 10.2.9+maria~stretch 500
        500 http://download.nus.edu.sg/mirror/mariadb/repo/10.2/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status
     10.1.26-0+deb9u1 500
        500 http://debianmirror.nkn.in/debian stretch/main amd64 Packages
        500 http://mirror.cse.iitk.ac.in/debian stretch/main amd64 Packages
        500 http://security.debian.org stretch/updates/main amd64 Packages
sysadmin@netmon:~$

Comment by Laurent Declercq [ 2017-10-13 ]

Mohit Chandel

This is not the same issue. Please purge and reinstall the packages.

Comment by Mohit Chandel [ 2017-10-13 ]

Hi Laurent Declercq,

Thanks for Quick response. You mean I should purge Perl and MariaDB and reinstall them or any other packages should be pruged.

Comment by Mohit Chandel [ 2017-10-13 ]

By the way, I pinned the packages as detailed above and the issue was resolved for me. After I unpinned them and upgraded the system, it again appeared.

Comment by Laurent Declercq [ 2017-10-13 ]

Mohit Chandel

I'm talking about those packages: libmariadb3 and libmariadbclient18

Comment by Mohit Chandel [ 2017-10-13 ]

Hi Laurent Declercq,

Thanks, issue is resolved after purge and reinstall of libmariadb3 and libmariadbclient18.

Comment by Laurent Declercq [ 2017-10-13 ]

@mohit Chandel

You're welcome

Generated at Thu Feb 08 08:06:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.