Bug #39175 mysql_config --libs polluted by $LDFLAGS

Submitted: 2 Sep 2008 9:07 Modified: 10 Aug 2018 18:38
Reporter: Michal Marek Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.0.67, 5.0, 5.1, 6.0 bzr OS:Linux
Assigned to: Assigned Account CPU Architecture:Any
Tags: Contribution, regression

[2 Sep 2008 9:07] Michal Marek
Description:
In 5.0.51a, the output of mysql_config --libs started with @SAVE_LDFLAGS@ (usually empty), in 5.0.67, it contains @LDFLAGS@, which can contain flags like -rdynamic which are internal to the mysql build and should not be enforced on programs and libraries using libmysqlclient. This is a side-effect of the fix for bug #31644.

See also: https://bugzilla.novell.com/show_bug.cgi?id=420313

How to repeat:
$ mysql_config --version; mysql_config --libs
5.0.67
-rdynamic -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64
^^^^^^^^^
-lssl -lcrypto

Suggested fix:
--- scripts/mysql_config.sh.orig
+++ scripts/mysql_config.sh
@@ -92,7 +92,7 @@ fix_path pkgincludedir include/mysql inc
 
 version='@VERSION@'
 socket='@MYSQL_UNIX_ADDR@'
-ldflags='@LDFLAGS@'
+ldflags='@SAVE_LDFLAGS@'
 
 if [ @MYSQL_TCP_PORT_DEFAULT@ -eq 0 ]; then
   port=0
[2 Sep 2008 9:45] Sveta Smirnova
Thank you for the report.

Verified as described.
[15 Sep 2009 15:53] Liz Drachnik
Hello Michal

In order for us to continue the process of reviewing your contribution to MySQL - We need
you to review and sign the Sun|MySQL contributor agreement (the "SCA")

The process is explained here: 
http://forge.mysql.com/wiki/Sun_Contributor_Agreement

Getting a signed/approved SCA on file will help us facilitate your contribution-- this
one, and others in the future.

Thank you !
[15 Oct 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[10 Aug 2018 18:38] Kent Boortz
This issue was corrected in MySQL Server 5.7.9, MySQL Cluster 7.5.0
and MySQL Cluster 7.6.1 part of the solution to Bug#76019
and Bug#76131.

Git commits
95a4c374533cf072a00d1b1fde738ef5fbe8d5a9 eb46d86131bcafd309e03d27c62e3ec84a26022c

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.