adpuckett87/modbus-client-server

collect2: error: ld returned 1 exit status

Closed this issue · 1 comments

[root@centos]# gcc inih/ini.c modbus-server.c -o modbus-server -std=gnu99 mysql_config --cflags --libs pkg-config --libs --cflags libmodbus

/usr/lib64//libmariadb.a(mariadb_lib.c.o): In function mysql_server_init':
(.text+0x1ae4): undefined reference to pthread_once' /usr/lib64//libmariadb.a(ma_stmt_codec.c.o): In function convert_from_double.isra.2':
(.text+0x176c): undefined reference to floor' /usr/lib64//libmariadb.a(ma_stmt_codec.c.o): In function convert_from_double.isra.2':
(.text+0x17bd): undefined reference to floor' /usr/lib64//libmariadb.a(ma_stmt_codec.c.o): In function convert_from_float.isra.3':
(.text+0x1b4a): undefined reference to floorf' /usr/lib64//libmariadb.a(ma_stmt_codec.c.o): In function convert_from_float.isra.3':
(.text+0x1b94): undefined reference to floorf' /usr/lib64//libmariadb.a(ma_stmt_codec.c.o): In function convert_from_long.isra.4':
(.text+0x2090): undefined reference to ceilf' /usr/lib64//libmariadb.a(ma_stmt_codec.c.o): In function convert_from_long.isra.4':
(.text+0x210d): undefined reference to ceil' /usr/lib64//libmariadb.a(ma_stmt_codec.c.o): In function convert_from_long.isra.4':
(.text+0x220b): undefined reference to ceil' /usr/lib64//libmariadb.a(ma_stmt_codec.c.o): In function convert_from_long.isra.4':
(.text+0x224e): undefined reference to ceilf' /usr/lib64//libmariadb.a(ma_client_plugin.c.o): In function mysql_client_plugin_deinit':
(.text+0x20b): undefined reference to dlclose' /usr/lib64//libmariadb.a(ma_client_plugin.c.o): In function mysql_load_plugin_v':
(.text+0x5a9): undefined reference to dlopen' /usr/lib64//libmariadb.a(ma_client_plugin.c.o): In function mysql_load_plugin_v':
(.text+0x5c4): undefined reference to dlsym' /usr/lib64//libmariadb.a(ma_client_plugin.c.o): In function mysql_load_plugin_v':
(.text+0x677): undefined reference to dlclose' /usr/lib64//libmariadb.a(ma_client_plugin.c.o): In function mysql_load_plugin_v':
(.text+0x75c): undefined reference to dlclose' /usr/lib64//libmariadb.a(ma_client_plugin.c.o): In function mysql_load_plugin_v':
(.text+0x8e5): undefined reference to dlerror' /usr/lib64//libmariadb.a(ma_client_plugin.c.o): In function mysql_load_plugin_v':
(.text+0x933): undefined reference to dlclose' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_set_error':
(.text+0x52): undefined reference to ERR_get_error' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_set_error':
(.text+0x65): undefined reference to ERR_reason_error_string' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_start':
(.text+0x189): undefined reference to CRYPTO_THREADID_get_callback' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_start':
(.text+0x193): undefined reference to SSL_library_init' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_start':
(.text+0x19a): undefined reference to OPENSSL_config' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_start':
(.text+0x19f): undefined reference to SSL_load_error_strings' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_start':
(.text+0x1a4): undefined reference to OPENSSL_add_all_algorithms_noconf' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_start':
(.text+0x1ab): undefined reference to SSLeay_version' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_start':
(.text+0x209): undefined reference to CRYPTO_get_id_callback' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_start':
(.text+0x213): undefined reference to CRYPTO_num_locks' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_start':
(.text+0x22c): undefined reference to CRYPTO_set_locking_callback' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_start':
(.text+0x238): undefined reference to CRYPTO_THREADID_set_callback' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_end':
(.text+0x2ee): undefined reference to CRYPTO_set_locking_callback' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_end':
(.text+0x2f5): undefined reference to CRYPTO_THREADID_set_callback' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_end':
(.text+0x317): undefined reference to CRYPTO_num_locks' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_end':
(.text+0x373): undefined reference to ERR_remove_thread_state' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_end':
(.text+0x378): undefined reference to EVP_cleanup' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_end':
(.text+0x37d): undefined reference to CRYPTO_cleanup_all_ex_data' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_end':
(.text+0x382): undefined reference to ERR_free_strings' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_end':
(.text+0x387): undefined reference to CONF_modules_free' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_end':
(.text+0x391): undefined reference to CONF_modules_unload' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x411): undefined reference to SSLv23_client_method' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x419): undefined reference to SSL_CTX_new' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x4e6): undefined reference to SSL_CTX_ctrl' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x4ee): undefined reference to SSL_new' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x52b): undefined reference to SSL_get_SSL_CTX' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x55b): undefined reference to SSL_CTX_load_verify_locations' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x589): undefined reference to SSL_CTX_free' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x591): undefined reference to SSL_free' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x5ef): undefined reference to SSL_CTX_set_default_verify_paths' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x638): undefined reference to SSL_CTX_free' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x654): undefined reference to SSL_set_cipher_list' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x6a6): undefined reference to SSL_check_private_key' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x6ce): undefined reference to SSL_CTX_get_cert_store' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x6ed): undefined reference to X509_STORE_load_locations' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x702): undefined reference to X509_STORE_set_flags' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x720): undefined reference to SSL_CTX_set_verify' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x72d): undefined reference to SSL_set_ex_data' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x79c): undefined reference to SSL_CTX_use_certificate_chain_file' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x7b5): undefined reference to SSL_use_certificate_file' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x808): undefined reference to EVP_PKEY_new' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x81e): undefined reference to PEM_read_PrivateKey' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x832): undefined reference to SSL_use_PrivateKey' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x844): undefined reference to ERR_peek_error' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x850): undefined reference to EVP_PKEY_free' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_init':
(.text+0x881): undefined reference to EVP_PKEY_free' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_connect':
(.text+0x90e): undefined reference to SSL_get_ex_data' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_connect':
(.text+0x932): undefined reference to SSL_clear' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_connect':
(.text+0x944): undefined reference to SSL_set_fd' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_connect':
(.text+0x94c): undefined reference to SSL_connect' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_connect':
(.text+0x95e): undefined reference to SSL_get_error' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_connect':
(.text+0x9bc): undefined reference to SSL_connect' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_connect':
(.text+0xa14): undefined reference to SSL_get_verify_result' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_connect':
(.text+0xa20): undefined reference to X509_verify_cert_error_string' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_read_async':
(.text+0xabe): undefined reference to SSL_read' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_read_async':
(.text+0xaf3): undefined reference to SSL_get_error' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_write_async':
(.text+0xb8e): undefined reference to SSL_write' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_write_async':
(.text+0xbc3): undefined reference to SSL_get_error' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_read':
(.text+0xc47): undefined reference to SSL_get_error' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_read':
(.text+0xc7a): undefined reference to SSL_read' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_write':
(.text+0xcc7): undefined reference to SSL_get_error' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_write':
(.text+0xcfa): undefined reference to SSL_write' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_close':
(.text+0xd47): undefined reference to SSL_get_SSL_CTX' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_close':
(.text+0xd54): undefined reference to SSL_CTX_free' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_close':
(.text+0xd66): undefined reference to SSL_set_quiet_shutdown' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_close':
(.text+0xd6e): undefined reference to SSL_shutdown' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_close':
(.text+0xd81): undefined reference to SSL_free' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_verify_server_cert':
(.text+0xded): undefined reference to SSL_get_ex_data' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_verify_server_cert':
(.text+0xe09): undefined reference to SSL_get_peer_certificate' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_verify_server_cert':
(.text+0xe2b): undefined reference to X509_check_host' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_verify_server_cert':
(.text+0xe41): undefined reference to X509_check_ip_asc' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_verify_server_cert':
(.text+0xe4e): undefined reference to X509_free' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_verify_server_cert':
(.text+0xe97): undefined reference to X509_free' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_get_cipher':
(.text+0xf13): undefined reference to SSL_get_current_cipher' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_get_finger_print':
(.text+0xf5f): undefined reference to SSL_get_ex_data' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_get_finger_print':
(.text+0xf6b): undefined reference to SSL_get_peer_certificate' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_get_finger_print':
(.text+0xf82): undefined reference to EVP_sha1' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_get_finger_print':
(.text+0xf94): undefined reference to X509_digest' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_get_finger_print':
(.text+0xfce): undefined reference to X509_free' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_get_finger_print':
(.text+0x1004): undefined reference to X509_free' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_get_protocol_version':
(.text+0x1063): undefined reference to SSL_version' /usr/lib64//libmariadb.a(openssl.c.o): In function my_cb_threadid':
(.text+0x1e): undefined reference to CRYPTO_THREADID_set_numeric' /usr/lib64//libmariadb.a(openssl.c.o): In function ma_tls_get_cipher':
(.text+0xf1c): undefined reference to SSL_CIPHER_get_name' /usr/lib64//libmariadb.a(ma_compress.c.o): In function _mariadb_compress_alloc':
(.text+0x5d): undefined reference to compress' /usr/lib64//libmariadb.a(ma_compress.c.o): In function _mariadb_uncompress':
(.text+0x191): undefined reference to uncompress' /usr/lib64//libmariadb.a(ma_password.c.o): In function ma_scramble_323':
(.text+0x5a5): undefined reference to floor' /usr/lib64//libmariadb.a(ma_password.c.o): In function ma_scramble_323':
(.text+0x5ce): undefined reference to floor' collect2: error: ld returned 1 exit status

It looks like you are using MariaDB instead of MySQL. Make sure that mysql and libmysqlcient-dev are installed and configured correctly