Bug #73724 mysql_config --lib_r tells applications to link with libmysqlclient_r
Submitted: 26 Aug 2014 9:21 Modified: 24 Oct 2014 16:11
Reporter: Norvald Ryeng Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S3 (Non-critical)
Version:5.5 OS:Any
Assigned to: CPU Architecture:Any

[26 Aug 2014 9:21] Norvald Ryeng
Description:
The libmysqlclient_r library was removed in 5.5 and replaced with symlinks to libmysqlclient (as a backwards compatibility measure), since the normal client library is thread safe. However, mysql_config still (in 5.5, 5.6 and 5.7) tells applications to link with libmysqlclient_r, making it impossible to remove the symlinks.

How to repeat:
mysql_config --libs_r

Suggested fix:
Deprecate the --libs_r option to mysql_config and make it an alias for --libs. Add a deprecation warning to the usage documentation (printed when executing mysql_config without any options).
[26 Aug 2014 9:25] Norvald Ryeng
Posted by developer:
 
Bug filed against 5.5 since that's where it first occurred, but please evaluate carefully which versions to fix this in since it affects how clients are built.

Also consider whether the symlinks can be removed. They can safely be removed when libmysqlclient bumps to version 19, whenever that will be. Maybe even earlier.
[24 Oct 2014 16:11] Paul DuBois
Noted in 5.6.22, 5.7.6 changelogs.

mysql_config --libs_r produces output containing link flags for
libmysqlclient_r, even though that library was removed in MySQL 5.5
and replaced with a symlink to the underlying libmysqlclient library.
The output now refers directly to libmysqlclient. (The implication is
that it is no longer necessary to maintain the symlink for the sake
of being able to use mysql_config --libs_r.)
[18 Nov 2014 21:28] Paul DuBois
Noted in Connector/C 6.1.6 changelog.
[10 Dec 2014 13:27] Laurynas Biveinis
$ bzr log -r 6200
------------------------------------------------------------
revno: 6200
committer: Kent Boortz <kent.boortz@oracle.com>
branch nick: mysql-5.6
timestamp: Mon 2014-10-13 12:58:51 +0200
message:
  BUG#19506315 - MYSQL_CONFIG --LIB_R TELLS APPLICATIONS TO LINK WITH LIBMYSQLCLIENT_R 
  
    The libmysqlclient_r library was removed in 5.5 and replaced with
    symlinks to libmysqlclient (as a backwards compatibility measure),
    since the normal client library is thread safe.
  
    This is a partial change for this bug report, let "--libs_r" always
    output "-lmysqlclient", a reference to the real library and not to
    the soft link. This solves a problem that on Debian and Ubuntu the
    deb packages will not install the soft links.