- Package:
- libmariadb-dev-compat
- Source:
- libmariadb-dev-compat
- Description:
- MariaDB Connector/C, compatibility symlinks
- Submitter:
- Helmut Grohne
- Date:
- 2025-12-19 22:41:04 UTC
- Severity:
- normal
- Tags:
$ mysql_config --version 10.6.11 $ grep ^Version /usr/lib/*/pkgconfig/mysqlclient.pc Version: 3.3.3 $ The version presented in mysqlclient.pc is utterly outdated. This breaks applications that need a more recent version than that and prefer pkg-config over mysql_config. I think that mysql_config and pkg-config should report the same version. Helmut
Status with latest version in Bookworm: $ dpkg -l | grep libmariadb-dev-compat ii libmariadb-dev-compat:amd64 1:10.11.2-1 $ mysql_config --version 10.11.2 $ mariadb-config --version 10.11.2 $ grep ^Version /usr/lib/*/pkgconfig/libmariadb.pc Version: 3.3.4 $ find /usr/lib/*/pkgconfig/m*.pc -ls pkgconfig/mariadb.pc -> libmariadb.pc pkgconfig/mysqlclient.pc -> libmariadb.pc Status in Docker image debian:buster-20230109 $ dpkg -l | grep libmariadb-dev-compat ii libmariadb-dev-compat:amd64 1:10.3.36-0+deb10u2 $ mysql_config --version 10.3.36 $ mariadb-config --version bash: mariadb-config: command not found $ grep ^Version /usr/lib/*/pkgconfig/libmariadb.pc Version: 3.1.18 $ find /usr/lib/*/pkgconfig/m*.pc -ls pkgconfig/mariadb.pc pkgconfig/mysqlclient.pc -> mariadb.pc I have no idea why this is so but agree that mariadb-config not being same version as mariadb.pc is confusing. Related upstream PRs that do not fix this but are on the same topic: - https://github.com/mariadb-corporation/mariadb-connector-c/pull/219 "Return correct client library version number" - https://github.com/MariaDB/server/pull/1800 "MDEV-23538: Rename mariadb.pc to libmariadbd.pc to avoid confusion"
Hi,
In MariaDB 1:11.8.5-3 in Debian unstable this is the latest situation:
# dpkg -l | grep libmariadb
ii libmariadb-dev 1:11.8.5-3 amd64
MariaDB database development files
ii libmariadb-dev-compat 1:11.8.5-3 amd64
MariaDB Connector/C, compatibility symlinks
ii libmariadb3:amd64 1:11.8.5-3 amd64
MariaDB database client library
ii libmariadbd-dev 1:11.8.5-3 amd64
MariaDB embedded database, development files
ii libmariadbd19t64:amd64 1:11.8.5-3 amd64
MariaDB embedded database, shared library
# mysql_config --version
11.8.5
# mariadb-config --version
11.8.5
# find /usr/lib/*/pkgconfig/m*.pc -ls
/usr/lib/x86_64-linux-gnu/pkgconfig/mariadb-embedded-server.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/mariadb.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/mysqlclient.pc -> libmariadb.pc
# grep ^Version /usr/lib/*/pkgconfig/m*.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/mariadb-embedded-server.pc:Version: 11.8.5
/usr/lib/x86_64-linux-gnu/pkgconfig/mariadb.pc:Version: 3.4.8
/usr/lib/x86_64-linux-gnu/pkgconfig/mysqlclient.pc:Version: 3.4.8
# find /usr/lib/*/pkgconfig/libm*.pc -ls
/usr/lib/x86_64-linux-gnu/pkgconfig/libmariadb.pc -> mariadb.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/libmariadbd.pc -> mariadb-embedded-server.pc
# grep ^Version /usr/lib/*/pkgconfig/libm*.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/libmariadb.pc:Version: 3.4.8
/usr/lib/x86_64-linux-gnu/pkgconfig/libmariadbd.pc:Version: 11.8.5
So Helmut think that mariadb.pc should have the server version string
11.8.5 instead of the client version string 3.4.8?
Do you think I should take
https://github.com/mariadb-corporation/mariadb-connector-c/pull/219
and apply it in MariaDB packaging in Debian permanently? Seems
upstream wants mariadb.pc to emit the client version, not server
version, but I can deviate from upstream if there are good grounds to
do so.
Hi Otto, All of this feels expected to me. This is where it starts getting murky. Why would mysqlclient.pc report a different version from mysql_config? Both describe the same library in the same version. The original phrasing of the bug was that mysqlclient.pc should be reporting a "correct" version, but given the context you established, I am no longer sure what the "correct" version is and given that this has lasted more than two years now, any change is likely going to break something. In essence, my understanding is that mariadb has rendered version checks on the library useless. So let me rephrase the request. `mysql_config --version` and `pkgconf --modversion mysqlclient` should report the same version (without making claims as to which version that is anymore). Do you find that view agreeable? That was my original thinking before this code was included in a stable release, yes. I fear that there are no good answers here. You can only choose between wrongs. As has been pointed out in that pull by rmk92, this is not primarily a Debian problem. As a result of what happened, querying the mysql client library for its version has become a practically useless endeavour. Depending on whether you use mysql or mariadb you get completely different versions and depending on whether you ask with pkgconf or mysql_config you also get completely different versions even for mariadb. Bottom line is that this interface is ruined. At this point, I don't think it matters much anymore, but deviating from upstream is only worsening the problem as that adds another angle to the mess. What we'll have to do is delete all version checks from upstream software. That's the only practical way forward sadly. Helmut
Hi, Yes ... Upstream didn't accept my PR nor the motivations why the API should not break like this. But they didn't reject that PR either. And since time has passed, I agree with your conclusion above about the interface being ruined now and there is no going back anymore. Agree, let's align with upstream in forky so people having issues will at least have the same issues as everyone else compiling against MariaDB using the 'mysqlclient' reference.