yourWaifu / sleepy-discord

C++ library for the Discord chat client. Please use Rust for new bots
https://yourWaifu.github.io/sleepy-discord/
MIT License
707 stars 95 forks source link

libcurl errors #109

Closed TheMorc closed 1 year ago

TheMorc commented 6 years ago

Um hello, i seem to have issues with compiling this thing on macOS... I tried both master and developer version of this but both are giving same errors with libcurl.


ld: warning: ld: warning: ignoring file /usr/local/lib/libssl.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/lib/libssl.aignoring file /usr/local/lib/libcrypto.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/lib/libcrypto.a

Undefined symbols for architecture x86_64:
  "_ASN1_INTEGER_get", referenced from:
      _get_cert_chain in openssl.c.o
  "_ASN1_STRING_data", referenced from:
      _verifyhost in openssl.c.o
  "_ASN1_STRING_length", referenced from:
      _verifyhost in openssl.c.o
  "_ASN1_STRING_print", referenced from:
      _X509V3_ext in openssl.c.o
  "_ASN1_STRING_to_UTF8", referenced from:
      _verifyhost in openssl.c.o
  "_ASN1_STRING_type", referenced from:
      _verifyhost in openssl.c.o
  "_ASN1_TIME_print", referenced from:
      _servercert in openssl.c.o
      _get_cert_chain in openssl.c.o
  "_BIO_ctrl", referenced from:
      _ossl_connect_step1 in openssl.c.o
      _servercert in openssl.c.o
      _get_cert_chain in openssl.c.o
      _x509_name_oneline in openssl.c.o
      _X509V3_ext in openssl.c.o
      _pubkey_show in openssl.c.o
  "_BIO_f_ssl", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_BIO_free", referenced from:
      _servercert in openssl.c.o
      _get_cert_chain in openssl.c.o
      _x509_name_oneline in openssl.c.o
      _X509V3_ext in openssl.c.o
  "_BIO_new", referenced from:
      _ossl_connect_step1 in openssl.c.o
      _servercert in openssl.c.o
      _get_cert_chain in openssl.c.o
      _x509_name_oneline in openssl.c.o
      _X509V3_ext in openssl.c.o
  "_BIO_printf", referenced from:
      _get_cert_chain in openssl.c.o
  "_BIO_puts", referenced from:
      _get_cert_chain in openssl.c.o
  "_BIO_s_mem", referenced from:
      _servercert in openssl.c.o
      _get_cert_chain in openssl.c.o
      _x509_name_oneline in openssl.c.o
      _X509V3_ext in openssl.c.o
  "_BN_num_bits", referenced from:
      _get_cert_chain in openssl.c.o
  "_BN_print", referenced from:
      _pubkey_show in openssl.c.o
  "_CONF_modules_free", referenced from:
      _Curl_ossl_cleanup in openssl.c.o
  "_CONF_modules_load_file", referenced from:
      _Curl_ossl_init in openssl.c.o
  "_CRYPTO_free", referenced from:
      _verifyhost in openssl.c.o
  "_CRYPTO_malloc", referenced from:
      _verifyhost in openssl.c.o
  "_DES_ecb_encrypt", referenced from:
      _Curl_ntlm_core_lm_resp in curl_ntlm_core.c.o
      _Curl_ntlm_core_mk_lm_hash in curl_ntlm_core.c.o
  "_DES_set_key", referenced from:
      _setup_des_key in curl_ntlm_core.c.o
  "_DES_set_odd_parity", referenced from:
      _setup_des_key in curl_ntlm_core.c.o
  "_ENGINE_by_id", referenced from:
      _Curl_ossl_set_engine in openssl.c.o
  "_ENGINE_ctrl", referenced from:
      _cert_stuff in openssl.c.o
  "_ENGINE_ctrl_cmd", referenced from:
      _cert_stuff in openssl.c.o
  "_ENGINE_finish", referenced from:
      _Curl_ossl_close_all in openssl.c.o
      _Curl_ossl_set_engine in openssl.c.o
  "_ENGINE_free", referenced from:
      _Curl_ossl_close_all in openssl.c.o
      _Curl_ossl_set_engine in openssl.c.o
  "_ENGINE_get_first", referenced from:
      _Curl_ossl_engines_list in openssl.c.o
  "_ENGINE_get_id", referenced from:
      _Curl_ossl_set_engine_default in openssl.c.o
      _Curl_ossl_engines_list in openssl.c.o
  "_ENGINE_get_next", referenced from:
      _Curl_ossl_engines_list in openssl.c.o
  "_ENGINE_init", referenced from:
      _Curl_ossl_set_engine in openssl.c.o
  "_ENGINE_load_private_key", referenced from:
      _cert_stuff in openssl.c.o
  "_ENGINE_set_default", referenced from:
      _Curl_ossl_set_engine_default in openssl.c.o
  "_ERR_clear_error", referenced from:
      _Curl_ossl_shutdown in openssl.c.o
      _ossl_connect_step2 in openssl.c.o
      _ossl_recv in openssl.c.o
      _ossl_send in openssl.c.o
  "_ERR_error_string_n", referenced from:
      _ossl_strerror in openssl.c.o
  "_ERR_free_strings", referenced from:
      _Curl_ossl_cleanup in openssl.c.o
  "_ERR_get_error", referenced from:
      _Curl_ossl_shutdown in openssl.c.o
      _Curl_ossl_set_engine in openssl.c.o
      _ossl_connect_step1 in openssl.c.o
      _ossl_connect_step2 in openssl.c.o
      _ossl_recv in openssl.c.o
      _ossl_send in openssl.c.o
      _cert_stuff in openssl.c.o
      ...
  "_ERR_peek_error", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_ERR_remove_thread_state", referenced from:
      _Curl_ossl_cleanup in openssl.c.o
      _Curl_ossl_close_all in openssl.c.o
  "_EVP_PKEY_copy_parameters", referenced from:
      _cert_stuff in openssl.c.o
  "_EVP_PKEY_free", referenced from:
      _cert_stuff in openssl.c.o
      _get_cert_chain in openssl.c.o
  "_EVP_PKEY_get1_RSA", referenced from:
      _cert_stuff in openssl.c.o
  "_EVP_PKEY_id", referenced from:
      _cert_stuff in openssl.c.o
  "_EVP_cleanup", referenced from:
      _Curl_ossl_cleanup in openssl.c.o
  "_GENERAL_NAMES_free", referenced from:
      _verifyhost in openssl.c.o
  "_MD4_Final", referenced from:
      _Curl_ntlm_core_mk_nt_hash in curl_ntlm_core.c.o
  "_MD4_Init", referenced from:
      _Curl_ntlm_core_mk_nt_hash in curl_ntlm_core.c.o
  "_MD4_Update", referenced from:
      _Curl_ntlm_core_mk_nt_hash in curl_ntlm_core.c.o
  "_MD5_Final", referenced from:
      _Curl_md5it in md5.c.o
      _Curl_HMAC_MD5 in md5.c.o
      _Curl_DIGEST_MD5 in md5.c.o
      _Curl_ossl_md5sum in openssl.c.o
  "_MD5_Init", referenced from:
      _Curl_md5it in md5.c.o
      _Curl_HMAC_MD5 in md5.c.o
      _Curl_DIGEST_MD5 in md5.c.o
      _Curl_ossl_md5sum in openssl.c.o
  "_MD5_Update", referenced from:
      _Curl_md5it in md5.c.o
      _Curl_HMAC_MD5 in md5.c.o
      _Curl_DIGEST_MD5 in md5.c.o
      _Curl_ossl_md5sum in openssl.c.o
  "_OCSP_BASICRESP_free", referenced from:
      _verifystatus in openssl.c.o
  "_OCSP_RESPONSE_free", referenced from:
      _verifystatus in openssl.c.o
  "_OCSP_basic_verify", referenced from:
      _verifystatus in openssl.c.o
  "_OCSP_cert_status_str", referenced from:
      _verifystatus in openssl.c.o
  "_OCSP_check_validity", referenced from:
      _verifystatus in openssl.c.o
  "_OCSP_crl_reason_str", referenced from:
      _verifystatus in openssl.c.o
  "_OCSP_resp_count", referenced from:
      _verifystatus in openssl.c.o
  "_OCSP_resp_get0", referenced from:
      _verifystatus in openssl.c.o
  "_OCSP_response_get1_basic", referenced from:
      _verifystatus in openssl.c.o
  "_OCSP_response_status", referenced from:
      _verifystatus in openssl.c.o
  "_OCSP_response_status_str", referenced from:
      _verifystatus in openssl.c.o
  "_OCSP_single_get0_status", referenced from:
      _verifystatus in openssl.c.o
  "_OPENSSL_add_all_algorithms_noconf", referenced from:
      _Curl_ossl_init in openssl.c.o
  "_OPENSSL_load_builtin_modules", referenced from:
      _Curl_ossl_init in openssl.c.o
  "_PEM_read_X509", referenced from:
      _servercert in openssl.c.o
  "_PEM_write_bio_X509", referenced from:
      _get_cert_chain in openssl.c.o
  "_PKCS12_PBE_add", referenced from:
      _cert_stuff in openssl.c.o
  "_PKCS12_free", referenced from:
      _cert_stuff in openssl.c.o
  "_PKCS12_parse", referenced from:
      _cert_stuff in openssl.c.o
  "_RAND_add", referenced from:
      _Curl_ossl_seed in openssl.c.o
  "_RAND_bytes", referenced from:
      _Curl_ossl_random in openssl.c.o
  "_RAND_file_name", referenced from:
      _Curl_ossl_seed in openssl.c.o
  "_RAND_load_file", referenced from:
      _Curl_ossl_seed in openssl.c.o
  "_RAND_status", referenced from:
      _rand_enough in openssl.c.o
  "_RSA_flags", referenced from:
      _cert_stuff in openssl.c.o
  "_RSA_free", referenced from:
      _cert_stuff in openssl.c.o
  "_SHA256_Final", referenced from:
      _Curl_ossl_sha256sum in openssl.c.o
  "_SHA256_Init", referenced from:
      _Curl_ossl_sha256sum in openssl.c.o
  "_SHA256_Update", referenced from:
      _Curl_ossl_sha256sum in openssl.c.o
  "_SSL_CIPHER_get_name", referenced from:
      _ossl_connect_step2 in openssl.c.o
  "_SSL_COMP_free_compression_methods", referenced from:
      _Curl_ossl_cleanup in openssl.c.o
  "_SSL_CTX_add_client_CA", referenced from:
      _cert_stuff in openssl.c.o
  "_SSL_CTX_check_private_key", referenced from:
      _cert_stuff in openssl.c.o
  "_SSL_CTX_ctrl", referenced from:
      _ossl_connect_step1 in openssl.c.o
      _cert_stuff in openssl.c.o
  "_SSL_CTX_free", referenced from:
      _ossl_connect_step1 in openssl.c.o
      _ossl_close in openssl.c.o
  "_SSL_CTX_get_cert_store", referenced from:
      _ossl_connect_step1 in openssl.c.o
      _verifystatus in openssl.c.o
  "_SSL_CTX_load_verify_locations", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_SSL_CTX_new", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_SSL_CTX_set_alpn_protos", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_SSL_CTX_set_cipher_list", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_SSL_CTX_set_default_passwd_cb", referenced from:
      _cert_stuff in openssl.c.o
  "_SSL_CTX_set_default_passwd_cb_userdata", referenced from:
      _cert_stuff in openssl.c.o
  "_SSL_CTX_set_msg_callback", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_SSL_CTX_set_next_proto_select_cb", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_SSL_CTX_set_verify", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_SSL_CTX_use_PrivateKey", referenced from:
      _cert_stuff in openssl.c.o
  "_SSL_CTX_use_PrivateKey_file", referenced from:
      _cert_stuff in openssl.c.o
  "_SSL_CTX_use_certificate", referenced from:
      _cert_stuff in openssl.c.o
  "_SSL_CTX_use_certificate_chain_file", referenced from:
      _cert_stuff in openssl.c.o
  "_SSL_CTX_use_certificate_file", referenced from:
      _cert_stuff in openssl.c.o
  "_SSL_SESSION_free", referenced from:
      _Curl_ossl_session_free in openssl.c.o
      _ossl_connect_step3 in openssl.c.o
  "_SSL_connect", referenced from:
      _ossl_connect_step2 in openssl.c.o
  "_SSL_ctrl", referenced from:
      _ossl_connect_step1 in openssl.c.o
      _verifystatus in openssl.c.o
  "_SSL_free", referenced from:
      _Curl_ossl_shutdown in openssl.c.o
      _ossl_connect_step1 in openssl.c.o
      _cert_stuff in openssl.c.o
      _ossl_close in openssl.c.o
  "_SSL_get0_alpn_selected", referenced from:
      _ossl_connect_step2 in openssl.c.o
  "_SSL_get1_session", referenced from:
      _ossl_connect_step3 in openssl.c.o
  "_SSL_get_certificate", referenced from:
      _cert_stuff in openssl.c.o
  "_SSL_get_current_cipher", referenced from:
      _ossl_connect_step2 in openssl.c.o
  "_SSL_get_error", referenced from:
      _Curl_ossl_shutdown in openssl.c.o
      _ossl_connect_step2 in openssl.c.o
      _ossl_recv in openssl.c.o
      _ossl_send in openssl.c.o
  "_SSL_get_peer_cert_chain", referenced from:
      _get_cert_chain in openssl.c.o
      _verifystatus in openssl.c.o
  "_SSL_get_peer_certificate", referenced from:
      _servercert in openssl.c.o
  "_SSL_get_privatekey", referenced from:
      _cert_stuff in openssl.c.o
  "_SSL_get_verify_result", referenced from:
      _ossl_connect_step2 in openssl.c.o
      _servercert in openssl.c.o
  "_SSL_library_init", referenced from:
      _Curl_ossl_init in openssl.c.o
  "_SSL_load_error_strings", referenced from:
      _Curl_ossl_init in openssl.c.o
  "_SSL_new", referenced from:
      _ossl_connect_step1 in openssl.c.o
      _cert_stuff in openssl.c.o
  "_SSL_pending", referenced from:
      _Curl_ossl_data_pending in openssl.c.o
  "_SSL_read", referenced from:
      _Curl_ossl_shutdown in openssl.c.o
      _ossl_recv in openssl.c.o
  "_SSL_set_bio", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_SSL_set_connect_state", referenced from:
      _ossl_connect_step1 in openssl.c.o
      _ossl_close in openssl.c.o
  "_SSL_set_fd", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_SSL_set_session", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_SSL_shutdown", referenced from:
      _Curl_ossl_shutdown in openssl.c.o
      _ossl_close in openssl.c.o
  "_SSL_version", referenced from:
      _get_ssl_version_txt in openssl.c.o
  "_SSL_write", referenced from:
      _ossl_send in openssl.c.o
  "_SSLeay", referenced from:
      _Curl_ossl_version in openssl.c.o
  "_SSLv23_client_method", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_SSLv3_client_method", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_UI_OpenSSL", referenced from:
      _cert_stuff in openssl.c.o
      _ssl_ui_reader in openssl.c.o
      _ssl_ui_writer in openssl.c.o
  "_UI_create_method", referenced from:
      _cert_stuff in openssl.c.o
  "_UI_destroy_method", referenced from:
      _cert_stuff in openssl.c.o
  "_UI_get0_user_data", referenced from:
      _ssl_ui_reader in openssl.c.o
      _ssl_ui_writer in openssl.c.o
  "_UI_get_input_flags", referenced from:
      _ssl_ui_reader in openssl.c.o
      _ssl_ui_writer in openssl.c.o
  "_UI_get_string_type", referenced from:
      _ssl_ui_reader in openssl.c.o
      _ssl_ui_writer in openssl.c.o
  "_UI_method_get_closer", referenced from:
      _cert_stuff in openssl.c.o
  "_UI_method_get_opener", referenced from:
      _cert_stuff in openssl.c.o
  "_UI_method_get_reader", referenced from:
      _ssl_ui_reader in openssl.c.o
  "_UI_method_get_writer", referenced from:
      _ssl_ui_writer in openssl.c.o
  "_UI_method_set_closer", referenced from:
      _cert_stuff in openssl.c.o
  "_UI_method_set_opener", referenced from:
      _cert_stuff in openssl.c.o
  "_UI_method_set_reader", referenced from:
      _cert_stuff in openssl.c.o
  "_UI_method_set_writer", referenced from:
      _cert_stuff in openssl.c.o
  "_UI_set_result", referenced from:
      _ssl_ui_reader in openssl.c.o
  "_X509V3_EXT_print", referenced from:
      _X509V3_ext in openssl.c.o
  "_X509_EXTENSION_get_data", referenced from:
      _X509V3_ext in openssl.c.o
  "_X509_EXTENSION_get_object", referenced from:
      _X509V3_ext in openssl.c.o
  "_X509_LOOKUP_file", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_X509_NAME_ENTRY_get_data", referenced from:
      _verifyhost in openssl.c.o
  "_X509_NAME_get_entry", referenced from:
      _verifyhost in openssl.c.o
  "_X509_NAME_get_index_by_NID", referenced from:
      _verifyhost in openssl.c.o
  "_X509_NAME_print_ex", referenced from:
      _get_cert_chain in openssl.c.o
      _x509_name_oneline in openssl.c.o
  "_X509_STORE_add_lookup", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_X509_STORE_set_flags", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_X509_check_issued", referenced from:
      _servercert in openssl.c.o
  "_X509_free", referenced from:
      _cert_stuff in openssl.c.o
      _servercert in openssl.c.o
  "_X509_get_ext_d2i", referenced from:
      _verifyhost in openssl.c.o
  "_X509_get_issuer_name", referenced from:
      _servercert in openssl.c.o
      _get_cert_chain in openssl.c.o
  "_X509_get_pubkey", referenced from:
      _cert_stuff in openssl.c.o
      _get_cert_chain in openssl.c.o
  "_X509_get_serialNumber", referenced from:
      _get_cert_chain in openssl.c.o
  "_X509_get_subject_name", referenced from:
      _servercert in openssl.c.o
      _get_cert_chain in openssl.c.o
      _verifyhost in openssl.c.o
  "_X509_load_crl_file", referenced from:
      _ossl_connect_step1 in openssl.c.o
  "_X509_verify_cert_error_string", referenced from:
      _ossl_connect_step2 in openssl.c.o
      _servercert in openssl.c.o
  "_d2i_OCSP_RESPONSE", referenced from:
      _verifystatus in openssl.c.o
  "_d2i_PKCS12_fp", referenced from:
      _cert_stuff in openssl.c.o
  "_i2a_ASN1_OBJECT", referenced from:
      _get_cert_chain in openssl.c.o
  "_i2d_X509_PUBKEY", referenced from:
      _pkp_pin_peer_pubkey in openssl.c.o
  "_i2t_ASN1_OBJECT", referenced from:
      _asn1_object_dump in openssl.c.o
  "_sk_num", referenced from:
      _cert_stuff in openssl.c.o
      _get_cert_chain in openssl.c.o
      _verifyhost in openssl.c.o
      _X509V3_ext in openssl.c.o
  "_sk_pop", referenced from:
      _cert_stuff in openssl.c.o
  "_sk_pop_free", referenced from:
      _cert_stuff in openssl.c.o
  "_sk_value", referenced from:
      _get_cert_chain in openssl.c.o
      _verifyhost in openssl.c.o
      _X509V3_ext in openssl.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libcurl.dylib] Error 1
make[1]: *** [deps/cpr/opt/curl/lib/CMakeFiles/libcurl.dir/all] Error 2
make: *** [all] Error 2```

it goes all without single problems but then this all happens..
TheMorc commented 6 years ago

EDIT: tried to build curl but it's same. So it's not issue with this but with curl.

yourWaifu commented 6 years ago

I'm not sure if this'll work but try make AR=x86_64-apple-darwin1X-ar

TheMorc commented 6 years ago

it still does not work, but is there any way to compile it for 32-bit only and not for 64-bit?

yourWaifu commented 6 years ago

I think something like make CFLAGS=-m32 but you'll have to test that to be sure.

TheMorc commented 6 years ago

no, it doesn't work either...

yourWaifu commented 6 years ago

hmm, maybe try this something like this

cd buildtools
cmake .. -G Xcode