mysql_config --libs gives incorrect output on Centos7
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
New
|
Undecided
|
Unassigned | |||
5.5 |
New
|
Undecided
|
Unassigned | |||
5.6 |
Triaged
|
High
|
Tomislav Plavcic | |||
5.7 |
New
|
Undecided
|
Unassigned |
Bug Description
$ mysql_config --libs
-L/usr/lib64 -lmysqlclient -lpthread -lm -lrt -lssl -lcrypto -ldl
But, when you try and compile some C program using `mysql_config --libs` as part of the gcc call, it fails. Reason (after much digging) is that the output above is wrong, it should instead read:
-L/usr/lib64/mysql -lmysqlclient -lpthread -lm -lrt -lssl -lcrypto -ldl
As this is where the client libs are;
$ ls /usr/lib64/mysql
libmysqlclient.a libmysqlclient_r.a libmysqlservices.a
Not sure how widespread this is in other Centos releaes etc.
This makes compiling programs with Percona Server client statically linked very difficult (it took Sergei & me about 1+ hours to work it out together), so this bug is high prio to aid client adoption.
Workaround is to do something like `mysql_config --libs | sed 's|lib64|
Setup for testing;
sudo yum install http://
sudo yum install Percona-
Background:
https:/
description: | updated |
description: | updated |
Previous releases of Centos should also be checked for the libperconaserve rlcient implementation. In that case, the above may still apply (re: additional subdir), but additionally also the -lmysqlclient output of mysql_config should represent the correct client lib instead.