Qihoo360/logkafka

Make Error

ihxc opened this issue · 4 comments

ihxc commented

According to the build method 1. when executing the make command. Got error as following.

The OS is centos 6.5

Linking CXX executable ../bin/logkafka
/usr/local/lib/librdkafka.a(rdkafka_transport.o): In function rd_kafka_ssl_error': /tmp/librdkafka-master/src/rdkafka_transport.c:289: undefined reference toERR_error_string_n'
/tmp/librdkafka-master/src/rdkafka_transport.c:278: undefined reference to ERR_get_error_line_data' /usr/local/lib/librdkafka.a(rdkafka_transport.o): In functionrd_kafka_transport_ssl_io_update':
/tmp/librdkafka-master/src/rdkafka_transport.c:364: undefined reference to SSL_get_error' /tmp/librdkafka-master/src/rdkafka_transport.c:379: undefined reference toSSL_get_error'
/usr/local/lib/librdkafka.a(rdkafka_transport.o): In function rd_kafka_transport_ssl_recvmsg': /tmp/librdkafka-master/src/rdkafka_transport.c:444: undefined reference toSSL_read'
/usr/local/lib/librdkafka.a(rdkafka_transport.o): In function rd_kafka_transport_ssl_sendmsg': /tmp/librdkafka-master/src/rdkafka_transport.c:412: undefined reference toSSL_write'
/usr/local/lib/librdkafka.a(rdkafka_transport.o): In function rd_kafka_transport_ssl_ctx_init': /tmp/librdkafka-master/src/rdkafka_transport.c:649: undefined reference toSSLv23_client_method'
/tmp/librdkafka-master/src/rdkafka_transport.c:649: undefined reference to SSL_CTX_new' /tmp/librdkafka-master/src/rdkafka_transport.c:655: undefined reference toSSL_CTX_set_default_passwd_cb'
/tmp/librdkafka-master/src/rdkafka_transport.c:656: undefined reference to SSL_CTX_set_default_passwd_cb_userdata' /tmp/librdkafka-master/src/rdkafka_transport.c:663: undefined reference toSSL_CTX_set_cipher_list'
/tmp/librdkafka-master/src/rdkafka_transport.c:681: undefined reference to SSL_CTX_load_verify_locations' /tmp/librdkafka-master/src/rdkafka_transport.c:698: undefined reference toSSL_CTX_use_certificate_chain_file'
/tmp/librdkafka-master/src/rdkafka_transport.c:710: undefined reference to SSL_CTX_use_PrivateKey_file' /tmp/librdkafka-master/src/rdkafka_transport.c:718: undefined reference toSSL_CTX_ctrl'
/tmp/librdkafka-master/src/rdkafka_transport.c:725: undefined reference to SSL_CTX_free' /usr/local/lib/librdkafka.a(rdkafka_transport.o): In functionrd_kafka_transport_ssl_ctx_term':
/tmp/librdkafka-master/src/rdkafka_transport.c:630: undefined reference to SSL_CTX_free' /usr/local/lib/librdkafka.a(rdkafka_transport.o): In functionrd_kafka_transport_ssl_init':
/tmp/librdkafka-master/src/rdkafka_transport.c:339: undefined reference to CRYPTO_num_locks' /tmp/librdkafka-master/src/rdkafka_transport.c:345: undefined reference toCRYPTO_set_id_callback'
/tmp/librdkafka-master/src/rdkafka_transport.c:346: undefined reference to CRYPTO_set_locking_callback' /tmp/librdkafka-master/src/rdkafka_transport.c:348: undefined reference toSSL_load_error_strings'
/tmp/librdkafka-master/src/rdkafka_transport.c:349: undefined reference to SSL_library_init' /usr/local/lib/librdkafka.a(rdkafka_transport.o): In functionrd_kafka_transport_close':
/tmp/librdkafka-master/src/rdkafka_transport.c:81: undefined reference to SSL_shutdown' /tmp/librdkafka-master/src/rdkafka_transport.c:82: undefined reference toSSL_free'
/tmp/librdkafka-master/src/rdkafka_transport.c:88: undefined reference to sasl_dispose' /usr/local/lib/librdkafka.a(rdkafka_transport.o): In functionrd_kafka_transport_ssl_handhsake':
/tmp/librdkafka-master/src/rdkafka_transport.c:598: undefined reference to SSL_do_handshake' /usr/local/lib/librdkafka.a(rdkafka_transport.o): In functionrd_kafka_transport_ssl_io_update':
/tmp/librdkafka-master/src/rdkafka_transport.c:364: undefined reference to SSL_get_error' /tmp/librdkafka-master/src/rdkafka_transport.c:379: undefined reference toSSL_get_error'
/usr/local/lib/librdkafka.a(rdkafka_transport.o): In function rd_kafka_transport_ssl_connect': /tmp/librdkafka-master/src/rdkafka_transport.c:506: undefined reference toSSL_new'
/tmp/librdkafka-master/src/rdkafka_transport.c:510: undefined reference to SSL_set_fd' /tmp/librdkafka-master/src/rdkafka_transport.c:513: undefined reference toSSL_connect'
/usr/local/lib/librdkafka.a(rdkafka_transport.o): In function rd_kafka_transport_ssl_verify': /tmp/librdkafka-master/src/rdkafka_transport.c:565: undefined reference toSSL_get_peer_certificate'
/tmp/librdkafka-master/src/rdkafka_transport.c:566: undefined reference to X509_free' /tmp/librdkafka-master/src/rdkafka_transport.c:574: undefined reference toSSL_get_verify_result'
/usr/local/lib/librdkafka.a(rdkafka_transport.o): In function rd_kafka_transport_ssl_handhsake': /tmp/librdkafka-master/src/rdkafka_transport.c:575: undefined reference toX509_verify_cert_error_string'
/usr/local/lib/librdkafka.a(rdkafka_transport.o): In function rd_kafka_transport_ssl_init': /tmp/librdkafka-master/src/rdkafka_transport.c:350: undefined reference toOPENSSL_add_all_algorithms_noconf'
/usr/local/lib/librdkafka.a(rdkafka_sasl.o): In function rd_kafka_sasl_global_init': /tmp/librdkafka-master/src/rdkafka_sasl.c:557: undefined reference tosasl_client_init'
/tmp/librdkafka-master/src/rdkafka_sasl.c:559: undefined reference to sasl_errstring' /usr/local/lib/librdkafka.a(rdkafka_sasl.o): In functionrd_kafka_sasl_client_new':
/tmp/librdkafka-master/src/rdkafka_sasl.c:459: undefined reference to sasl_client_new' /tmp/librdkafka-master/src/rdkafka_sasl.c:484: undefined reference tosasl_client_start'
/tmp/librdkafka-master/src/rdkafka_sasl.c:495: undefined reference to sasl_errdetail' /tmp/librdkafka-master/src/rdkafka_sasl.c:470: undefined reference tosasl_listmech'
/tmp/librdkafka-master/src/rdkafka_sasl.c:463: undefined reference to sasl_errstring' /usr/local/lib/librdkafka.a(rdkafka_sasl.o): In functionrd_kafka_sasl_handle_recv':
/tmp/librdkafka-master/src/rdkafka_sasl.c:118: undefined reference to sasl_client_step' /tmp/librdkafka-master/src/rdkafka_sasl.c:151: undefined reference tosasl_errdetail'
/tmp/librdkafka-master/src/rdkafka_sasl.c:118: undefined reference to sasl_client_step' /tmp/librdkafka-master/src/rdkafka_sasl.c:163: undefined reference tosasl_getprop'
/tmp/librdkafka-master/src/rdkafka_sasl.c:167: undefined reference to sasl_getprop' /tmp/librdkafka-master/src/rdkafka_sasl.c:171: undefined reference tosasl_getprop'
/usr/local/lib/librdkafka.a(rdkafka_sasl.o): In function rd_kafka_sasl_global_term': /tmp/librdkafka-master/src/rdkafka_sasl.c:545: undefined reference tosasl_done'
collect2: ld ?? 1
make[2]: *** [bin/logkafka] Error 1
make[1]: *** [src/CMakeFiles/logkafka.dir/all] Error 2
make: *** [all] Error 2

sudo yum install openssl

@huoxiaochai Ok now ?

ihxc commented

Ok. Or disable the ssl or sasl support.

@zheolong @ihxc Hello, how did you resolve the issue that gives this particular warning : /tmp/librdkafka-master/src/rdkafka_transport.c:88: undefined reference to sasl_dispose' /usr/local

I receive this error but can't resolve it...
/home/ilan/librdkafka-master/src/rdkafka_sasl_cyrus.c:409: undefined reference to `sasl_dispose'