[MDEV-27109] mysql_config mariadb_config lists non existant -lmariadb Created: 2021-11-22 Updated: 2022-05-16 Resolved: 2022-01-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Compiling |
| Affects Version/s: | 10.5.11, 10.5.12, 10.5.13 |
| Fix Version/s: | 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | tom brown | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
centos 7 and apparently centos 8 as well, based on your "official" yum repositories... [mariadb] |
||
| Issue Links: |
|
||||||||
| Description |
|
There is no mariadb library!! The code I'm trying to build should be using -lmysqlclient but it's getting messed up flags from your build.
same thing on centos 8
and yes, if I use the command "correctly" I still get the wrong answers
there's a libmariadbd.a ... with a trailing d suffix, but no mariadb and definitely no libmariadb.so I'm no developer. Maybe I'm doing something stupid. I'm just a sysadmin who has to maintain a pile of packages for a number of versions of centos. Mock is usually a good help for this, but it's going to make working around this bug quite ugly as you don't usually have root perms in a mock environment, and it's someone else's 60,000 line configure script that's getting tripped up. Anyhow, submitting this in the hope it's legit and it saves someone else the 60 or 90 minutes it took me to figure out what the heck was going on. p.s. 10.5.11 and 10.5.12 are still up on the repo, they show the same behaviour. |
| Comments |
| Comment by Sergei Golubchik [ 2021-11-23 ] | |||||||
|
You're right. What we have now is
and
This means that mariadb_config --libs can not be always correct, because the library name is different for dynamic and static builds. This is rather inconvenient. Also libmariadb.so should be in -devel, not in -shared. And -devel has symlinks to files in -shared but does not require it. But as far as you are concerned, as a sysadmin, I suspect it should mostly work fine for you. You likely prefer to link with libraries dynamically, not statically, so -lmariadb means you need libmariadb.so which is installed by MariaDB-shared. | |||||||
| Comment by Alexey Bychko (Inactive) [ 2021-11-26 ] | |||||||
|
looking at 10.2. if I understand everything correctly, we can fix it in following way: not sure about static/dynamic libraries. we have /usr/lib64/libmariadbclient.a and /usr/lib64/libmariadb.so symlink. the output from mariadb_config looks OK, I think we have nothing to change there | |||||||
| Comment by Sergei Golubchik [ 2021-11-26 ] | |||||||
|
1. yes, 2. yes. and yes, I thought about libmariadb.a -> libmariadbclient.a symlink too, we cannot just rename the library. Don't forget to set CONFLICTS properly, this always needs to be done when a file to moved between packages | |||||||
| Comment by Alexey Bychko (Inactive) [ 2021-11-27 ] | |||||||
|
created PR to add compatibility symlink https://github.com/mariadb-corporation/mariadb-connector-c/pull/190 | |||||||
| Comment by Alexey Bychko (Inactive) [ 2021-11-27 ] | |||||||
|
OK, so we have now a compatibility symlink, we have moved libmariadb.so to -devel. | |||||||
| Comment by Sergei Golubchik [ 2021-11-27 ] | |||||||
|
No. They're always needed when a file is moved between packages. libmariadb.so was in MariaDB-shared-10.3..32, and will be in MariaDB-devel-10.3.33. Meaning one cannot install MariaDB-devel-10.3.33 and MariaDB-shared-10.3..32 at the same time, it'll be filesystem-level conflict error. To prevent it we have to tell rpm explicitly that these two packages conflict. That is MariaDB-devel should have Require: MariaDB-shared >= 10.3.33 (this was for 10.3, for 10.2, 10.4, 10.5, etc — adjust accordingly) See cpack_rpm.cmake changes in 395a03323768, where my_print_defaults was moved from -server to -client. | |||||||
| Comment by Alexey Bychko (Inactive) [ 2021-11-28 ] | |||||||
|
pushed to bb-10.2- | |||||||
| Comment by Sergei Golubchik [ 2022-01-05 ] | |||||||
|
https://github.com/mariadb-corporation/mariadb-connector-c/pull/190 |