[Maria-discuss] Sysbench compile error for MariaDB under Centos 6.4
Thank you for your time. I do see the libmysqlclient installed. []# find / -name libmysqlclient_r* /usr/lib64/libmysqlclient_r.so.15 /usr/lib64/libmysqlclient_r.so.15.0.0 /usr/lib64/libmysqlclient_r.so.16.0.0 /usr/lib64/libmysqlclient_r.so.16 /usr/lib64/libmysqlclient_r.a But, I got error when I compile "make". Any ideas? 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 /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' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `send_client_reply_packet': (.text+0x2a80): undefined reference to `X509_get_subject_name' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `send_client_reply_packet': (.text+0x2a94): undefined reference to `X509_NAME_oneline' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `send_client_reply_packet': (.text+0x2aa3): undefined reference to `X509_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `send_client_reply_packet': (.text+0x2cbc): undefined reference to `ERR_error_string_n' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `mysql_close': (.text+0x35f4): undefined reference to `SSL_CTX_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `mysql_get_ssl_cipher': (.text+0x2162): undefined reference to `SSL_CIPHER_get_name' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(mysql_async.c.o): In function `my_ssl_read_async': (.text+0xcdf): undefined reference to `SSL_read' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(mysql_async.c.o): In function `my_ssl_read_async': (.text+0xd0e): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(mysql_async.c.o): In function `my_ssl_write_async': (.text+0xd8f): undefined reference to `SSL_write' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(mysql_async.c.o): In function `my_ssl_write_async': (.text+0xdbe): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(vio.c.o): In function `vio_end': (.text+0x5a7): undefined reference to `ERR_remove_state' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(vio.c.o): In function `vio_end': (.text+0x5ac): undefined reference to `ERR_free_strings' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(vio.c.o): In function `vio_end': (.text+0x5b1): undefined reference to `EVP_cleanup' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(vio.c.o): In function `vio_end': (.text+0x5b7): undefined reference to `CRYPTO_cleanup_all_ex_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosocket.c.o): In function `vio_is_connected': (.text+0xe86): undefined reference to `SSL_pending' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x3b): undefined reference to `SSL_new' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x4f): undefined reference to `SSL_clear' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x57): undefined reference to `SSL_get_session' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x62): undefined reference to `SSL_SESSION_set_timeout' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x6d): undefined reference to `SSL_set_fd' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x81): undefined reference to `SSL_ctrl' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0xab): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0xef): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0xfc): undefined reference to `SSL_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x159): undefined reference to `SSL_get_fd' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x199): undefined reference to `ERR_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_read': (.text+0x1f1): undefined reference to `SSL_read' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_read': (.text+0x207): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_write': (.text+0x2e1): undefined reference to `SSL_write' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_write': (.text+0x2f7): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_close': (.text+0x3b8): undefined reference to `SSL_set_quiet_shutdown' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_close': (.text+0x3c0): undefined reference to `SSL_shutdown' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_delete': (.text+0x407): undefined reference to `SSL_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `sslaccept': (.text+0x447): undefined reference to `SSL_accept' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `sslconnect': (.text+0x467): undefined reference to `SSL_connect' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_has_data': (.text+0x4ac): undefined reference to `SSL_pending' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x63): undefined reference to `SSL_load_error_strings' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x8a): undefined reference to `TLSv1_server_method' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x92): undefined reference to `SSL_CTX_new' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0xae): undefined reference to `SSL_CTX_set_cipher_list' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0xc5): undefined reference to `SSL_CTX_load_verify_locations' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0xe5): undefined reference to `SSL_CTX_set_default_verify_paths' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x103): undefined reference to `SSL_CTX_get_cert_store' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x116): undefined reference to `X509_STORE_load_locations' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x12b): undefined reference to `X509_STORE_set_flags' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x15f): undefined reference to `SSL_CTX_use_certificate_chain_file' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x17c): undefined reference to `SSL_CTX_use_PrivateKey_file' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x191): undefined reference to `SSL_CTX_check_private_key' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x19e): undefined reference to `DH_new' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x1b9): undefined reference to `BN_bin2bn' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x1d1): undefined reference to `BN_bin2bn' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x1fd): undefined reference to `SSL_CTX_ctrl' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x205): undefined reference to `DH_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x221): undefined reference to `TLSv1_client_method' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x268): undefined reference to `SSL_library_init' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x26d): undefined reference to `OPENSSL_add_all_algorithms_noconf' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x2d6): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x2e3): undefined reference to `SSL_CTX_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x32d): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x3ad): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x42d): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x465): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x47a): undefined reference to `DH_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x4ad): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLConnectorFd': (.text+0x514): undefined reference to `SSL_CTX_set_verify' under Centos 6.4
Hi, I seem your compilation process can't find openssl/ssl.h Do you install openssl-devel? yoku0825, 2015-03-17 9:46 GMT+09:00 Fay Hou <fhou2@hotmail.com>:
Thank you for your time. I do see the libmysqlclient installed.
[]# find / -name libmysqlclient_r* /usr/lib64/libmysqlclient_r.so.15 /usr/lib64/libmysqlclient_r.so.15.0.0 /usr/lib64/libmysqlclient_r.so.16.0.0 /usr/lib64/libmysqlclient_r.so.16 /usr/lib64/libmysqlclient_r.a
But, I got error when I compile "make". Any ideas?
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 /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' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `send_client_reply_packet': (.text+0x2a80): undefined reference to `X509_get_subject_name' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `send_client_reply_packet': (.text+0x2a94): undefined reference to `X509_NAME_oneline' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `send_client_reply_packet': (.text+0x2aa3): undefined reference to `X509_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `send_client_reply_packet': (.text+0x2cbc): undefined reference to `ERR_error_string_n' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `mysql_close': (.text+0x35f4): undefined reference to `SSL_CTX_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `mysql_get_ssl_cipher': (.text+0x2162): undefined reference to `SSL_CIPHER_get_name' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(mysql_async.c.o): In function `my_ssl_read_async': (.text+0xcdf): undefined reference to `SSL_read' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(mysql_async.c.o): In function `my_ssl_read_async': (.text+0xd0e): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(mysql_async.c.o): In function `my_ssl_write_async': (.text+0xd8f): undefined reference to `SSL_write' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(mysql_async.c.o): In function `my_ssl_write_async': (.text+0xdbe): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(vio.c.o): In function `vio_end': (.text+0x5a7): undefined reference to `ERR_remove_state' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(vio.c.o): In function `vio_end': (.text+0x5ac): undefined reference to `ERR_free_strings' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(vio.c.o): In function `vio_end': (.text+0x5b1): undefined reference to `EVP_cleanup' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(vio.c.o): In function `vio_end': (.text+0x5b7): undefined reference to `CRYPTO_cleanup_all_ex_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosocket.c.o): In function `vio_is_connected': (.text+0xe86): undefined reference to `SSL_pending' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x3b): undefined reference to `SSL_new' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x4f): undefined reference to `SSL_clear' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x57): undefined reference to `SSL_get_session' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x62): undefined reference to `SSL_SESSION_set_timeout' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x6d): undefined reference to `SSL_set_fd' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x81): undefined reference to `SSL_ctrl' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0xab): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0xef): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0xfc): undefined reference to `SSL_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x159): undefined reference to `SSL_get_fd' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x199): undefined reference to `ERR_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_read': (.text+0x1f1): undefined reference to `SSL_read' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_read': (.text+0x207): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_write': (.text+0x2e1): undefined reference to `SSL_write' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_write': (.text+0x2f7): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_close': (.text+0x3b8): undefined reference to `SSL_set_quiet_shutdown' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_close': (.text+0x3c0): undefined reference to `SSL_shutdown' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_delete': (.text+0x407): undefined reference to `SSL_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `sslaccept': (.text+0x447): undefined reference to `SSL_accept' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `sslconnect': (.text+0x467): undefined reference to `SSL_connect' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_has_data': (.text+0x4ac): undefined reference to `SSL_pending' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x63): undefined reference to `SSL_load_error_strings' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x8a): undefined reference to `TLSv1_server_method' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x92): undefined reference to `SSL_CTX_new' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0xae): undefined reference to `SSL_CTX_set_cipher_list' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0xc5): undefined reference to `SSL_CTX_load_verify_locations' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0xe5): undefined reference to `SSL_CTX_set_default_verify_paths' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x103): undefined reference to `SSL_CTX_get_cert_store' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x116): undefined reference to `X509_STORE_load_locations' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x12b): undefined reference to `X509_STORE_set_flags' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x15f): undefined reference to `SSL_CTX_use_certificate_chain_file' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x17c): undefined reference to `SSL_CTX_use_PrivateKey_file' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x191): undefined reference to `SSL_CTX_check_private_key' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x19e): undefined reference to `DH_new' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x1b9): undefined reference to `BN_bin2bn' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x1d1): undefined reference to `BN_bin2bn' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x1fd): undefined reference to `SSL_CTX_ctrl' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x205): undefined reference to `DH_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x221): undefined reference to `TLSv1_client_method' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x268): undefined reference to `SSL_library_init' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x26d): undefined reference to `OPENSSL_add_all_algorithms_noconf' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x2d6): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x2e3): undefined reference to `SSL_CTX_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x32d): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x3ad): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x42d): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x465): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x47a): undefined reference to `DH_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x4ad): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLConnectorFd': (.text+0x514): undefined reference to `SSL_CTX_set_verify' under Centos 6.4
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
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
I did install openssl-devel. These were installed: yum -y install MariaDB-devel gcc gcc-c++ autoconf automake make libtool zlib zlib-devel openssl-devel # ls -al /usr/lib64/openssl/engines total 204 drwxr-xr-x. 2 root root 4096 Mar 16 09:45 . drwxr-xr-x. 3 root root 4096 Jan 20 09:32 .. -rwxr-xr-x 1 root root 19368 Jan 20 09:32 lib4758cca.so -rwxr-xr-x 1 root root 19600 Jan 20 09:32 libaep.so -rwxr-xr-x 1 root root 15352 Jan 20 09:32 libatalla.so -rwxr-xr-x 1 root root 6032 Jan 20 09:32 libcapi.so -rwxr-xr-x 1 root root 24048 Jan 20 09:32 libchil.so -rwxr-xr-x 1 root root 23736 Jan 20 09:32 libcswift.so -rwxr-xr-x 1 root root 6024 Jan 20 09:32 libgmp.so -rwxr-xr-x 1 root root 15256 Jan 20 09:32 libnuron.so -rwxr-xr-x 1 root root 14664 Jan 20 09:32 libpadlock.so -rwxr-xr-x 1 root root 23960 Jan 20 09:32 libsureware.so -rwxr-xr-x 1 root root 19576 Jan 20 09:32 libubsec.so # . Googled "sysbench modify “configure” to add the -m64 to compile sysbench as 64bit.". I am not sure if there are conflict when trying to link 32-bit binaries with 64-bit binaries. Does any one know how to compile sysbench as 64 bit?
Date: Tue, 17 Mar 2015 14:50:00 +0100 From: axel@askmonty.org To: maria-discuss@lists.launchpad.net Subject: Re: [Maria-discuss] Sysbench compile error for MariaDB under Centos 6.4
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
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Google said adding "-lcrypto -lssl" to $MYSQLLIBS may solve the problem but, I am not sure how to hack the makefile “wakefile” to add "-lcrypto -lssl” to the command line. Thanks From: fhou2@hotmail.com To: maria-discuss@lists.launchpad.net Subject: Sysbench compile error for MariaDB under Centos 6.4 Date: Tue, 17 Mar 2015 00:46:09 +0000 Thank you for your time. I do see the libmysqlclient installed. []# find / -name libmysqlclient_r* /usr/lib64/libmysqlclient_r.so.15 /usr/lib64/libmysqlclient_r.so.15.0.0 /usr/lib64/libmysqlclient_r.so.16.0.0 /usr/lib64/libmysqlclient_r.so.16 /usr/lib64/libmysqlclient_r.a But, I got error when I compile "make". Any ideas? 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 /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' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `send_client_reply_packet': (.text+0x2a80): undefined reference to `X509_get_subject_name' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `send_client_reply_packet': (.text+0x2a94): undefined reference to `X509_NAME_oneline' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `send_client_reply_packet': (.text+0x2aa3): undefined reference to `X509_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `send_client_reply_packet': (.text+0x2cbc): undefined reference to `ERR_error_string_n' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `mysql_close': (.text+0x35f4): undefined reference to `SSL_CTX_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `mysql_get_ssl_cipher': (.text+0x2162): undefined reference to `SSL_CIPHER_get_name' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(mysql_async.c.o): In function `my_ssl_read_async': (.text+0xcdf): undefined reference to `SSL_read' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(mysql_async.c.o): In function `my_ssl_read_async': (.text+0xd0e): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(mysql_async.c.o): In function `my_ssl_write_async': (.text+0xd8f): undefined reference to `SSL_write' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(mysql_async.c.o): In function `my_ssl_write_async': (.text+0xdbe): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(vio.c.o): In function `vio_end': (.text+0x5a7): undefined reference to `ERR_remove_state' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(vio.c.o): In function `vio_end': (.text+0x5ac): undefined reference to `ERR_free_strings' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(vio.c.o): In function `vio_end': (.text+0x5b1): undefined reference to `EVP_cleanup' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(vio.c.o): In function `vio_end': (.text+0x5b7): undefined reference to `CRYPTO_cleanup_all_ex_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosocket.c.o): In function `vio_is_connected': (.text+0xe86): undefined reference to `SSL_pending' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x3b): undefined reference to `SSL_new' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x4f): undefined reference to `SSL_clear' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x57): undefined reference to `SSL_get_session' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x62): undefined reference to `SSL_SESSION_set_timeout' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x6d): undefined reference to `SSL_set_fd' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x81): undefined reference to `SSL_ctrl' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0xab): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0xef): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0xfc): undefined reference to `SSL_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x159): undefined reference to `SSL_get_fd' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `ssl_do': (.text+0x199): undefined reference to `ERR_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_read': (.text+0x1f1): undefined reference to `SSL_read' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_read': (.text+0x207): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_write': (.text+0x2e1): undefined reference to `SSL_write' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_write': (.text+0x2f7): undefined reference to `SSL_get_error' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_close': (.text+0x3b8): undefined reference to `SSL_set_quiet_shutdown' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_close': (.text+0x3c0): undefined reference to `SSL_shutdown' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_delete': (.text+0x407): undefined reference to `SSL_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `sslaccept': (.text+0x447): undefined reference to `SSL_accept' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `sslconnect': (.text+0x467): undefined reference to `SSL_connect' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_has_data': (.text+0x4ac): undefined reference to `SSL_pending' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x63): undefined reference to `SSL_load_error_strings' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x8a): undefined reference to `TLSv1_server_method' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x92): undefined reference to `SSL_CTX_new' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0xae): undefined reference to `SSL_CTX_set_cipher_list' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0xc5): undefined reference to `SSL_CTX_load_verify_locations' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0xe5): undefined reference to `SSL_CTX_set_default_verify_paths' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x103): undefined reference to `SSL_CTX_get_cert_store' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x116): undefined reference to `X509_STORE_load_locations' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x12b): undefined reference to `X509_STORE_set_flags' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x15f): undefined reference to `SSL_CTX_use_certificate_chain_file' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x17c): undefined reference to `SSL_CTX_use_PrivateKey_file' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x191): undefined reference to `SSL_CTX_check_private_key' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x19e): undefined reference to `DH_new' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x1b9): undefined reference to `BN_bin2bn' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x1d1): undefined reference to `BN_bin2bn' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x1fd): undefined reference to `SSL_CTX_ctrl' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x205): undefined reference to `DH_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x221): undefined reference to `TLSv1_client_method' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x268): undefined reference to `SSL_library_init' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x26d): undefined reference to `OPENSSL_add_all_algorithms_noconf' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x2d6): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x2e3): undefined reference to `SSL_CTX_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x32d): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x3ad): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x42d): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x465): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x47a): undefined reference to `DH_free' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLFd': (.text+0x4ad): undefined reference to `ERR_get_error_line_data' /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLConnectorFd': (.text+0x514): undefined reference to `SSL_CTX_set_verify' under Centos 6.4
On 18.03.2015 00:36, Fay Hou wrote:
Google said adding "-lcrypto -lssl" to $MYSQLLIBS may solve the problem
That may work, depending on which version of sysbench you're trying to compile. You had to put that on the ./configure command line like so ./configure --with-mysql-libs "... -lssl -lcrypto"
but, I am not sure how to hack the makefile “wakefile” to add "-lcrypto -lssl” to the command line.
You don't have to. In this case it's easy. Linking sysbench is the last step in the build process. So it is enough to just run the corrected command line manually. Example: you get the following output --- /bin/bash ../libtool --tag=CC --mode=link gcc -pthread -g -O2 -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/usr/local/mysql/current/lib64 -lmysqlclient_r -lpthread -lz -lm -ldl -laio -lm ... Makefile:323: recipe for target 'sysbench' failed make[2]: *** [sysbench] Error 1 make[2]: Leaving directory '/tmp/sysbench-0.4.12/sysbench --- First thing to notice is the missing -lssl -lcrypto. Second thing: make was in the subdirectory "sysbench" when it ran the failed command. So let's go to that subdir too and correct the mistake: --- /tmp/sysbench-0.4.12 $cd sysbench /tmp/sysbench-0.4.12/sysbench $gcc -pthread -g -O2 -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/usr/local/mysql/current/lib64 -lmysqlclient_r -lpthread -lz -lm -lssl -lcrypto -ldl -laio -lm --- And here we are (no error message). Notice that I just copied and pasted the command line that gave the error and added the missing libs manually. I also left out the libtool foo at the beginning. The reason why you get this error is one of: - broken MySQL installation; check what "mysql_config --libs" returns. Does it include -lss and -lcrypto? - broken sysbench source - broken version of autotools installed the last two could also be "sybench source relying on different autotools version than installed". For me it happens every second or so build of sysbench that I get this type of error. But I build many different releases of sysbench on many different platforms. XL
participants (3)
-
Axel Schwenke
-
Fay Hou
-
yoku ts.