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

Sync libmysqlclient.so symbol versioning across distributions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.34
    • Fix Version/s: 5.5.36
    • Component/s: None
    • Environment:
      Linux, RPM

      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).

      1. mariadb-versioning-compat.patch
        23 kB
        Honza Horak
      2. versioning-inscript.diff
        11 kB
        Sergei Golubchik

        Issue Links

          Activity

          Hide
          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

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

          Honza Horak: 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?
          Show
          serg Sergei Golubchik added a comment - Honza Horak : 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?
          Hide
          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.

          Show
          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.
          Hide
          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"
          
          
          Show
          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"
          Hide
          elenst Elena Stepanova added a comment -

          Re-opening to fix the comment

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

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours
                6h