Control: retitle -1 mysql_config and mysqlclient.pc should agree about the version Control: tags -1 - moreinfo + upstream
Hi Otto, On Wed, Dec 17, 2025 at 10:01:00PM -0800, Otto Kekäläinen wrote: > 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 All of this feels expected to me. > # 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 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? > So Helmut think that mariadb.pc should have the server version string > 11.8.5 instead of the client version string 3.4.8? That was my original thinking before this code was included in a stable release, yes. > 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. 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

