On 17.03.2015 01:46, Fay Hou wrote:
I got error when I compile "make". Any ideas?
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o):
In function `mysql_get_ssl_cipher': (.text+0x2159): undefined reference to `SSL_get_current_cipher'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o):
In function `send_client_reply_packet': (.text+0x2a68): undefined reference to `SSL_get_peer_certificate' ...
Those are functions from SSL.
libtool: link: gcc -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Winline -funroll-loops -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align -pthread -O2 -ggdb3 -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o sb_percentile.o -L/usr/local/lib tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/mutex/libsbmutex.a scripting/libsbscript.a drivers/mysql/libsbmysql.a -L/usr/lib64/mysql -lmysqlclient_r scripting/lua/src/liblua.a -ldl -lrt -lm -pthread
and indeed the SSL libs are missing. The link line for me looks like so: gcc -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Winline -funroll-loops -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align -pthread -O2 -ggdb3 -O3 -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o sb_percentile.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/mutex/libsbmutex.a scripting/libsbscript.a drivers/mysql/libsbmysql.a -lmysqlclient_r -lpthread -lz -lssl -lcrypto scripting/lua/src/liblua.a -ldl -laio -lm -pthread notice the extra "-lssl -lcrypto" XL