[MDEV-5529] Sync libmysqlclient.so symbol versioning across distributions Created: 2014-01-14  Updated: 2014-03-03  Resolved: 2014-02-24

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.34
Fix Version/s: 5.5.36

Type: Bug Priority: Major
Reporter: Honza Horak Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: libmysqlclient, packaging
Environment:

Linux, RPM


Attachments: File mariadb-versioning-compat.patch     File versioning-inscript.diff    
Issue Links:
Relates
relates to MDEV-5739 Symbol missing in libmysqlclient.so.1... Closed
relates to MDEV-5763 libmyodbc.so: undefined symbol: int2str Closed
relates to MDEV-5773 symbol list_add, version libmysqlclie... Closed

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



 Comments   
Comment by Honza Horak [ 2014-01-17 ]

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

Comment by Sergei Golubchik [ 2014-02-15 ]

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?
Comment by Honza Horak [ 2014-02-19 ]

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.

Comment by Elena Stepanova [ 2014-02-23 ]

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"
 

Comment by Elena Stepanova [ 2014-02-24 ]

Re-opening to fix the comment

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