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

Sync libmysqlclient.so symbol versioning across distributions

Details

    Description

      As discussed already in https://lists.launchpad.net/maria-developers/msg06643.html and https://bugzilla.redhat.com/show_bug.cgi?id=1045013, we'd like to sync symbol versioning of libmysqlclient.so to provide compatible libraries at least in RPM packages across distributions.

      It seems the best solution we can do now is to use both, libmysqlclient_16 and libmysqlclient_18 version for older symbols from 5.1 and libmysqlclient_18 only for symbols from 5.5. libmysqlclient_18 will be default version in both cases.

      The attached patch should implement that only for RHEL-7 RPMs, but we'd like to adopt the same since Fedora 21 (not sure if MariaDB's build system can distinguish between fedora versions).

      Attachments

        Issue Links

          Activity

            hhorak Honza Horak added a comment -

            The same patch as previous with adjusted CMakeList.txt, so that compatible symbol versioning is used when defining -DRPM=RHEL7/Fedora21 and above

            hhorak Honza Horak added a comment - The same patch as previous with adjusted CMakeList.txt, so that compatible symbol versioning is used when defining -DRPM=RHEL7/Fedora21 and above

            hhorak: One observation and one question for you.

            1. FYI: after some experimenting I've come up with a different patch, hopefully it's a lot easier to maintain, there is no need to create manually all these dummy functions everywhere, everything is auto-generated from CMakeLists.txt. I'll attach it, in case you're interested.
            2. Do you think it may cause any problems if we'll be using this "universal" versioning for all RHEL/Fedora versions? Not only from RHEL7/Fedora21 up?
            serg Sergei Golubchik added a comment - hhorak : One observation and one question for you. FYI: after some experimenting I've come up with a different patch, hopefully it's a lot easier to maintain, there is no need to create manually all these dummy functions everywhere, everything is auto-generated from CMakeLists.txt . I'll attach it, in case you're interested. Do you think it may cause any problems if we'll be using this "universal" versioning for all RHEL/Fedora versions? Not only from RHEL7/Fedora21 up?
            hhorak Honza Horak added a comment -

            ad 1) I can see CMakeLists.txt in the repository, not necessary to attach it separately.

            ad 2) It would mean that people compiling their software against original MariaDB binaries for RHEL-6/Fedora 20 and older would end up with binaries not working on RHEL-6/Fedora-20 and older. In RHEL-6 it is not an issue, since there is a different soname version; it can make troubles in Fedora though, but the troubles will only exist until Fedora 20 retires. Well, it's not perfect, but I guess we can live with that; anybody wanting to prepare universal binaries should just build against libraries available in Fedora.

            hhorak Honza Horak added a comment - ad 1) I can see CMakeLists.txt in the repository, not necessary to attach it separately. ad 2) It would mean that people compiling their software against original MariaDB binaries for RHEL-6/Fedora 20 and older would end up with binaries not working on RHEL-6/Fedora-20 and older. In RHEL-6 it is not an issue, since there is a different soname version; it can make troubles in Fedora though, but the troubles will only exist until Fedora 20 retires. Well, it's not perfect, but I guess we can live with that; anybody wanting to prepare universal binaries should just build against libraries available in Fedora.
            elenst Elena Stepanova added a comment - - edited

            After post-fixes and re-checks, as of revno 4093 (tentative 5.5.36 release):

            Fixed:

             
            MySQL 5.6 from Oracle repo for Fedora 20 => 5.5 from MariaDB repo for Fedora 20
            MySQL 5.5 from Wheezy repo               => 5.5 from MariaDB repo for Fedora 20
            5.5 from MariaDB repo for Wheezy         => 5.5 from MariaDB repo for Fedora 20
             
            5.5 from MariaDB repo for Fedora 20      => 5.5 from MariaDB repo for Wheezy
            5.5 from MariaDB repo for Fedora 20      => MySQL 5.5 from Wheezy repo
            5.5 from Fedora repo                     => 5.5 from MariaDB repo for Wheezy *
            5.5 from Fedora repo                     => 5.5 from MariaDB repo for Precise **
             
            Warnings on upgrade from various distributions to 5.5 from MariaDB for Precise
             
            ------------------------------------
            *  Except for "version `libmysqlclient_18_mariadb' not found"
            ** Fixed error: "relocation error: symbol mysql_net_realloc, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link time reference"
             

            Broken:

             
            5.5 from MariaDB repo for Fedora 20      => 5.5 from Fedora repo *
            5.5 from MariaDB repo for Precise        => 5.5 from Fedora repo *
            5.5 from Fedora repo                     => 5.5 from MariaDB repo for Precise **
             
            Warnings on downgrade from MariaDB repo for Precise to MySQL from Precise repo 
             
            ------------------------------------
            *  "relocation error: symbol mysql_init, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link time reference"
            ** "version `libmysqlclient_18_mariadb' not found"
             

            elenst Elena Stepanova added a comment - - edited After post-fixes and re-checks, as of revno 4093 (tentative 5.5.36 release): Fixed:   MySQL 5.6 from Oracle repo for Fedora 20 => 5.5 from MariaDB repo for Fedora 20 MySQL 5.5 from Wheezy repo => 5.5 from MariaDB repo for Fedora 20 5.5 from MariaDB repo for Wheezy => 5.5 from MariaDB repo for Fedora 20   5.5 from MariaDB repo for Fedora 20 => 5.5 from MariaDB repo for Wheezy 5.5 from MariaDB repo for Fedora 20 => MySQL 5.5 from Wheezy repo 5.5 from Fedora repo => 5.5 from MariaDB repo for Wheezy * 5.5 from Fedora repo => 5.5 from MariaDB repo for Precise **   Warnings on upgrade from various distributions to 5.5 from MariaDB for Precise   ------------------------------------ * Except for "version `libmysqlclient_18_mariadb' not found" ** Fixed error: "relocation error: symbol mysql_net_realloc, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link time reference"   Broken:   5.5 from MariaDB repo for Fedora 20 => 5.5 from Fedora repo * 5.5 from MariaDB repo for Precise => 5.5 from Fedora repo * 5.5 from Fedora repo => 5.5 from MariaDB repo for Precise **   Warnings on downgrade from MariaDB repo for Precise to MySQL from Precise repo   ------------------------------------ * "relocation error: symbol mysql_init, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link time reference" ** "version `libmysqlclient_18_mariadb' not found"  

            Re-opening to fix the comment

            elenst Elena Stepanova added a comment - Re-opening to fix the comment

            People

              serg Sergei Golubchik
              hhorak Honza Horak
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.