Comment 0 for bug 1438009

Revision history for this message
Roel Van de Paar (roel11) wrote :

$ 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 read:

-L/usr/lib64/mysql -lmysqlclient -lpthread -lm -lrt -lssl -lcrypto -ldl

Instead, because that is where the 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|lib64/mysql|'` instead.