[MDEV-7900] Failure to correctly create library links for libmysql_r Created: 2015-04-02  Updated: 2018-08-31

Status: Open
Project: MariaDB Server
Component/s: Packaging
Affects Version/s: 10.0.17
Fix Version/s: 10.1

Type: Bug Priority: Minor
Reporter: Quanah Gibson-Mount (Inactive) Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: verified
Environment:

Linux



 Description   

libmysqlclient_r.* is a bunch of symlinks. However, the symlinks are not properly created, as they point to the runtime linking library instead of the long term linked library. libmysqlclient is correct symlinked.

libmysqlclient (correct):

lrwxrwxrwx. 1 root root       20 Mar 24 15:16 libmysqlclient.so -> libmysqlclient.so.18
lrwxrwxrwx. 1 root root       24 Mar 24 15:16 libmysqlclient.so.18 -> libmysqlclient.so.18.0.0
-rwxr-xr-x. 1 root root  6276978 Mar 24 15:14 libmysqlclient.so.18.0.0


libmysqlclient_r (incorrect):

lrwxrwxrwx. 1 root root       17 Mar 24 15:16 libmysqlclient_r.so -> libmysqlclient.so
lrwxrwxrwx. 1 root root       17 Mar 24 15:16 libmysqlclient_r.so.18 -> libmysqlclient.so
lrwxrwxrwx. 1 root root       17 Mar 24 15:16 libmysqlclient_r.so.18.0.0 -> libmysqlclient.so


The correct linking for libmysqlclient_r would be something like:

lrwxrwxrwx. 1 root root       17 Mar 24 15:16 libmysqlclient_r.so -> libmysqlclient.so
lrwxrwxrwx. 1 root root       17 Mar 24 15:16 libmysqlclient_r.so.18 -> libmysqlclient.so.18
lrwxrwxrwx. 1 root root       17 Mar 24 15:16 libmysqlclient_r.so.18.0.0 -> libmysqlclient.so.18.0.0


Fixing this allows for proper creation of dev packages for rpm/deb



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

Hi,
What kind of a problem with rpm/deb does the current state of things (links) cause?

Comment by Quanah Gibson-Mount (Inactive) [ 2015-04-03 ]

Traditionally, packages are broken out into -dev, -lib, etc. -dev contains the linking portions (lib/.so, lib/.la, lib/.a, include/) that are only required for building software that links to the given package. However, due to the incorrect way in which libmysqlclient_r is symlinked, one has to delete and correctly link it to create a proper dev package. It would be simpler if mariadb correctly created libmysqlclient_r to start with, so games don't have to be played to create a proper -dev package.

Like http://packages.ubuntu.com/trusty/amd64/libssl-dev/filelist, for example

Comment by Elena Stepanova [ 2015-04-03 ]

Assigning to serg for further consideration.
As I understand, we somehow manage to build dev packages, but maybe we aren't doing it the right way. Also, I don't remember otto complaining about it – maybe he has already fixed it in his tree?

Comment by Quanah Gibson-Mount (Inactive) [ 2015-04-03 ]

I bet any linked software just ends up pointing to libmysqlclient.so.18.0.0, so it becomes moot as far as a dev vs lib package, as long as libmysqlcient.so.18.0.0 is in the lib package. I think this can be closed out then, although it still is really odd looking.

For debian, I know they're playing games, because they renamed the libraries to libmariadbclient* instead of libmysqlclient, so it's hard to base anything as to what is "correct" off their packages.

Comment by Otto Kekäläinen [ 2015-04-11 ]

elenst Due to reasons explained in MDEV-5482 there is no libmysqlclient nor libmariadbclient package in Debian anymore, instead the LGPL licenced MariaDB Client for C is provided. It is not a perfect solution but best compromise at the moment.

Comment by Sergei Golubchik [ 2015-07-27 ]

This isn't easy to do with our cmake files. I suggest to keep symlinks the old way in 10.0 and drop libmysqlclient_r completely in 10.1.

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