Bug #7652 mysql_config displays incorrect values
Submitted: 4 Jan 2005 7:42 Modified: 5 Jan 2005 8:07
Reporter: Georg Richter Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:4.1.9 OS:
Assigned to: Jim Winstead CPU Architecture:Any

[4 Jan 2005 7:42] Georg Richter
mysql_config shows the followingfor --libmysqld-libs (compiled with 
georg@beethoven:~/work/php/php5> /usr/local/mysql-4.1/bin/mysql_config 
-L/usr/local/mysql-4.1/lib/mysql -lmysqld -lpthread -lcrypt -lnsl -lm -lpthread -lrt -lcrypt 
-lnsl -lm -lz 
libmysqld-libs contains libcrypt, libnsl, libm twice, and it doesn't contain lssl. If you try 
to link against libmysqld linker complains about undefined ssl references. 

How to repeat:
georg@beethoven:~/work/mysql/test> gcc -o test test.c 
-I/usr/local/mysql-4.1/include/mysql -L/usr/local/mysql-4.1/lib/mysql -lmysqld -lpthread 
-lcrypt -lnsl -lm -lpthread -lrt -lcrypt -lnsl -lm -lz 
/usr/local/mysql-4.1/lib/mysql/libmysqld.a(libvio_viosslfactories.o)(.text+0x8): In 
function `get_dh512': 
/home/georg/work/mysql/mysql-4.1/vio/viosslfactories.c:43: undefined reference to 
(.text+0x2a):/home/georg/work/mysql/mysql-4.1/vio/viosslfactories.c:45: undefined 
reference to `BN_bin2bn' 
(.text+0x49):/home/georg/work/mysql/mysql-4.1/vio/viosslfactories.c:46: undefined 
reference to `BN_bin2bn' 
(.text+0x5e):/home/georg/work/mysql/mysql-4.1/vio/viosslfactories.c:49: undefined 
reference to `DH_free'
[5 Jan 2005 3:09] Jim Winstead
With the current 4.1 tree, I get a mysql_config (in scripts/mysql_config) that includes the SSL libs 
for "--libmysqld-libs". Please attach the top-level Makefile and scripts/mysql_config from the tree 
that produces an incorrect mysql_config output.

$ ./scripts/mysql_config 
Usage: ./scripts/mysql_config [OPTIONS]
        --cflags         [-I/usr/local/mysql/include/mysql -mcpu=pentiumpro]
        --include        [-I/usr/local/mysql/include/mysql]
        --libs           [-L/usr/local/mysql/lib/mysql -lmysqlclient -lcrypt -lnsl -lm -lz -L/usr/lib -lssl 
        --libs_r         [-L/usr/local/mysql/lib/mysql -lmysqlclient_r -lpthread -lcrypt -lnsl -lm 
-lpthread -L/usr/lib -lssl -lcrypto]
        --socket         [/tmp/mysql.sock]
        --port           [3306]
        --version        [4.1.9]
        --libmysqld-libs [-L/usr/local/mysql/lib/mysql -lmysqld -lpthread -lcrypt -lnsl -lm -lpthread 
-lrt -lcrypt -lnsl -lm -lz -L/usr/lib -lssl -lcrypto]
[5 Jan 2005 8:07] Georg Richter
it works now after new pull. Probably my tree was too old (~7 days).