viewssld icon indicating copy to clipboard operation
viewssld copied to clipboard

Ubuntu compile problem.

Open uitk7 opened this issue 9 years ago • 3 comments

Hi all. When I complied viewssld on ubuntu with option '-lcrypto' I had problem: utils.c: In function ‘errorlog’: utils.c:47:3: warning: format not a string literal and no format arguments [-Wformat-security] syslog(LOG_DAEMON|LOG_ERR, message); ^ utils.c:50:3: warning: format not a string literal and no format arguments [-Wformat-security] fprintf(stderr, message); ^ mv -f .deps/utils.Tpo .deps/utils.Po gcc -g -O2 -o viewssld viewssld.o utils.o -lpcap -lssl -lnet -ldssl -lcrypto //usr/local/lib/libdssl.a(compression.o): In function dssl_compr_init': compression.c:(.text+0x66): undefined reference toinflateInit_' //usr/local/lib/libdssl.a(compression.o): In function dssl_compr_deinit': compression.c:(.text+0xb8): undefined reference toinflateEnd' //usr/local/lib/libdssl.a(compression.o): In function dssl_decompress': compression.c:(.text+0x126): undefined reference toinflate' collect2: error: ld returned 1 exit status

without option -lcrypto, I had another problem :( utils.c:47:3: warning: format not a string literal and no format arguments [-Wformat-security] syslog(LOG_DAEMON|LOG_ERR, message); ^ utils.c:50:3: warning: format not a string literal and no format arguments [-Wformat-security] fprintf(stderr, message); ^ mv -f .deps/utils.Tpo .deps/utils.Po gcc -g -O2 -o viewssld viewssld.o utils.o -lpcap -lssl -lnet -ldssl /usr/bin/ld: //usr/local/lib/libdssl.a(ssl_decode_hs.o): undefined reference to symbol 'X509_free@@OPENSSL_1.0.0' //lib/x86_64-linux-gnu/libcrypto.so.1.0.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[1]: *** [viewssld] Error 1

I used Ubuntu Server 14.04 Any help would be appreciated. Thanks. UIT.

uitk7 avatar Dec 13 '15 02:12 uitk7

Try -lcrypto -lz

It worked for me.

You need th change src/ Makefile.in from:

sbin_PROGRAMS = viewssld viewssld_SOURCES = viewssld.c utils.c viewssld_LDADD = -lpcap -lssl -lnet -ldssl

to:

sbin_PROGRAMS = viewssld viewssld_SOURCES = viewssld.c utils.c viewssld_LDADD = -lpcap -lssl -lnet -ldssl -lcrypto -lz

It compiled for me in that case.

onurd86 avatar Aug 09 '16 19:08 onurd86

Thanks @cryptotiger ! Works great on Ubuntu 16.04. It makes sense to push this change into git as, at the end of the day, viewssld does depend on libcrypto/libz. I wonder how did it compile in the past w/o these options.

andreycpp avatar Aug 23 '16 06:08 andreycpp

[ 1%] Built target sqlite3 [ 3%] Built target bcrypt [ 4%] Built target SqliteConnector [ 8%] Built target calciteserver_thrift [ 8%] Built target mapd_thrift [ 8%] Built target ScannerFiles [ 8%] Built target ParserFiles [ 9%] Built target CudaMgr [ 10%] Built target Utils [ 12%] Built target Shared [ 13%] Built target Fragmenter [ 14%] Built target mapd_web_server [ 15%] Built target token_completion_hints [ 18%] Built target frontend [ 19%] Built target gtest [ 20%] Built target mapd_java_components [ 20%] Built target linenoise [ 20%] Built target geo_samples [ 33%] Built target rdkafka [ 33%] Built target gdal-data [ 34%] Built target group_by_hash_test [ 35%] Built target UtilTest [ 36%] Built target TokenCompletionHintsTest [ 36%] Built target mapdql [ 36%] Built target RowToColumn [ 38%] Built target mapd_sample_thrift [ 39%] Built target StringDictionary [ 40%] Built target thrift_handler [ 44%] Built target rdkafka++ [ 49%] Built target DataMgr [ 50%] Built target StreamImporter [ 50%] Built target generate_cert [ 51%] Built target StringDictionaryTest [ 51%] Linking CXX executable ../bin/KafkaImporter [ 52%] Built target DataGen [ 53%] Built target StreamInsert [ 53%] Built target StreamInsertSimple [ 53%] Built target Chunk [ 54%] Built target Calcite /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_CTX_new@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_get_verify_mode@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_CTX_set_verify@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to CRYPTO_num_locks@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_CTX_set_default_passwd_cb_userdata@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_get_wbio@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to BIO_ctrl@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_peek@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to CRYPTO_set_dynlock_destroy_callback@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_CTX_use_certificate_chain_file@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_get_shutdown@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_CTX_free@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to ERR_get_error@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to CRYPTO_set_locking_callback@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to TLSv1_method@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_new@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_load_error_strings@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to ASN1_STRING_data@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_get_error@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to X509_NAME_get_entry@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_write@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to CRYPTO_free@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to EVP_cleanup@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to X509_verify_cert_error_string@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to X509_free@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_CTX_load_verify_locations@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to ASN1_STRING_length@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_CTX_use_PrivateKey_file@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to ERR_peek_error@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to ERR_free_strings@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to sk_num@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_free@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_accept@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to ERR_remove_state@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_ctrl@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to ASN1_STRING_to_UTF8@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to ERR_clear_error@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to TLSv1_2_method@OPENSSL_1.0.1' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_get_rbio@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_set_fd@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to CRYPTO_cleanup_all_ex_data@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to BIO_s_mem@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_read@OPENSSL_1.0.0' /usr/[ 56%] Built target Catalog local/mapd-deps/lib/libthrift.so: undefined reference to SSL_set_bio@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to GENERAL_NAME_free@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to ERR_reason_error_string@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_connect@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to X509_NAME_get_index_by_NID@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_CTX_ctrl@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to RAND_poll@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_CTX_set_default_passwd_cb@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSLv23_method@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to BIO_new@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_library_init@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to X509_get_subject_name@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_CTX_set_cipher_list@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to X509_get_ext_d2i@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to X509_NAME_ENTRY_get_data@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to TLSv1_1_method@OPENSSL_1.0.1' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to sk_value@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to CRYPTO_set_dynlock_create_callback@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to sk_pop_free@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to CRYPTO_set_dynlock_lock_callback@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_get_verify_result@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_shutdown@OPENSSL_1.0.0' /usr/local/mapd-deps/lib/libthrift.so: undefined reference to SSL_get_peer_certificate@OPENSSL_1.0.0' collect2: error: ld returned 1 exit status Import/CMakeFiles/KafkaImporter.dir/build.make:108: recipe for target 'bin/KafkaImporter' failed make[2]: *** [bin/KafkaImporter] Error 1 CMakeFiles/Makefile2:1391: recipe for target 'Import/CMakeFiles/KafkaImporter.dir/all' failed make[1]: *** [Import/CMakeFiles/KafkaImporter.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 56%] Built target Analyzer [ 57%] Built target CsvImport -- Configuring done -- Generating done -- Build files have been written to: /home/thickstat/Downloads/mapd-core/build [ 57%] Built target rerun_cmake Makefile:160: recipe for target 'all' failed make: *** [all] Error 2

i am using ubuntu 16.04 this is my cmake command "cmake -DENABLE_TSAN=on -DENABLE_CUDA=off .." i am using openssl 1.0.2p version please help me to slove this issue

nagu0011 avatar Dec 05 '18 07:12 nagu0011