Bug #60948 mysql_config --libs "-L/usr/lib -lmysqlclient -lpthread -lprobes_mysql -lz -lm"
Submitted: 21 Apr 2011 16:29 Modified: 22 May 2011 17:14
Reporter: Vikram J. Gurjar Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:MySQL 5.5.11 OS:Linux (Centos 5.6)
Assigned to: CPU Architecture:Any

[21 Apr 2011 16:29] Vikram J. Gurjar
Description:
Computer Athlon T1090 6 core processor 8GB RAM, 1TB RAID 1
Operating system : Centos 5.6 : Kernel 2.6.38.2 
MySQL Ver 5.5.11

MySQL as a server works fine but mysql_config returns -lprobes_mysql which does not exist

mysql_config  --libs returns "-L/usr/lib -lmysqlclient -lpthread -lprobes_mysql -lz -lm"

The problem is because of the extra -lprobes_mysql,   PHP 5.3.6 does not compile nor does Dovecot (IMAP) server.  Both crash out because they cannot find the probes_mysql library (or libprobes_mysql library) 

I got them to compile by changing the configure files in the php and dovecot.

(In case you are wondering, I was trying to set up a server with the latest versions of everything)

How to repeat:
Compile on a fresh Centos 5.6 install where MySQL is not chosen in the original install 

Installed bison (2.4), flex(2.5.35), cmake(2.8.4), ncurses(5.9) and libiconv(1.9.2) from source.

Compiled using the following to stay within Red Hat guidelines

/usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr      \
-DMYSQL_DATADIR=/var/lib/mysql   \
-DMYSQL_TCP_PORT=3306            \
-DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
-DSYSCONFDIR=/etc                \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1  \
-DDEFAULT_CHARSET=utf8           \
-DDEFAULT_COLLATION=utf8_general_ci          \
-DWITH_EXTRA_CHARSETS=all        \
-DMYSQL_MAINTAINER_MODE=OFF      \
-DWITH_DEBUG=OFF         \
-DINSTALL_LAYOUT=STANDALONE      \

make
make install

Suggested fix:
In the file "mysql_config" found in the bin directory about line 112 :

# We intentionally add a space to the beginning and end of lib strings, simplifies replace later
libs=" $ldflags -L$pkglibdir -lmysqlclient   -lpthread -lprobes_mysql -lz -lm -lrt -ldl "
libs="$libs   "
libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r   -lpthread -lprobes_mysql -lz -lm -lrt -ldl   "
embedded_libs=" $ldflags -L$pkglibdir -lmysqld      "

Maybe -lprobes_mysql should be taken out?
[22 Apr 2011 3:41] Vikram J. Gurjar
From the /usr/bin/mysql_config  about line 112

Removed "-lprobes_mysql" 

from the lines 

libs=" $ldflags -L$pkglibdir -lmysqlclient   -lpthread -lprobes_mysql
-lz -lm -lrt -ldl "

and

libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r   -lpthread
-lprobes_mysql -lz -lm -lrt -ldl   "

PHP 5.3.6 and Dovecot 2.0.12 IMAP server compiled fine after that.
[22 Apr 2011 12:05] Valeriy Kravchuk
I've built using exactly the same commands with 5.5.13 (current mysql-5.5 from bzr) on Ubunut 10.04:

openxs@ubuntu:/home2/openxs/bzr2/mysql-5.5$ uname -a
Linux ubuntu 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:21 UTC 2011 i686 GNU/Linux

and got the following:

openxs@ubuntu:/home2/openxs/bzr2/mysql-5.5$ scripts/mysql_config  --libs
-L/usr/lib -lmysqlclient -lpthread -lm -lrt -ldl

Can you, please, check if generic Linux MySQL binaries has the same problem and the ones built on your system?
[22 Apr 2011 16:12] Vikram J. Gurjar
I built MySQL from the source on http://dev.mysql.com/downloads/mysql/#downloads

Generic Linux (Architecture Independent), Compressed TAR Archive 5.5.11 22.6M 	
MD5 befa4e0d0aa95be6c8f6f143ae3b0641

The MD5 check matched. 

I will check the generic libraries and get back to you.

Could not locate 5.5.13 source code anywhere though.
[22 Apr 2011 17:14] Valeriy Kravchuk
5.5.13 code is not available at dev.mysql.com as this version is work in progress, not released yet. You can get it from https://code.launchpad.net/~mysql/mysql-server/mysql-5.5 though.
[22 May 2011 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".