[MDEV-27994] libmariadb.so missing in MariaDB-shared-10.5.15-1.el7.centos.x86_64.rpm Created: 2022-03-04  Updated: 2022-03-09  Resolved: 2022-03-09

Status: Closed
Project: MariaDB Server
Component/s: Server
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Nuno Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

Struggled all day trying to understand why a 3rd party application I use stopped working, after "yum update".

Ended up figuring out that this was because of a missing file from MariaDB-shared.

I looked into the following two packages:

MariaDB-shared-10.5.13-1.el7.centos.x86_64.rpm
MariaDB-shared-10.5.15-1.el7.centos.x86_64.rpm

The 10.5.13 contains the file /usr/lib64/libmariadb.so
While 10.5.15 does not.
Both contain libmariadb.so.3

Running:
ln -s /usr/lib64/libmariadb.so.3 /usr/lib64/libmariadb.so

Resolves the issue I had with the 3rd party app.

Any reason why "MariaDB-shared-10.5.15-1.el7.centos.x86_64.rpm" does not contain the symlink "usr/lib64/libmariadb.so" anymore?



 Comments   
Comment by Elena Stepanova [ 2022-03-04 ]

The change was made in the scope of MDEV-27109. It also has comments with the reasoning.

Comment by Nuno [ 2022-03-04 ]

Ah ok - I see the file is present in MariaDB-devel-10.5.15-1.el7.centos.x86_64.rpm

Thanks.
I wasn't aware of this change.
I wonder if the change should have been made in a minor update within 10.5, rather than in a major update.

Users don't expect breaking changes on minor updates.

Thank you for your reply. I appreciate that.

Comment by Sergei Golubchik [ 2022-03-09 ]

what did this change break? one needs libmariadb.so for building a binary. It's not needed for running a binary, libmariadb.so.3 is needed for that. Thus it's a usual practice to put *.so symlink into a -devel.

So, what application was broken by this change?

Comment by Nuno [ 2022-03-09 ]

Hi serg

It was Sphinx Search

> ERROR: index 'idx_***': sql_connect: failed to load libmysqlclient (or libmariadb)
> (DSN=mysql://<sphinx_user>:***@127.0.0.1:3306/<database>)

https://sphinxsearch.com/docs/sphinx3.html#installing-indexer-sql-drivers-on-linux

> The driver libraries are loaded by name. The following names are attempted:
> MySQL: libmysqlclient.so or libmariadb.so

Comment by Sergei Golubchik [ 2022-03-09 ]

Okay, so it does dlopen("libmariadb.so") by name. That's not how dynamic linker works. I suppose it should load libmariadb.so.3 if that's the API it expects.

Generated at Thu Feb 08 09:57:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.