Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7900

Failure to correctly create library links for libmysql_r

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.0.17
    • Fix Version/s: 10.1
    • Component/s: Packaging
    • Labels:
    • 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

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

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

            Show
            elenst Elena Stepanova added a comment - Hi, What kind of a problem with rpm/deb does the current state of things (links) cause?
            Hide
            quanah Quanah Gibson-Mount added a comment -

            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

            Show
            quanah Quanah Gibson-Mount added a comment - 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
            Hide
            elenst Elena Stepanova added a comment -

            Assigning to Sergei Golubchik 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 Kekäläinen complaining about it – maybe he has already fixed it in his tree?

            Show
            elenst Elena Stepanova added a comment - Assigning to Sergei Golubchik 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 Kekäläinen complaining about it – maybe he has already fixed it in his tree?
            Hide
            quanah Quanah Gibson-Mount added a comment -

            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.

            Show
            quanah Quanah Gibson-Mount added a comment - 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.
            Hide
            otto Otto Kekäläinen added a comment -

            Elena Stepanova 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.

            Show
            otto Otto Kekäläinen added a comment - Elena Stepanova 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.
            Hide
            serg Sergei Golubchik added a comment -

            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.

            Show
            serg Sergei Golubchik added a comment - 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.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                quanah Quanah Gibson-Mount
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: