Compilation fails with the following error message (adding -lm and lssl didn't fix it, all relevant devel packages installed AFAIK):
[root@]# bzr branch lp:mydumper
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
Branched 108 revision(s).
[root@]# cd mydumper
[root@]# cmake .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using mysql-config: /usr/bin/mysql_config
-- Found MySQL: /usr/include/mysql, /usr/lib64/libmysqlclient_r.a;/usr/lib64/libpthread.so;/usr/lib64/libz.so;/usr/lib64/libm.so;/usr/lib64/librt.so;/usr/lib64/libssl.so;/usr/lib64/libcrypto.so;/usr/lib64/libdl.so
-- Found ZLIB: /usr/lib64/libz.so
-- checking for one of the modules 'glib-2.0'
-- found glib-2.0, version 2.22.5
-- checking for one of the modules 'gthread-2.0'
-- found gthread-2.0, version 2.22.5
-- checking for module 'libpcre'
-- found libpcre, version 7.8
-- Found PCRE: /usr/include
WARNINGUnable to find Sphinx documentation generator
-- ------------------------------------------------
-- MYSQL_CONFIG = /usr/bin/mysql_config
-- CMAKE_INSTALL_PREFIX = /usr/local
-- BUILD_DOCS = ON
-- RUN_CPPCHECK = OFF
-- Change a values with: cmake -D<Variable>=<Value>
-- ------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /server/src/mydumper
[root@]# make
Scanning dependencies of target mydumper
[ 20%] Building C object CMakeFiles/mydumper.dir/mydumper.c.o
[ 40%] Building C object CMakeFiles/mydumper.dir/binlog.c.o
[ 60%] Building C object CMakeFiles/mydumper.dir/server_detect.c.o
[ 80%] Building C object CMakeFiles/mydumper.dir/g_unix_signal.c.o
Linking C executable mydumper
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(libmysql.c.o): In function `fetch_float_with_conversion':
(.text+0x2d1d): undefined reference to `floor'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(libmysql.c.o): In function `fetch_float_with_conversion':
(.text+0x2df5): undefined reference to `floor'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client_plugin.c.o): In function `add_plugin':
(.text+0x159): undefined reference to `dlclose'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client_plugin.c.o): In function `mysql_client_plugin_deinit':
(.text+0x1bb): undefined reference to `dlclose'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client_plugin.c.o): In function `mysql_load_plugin_v':
(.text+0x3fe): undefined reference to `dlopen'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client_plugin.c.o): In function `mysql_load_plugin_v':
(.text+0x419): undefined reference to `dlsym'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client_plugin.c.o): In function `mysql_load_plugin_v':
(.text+0x5b6): undefined reference to `dlerror'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client_plugin.c.o): In function `mysql_load_plugin_v':
(.text+0x5c9): undefined reference to `dlclose'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(client.c.o): In function `mysql_get_ssl_cipher':
(.text+0x138d): 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+0x37a5): 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+0x37c4): 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+0x37e2): 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+0x37f1): 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+0x3a24): 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+0x41ef): 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+0x1396): 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_write_async':
(.text+0x431b): 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+0x4349): 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_read_async':
(.text+0x481b): 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+0x4849): undefined reference to `SSL_get_error'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `free_vio_ssl_acceptor_fd':
(.text+0x30): 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 `report_errors':
(.text+0x7d): 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+0x102): 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+0x10a): 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+0x12a): 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+0x141): 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+0x14e): 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+0x16a): 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+0x189): 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+0x199): 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+0x1a6): 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+0x1c1): 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+0x1d8): 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+0x203): 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+0x20b): 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+0x229): 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+0x240): 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+0x258): 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+0x25d): 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+0x2b3): 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+0x316): 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_VioSSLAcceptorFd':
(.text+0x3cd): 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_VioSSLAcceptorFd':
(.text+0x3dc): undefined reference to `SSL_CTX_set_verify'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLAcceptorFd':
(.text+0x3ec): undefined reference to `SSL_CTX_set_session_id_context'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosslfactories.c.o): In function `new_VioSSLConnectorFd':
(.text+0x44e): undefined reference to `SSL_CTX_set_verify'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosocket.c.o): In function `vio_pending':
(.text+0xf9): undefined reference to `SSL_pending'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosocket.c.o): In function `vio_poll_read':
(.text+0x2db): undefined reference to `SSL_get_fd'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viosocket.c.o): In function `vio_is_connected':
(.text+0x34b): undefined reference to `SSL_pending'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_has_data':
(.text+0x2c): 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+0x80): 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+0x94): 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+0x9c): 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+0xa7): 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+0xb3): 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+0xc5): 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+0x106): 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+0x113): 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+0x131): 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 `sslconnect':
(.text+0x147): undefined reference to `SSL_connect'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `sslaccept':
(.text+0x167): undefined reference to `SSL_accept'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_close':
(.text+0x1a8): 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+0x1b0): 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+0x1f7): undefined reference to `SSL_free'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(viossl.c.o): In function `vio_ssl_write':
(.text+0x24e): 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_read':
(.text+0x29e): undefined reference to `SSL_read'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(password.c.o): In function `check_scramble_323':
(.text+0x714): undefined reference to `floor'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(password.c.o): In function `check_scramble_323':
(.text+0x747): undefined reference to `floor'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(password.c.o): In function `check_scramble_323':
(.text+0x77a): undefined reference to `floor'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(password.c.o): In function `check_scramble_323':
(.text+0x7ad): undefined reference to `floor'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(password.c.o): In function `check_scramble_323':
(.text+0x7e0): undefined reference to `floor'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libmysqlclient_r.a(password.c.o):(.text+0x813): more undefined references to `floor' follow
collect2: ld returned 1 exit status
make[2]: *** [mydumper] Error 1
make[1]: *** [CMakeFiles/mydumper.dir/all] Error 2
make: *** [all] Error 2
same problem with MariaDB 5.5.34 and can no longer compile with mydumper 0.6.0 either - regardless of the patch used at https:/ /mariadb. atlassian. net/browse/ MDEV-4554
error is same for mydumper 0.5.2 and 0.6.0 with MariaDB 5.5.34 on CentOS 6.5 64bit OS
-- The C compiler identification is GNU mysql_config libmysqlclient_ r.a;/usr/ lib64/libpthrea d.a;/usr/ lib64/libz. so;/usr/ lib64/libm. a;/usr/ lib64/librt. a;/usr/ lib64/libssl. so;/usr/ lib64/libcrypto .so;/usr/ lib64/libdl. a
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/ccache
-- Check for working C compiler: /usr/bin/ccache -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/ccache
-- Check for working CXX compiler: /usr/bin/ccache -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using mysql-config: /usr/bin/
-- Found MySQL: /usr/include/mysql, /usr/lib64/
-- Found ZLIB: /usr/lib64/libz.so
-- checking for one of the modules 'glib-2.0'
-- found glib-2.0, version 2.26.1
-- checking for one of the modules 'gthread-2.0'
-- found gthread-2.0, version 2.26.1
-- checking for module 'libpcre'
-- found libpcre, version 7.8
-- Found PCRE: /usr/include
WARNINGUnable to find Sphinx documentation generator ------- ------- ------- ------- ------- ------ mysql_config PREFIX = /usr/local =<Value> ------- ------- ------- ------- ------- ------ src/mydumper- 0.6.0 mydumper. dir/mydumper. c.o mydumper. dir/binlog. c.o mydumper. dir/server_ detect. c.o mydumper. dir/g_unix_ signal. c.o gcc/x86_ 64-redhat- linux/4. 4.7/../ ../../. ./lib64/ libmysqlclient_ r.a(client_ plugin. c.o): In function `mysql_ load_plugin_ v': gcc/x86_ 64-redhat- linux/4. 4.7/../ ../../. ./lib64/ libpthread. a(libpthread. o): In function `sem_open': gcc/x86_ 64-redhat- linux/4. 4.7/../ ../../. ./lib64/ libpthread. a(libpthread. o): In function `__pthread_ initialize_ minimal_ internal' : gcc/x86_ 64-redhat- linux/4. 4.7/../ ../../. ./lib64/ libpthread. a(libpthread. o): In function `__pthread_ initialize_ minimal_ internal' : offset' gcc/x86_ 64-redhat- linux/4. 4.7/../ ../../. ./lib64/ libpthread. a(libpthread. o): In function `__pthread_ initialize_ minimal_ internal' : init_secure' gcc/x86_ 64-redhat- linux/4. 4.7/../ ../../. ./lib64/ libpthread. a(libpthread. o): In function `__pthread_ initialize_ mini...
-- -------
-- MYSQL_CONFIG = /usr/bin/
-- CMAKE_INSTALL_
-- BUILD_DOCS = ON
-- RUN_CPPCHECK = OFF
-- Change a values with: cmake -D<Variable>
-- -------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/
Scanning dependencies of target mydumper
[ 20%] Building C object CMakeFiles/
[ 40%] Building C object CMakeFiles/
[ 60%] Building C object CMakeFiles/
[ 80%] Building C object CMakeFiles/
Linking C executable mydumper
/usr/lib/
(.text+0x3fe): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/
(.text+0x774d): warning: the use of `mktemp' is dangerous, better use `mkstemp'
/usr/lib/
(.text+0x39): undefined reference to `__libc_setup_tls'
/usr/lib/
(.text+0x7e): undefined reference to `_dl_cpuclock_
/usr/lib/
(.text+0x275): undefined reference to `__libc_
/usr/lib/