clux / muslrust

Docker environment for building musl based static linux rust binaries
MIT License
935 stars 87 forks source link

Extern functions can't be found #126

Closed madser123 closed 7 months ago

madser123 commented 8 months ago

I recently found this repo - Amazing work. It solved a lot of the issues i had with compiling to musl.

However, i am now encountering an error i simply do not understand.. I think it might be related to #81 but i am not sure.. Can anyone here help me identify if i am making mistakes, or if i have to wait for the issue to be solved?

Thank you in advance!

#0 66.14   = note: /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'sk_GENERAL_NAME_num':
#0 66.14           fe-secure-openssl.c:(.text+0x14): undefined reference to 'OPENSSL_sk_num'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'sk_GENERAL_NAME_value':
#0 66.14           fe-secure-openssl.c:(.text+0x36): undefined reference to 'OPENSSL_sk_value'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'sk_GENERAL_NAME_pop_free':
#0 66.14           fe-secure-openssl.c:(.text+0x5b): undefined reference to 'OPENSSL_sk_pop_free'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'pgtls_read':
#0 66.14           fe-secure-openssl.c:(.text+0x133): undefined reference to 'ERR_clear_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x15c): undefined reference to 'SSL_read'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x186): undefined reference to 'SSL_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1a4): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'pgtls_read_pending':
#0 66.14           fe-secure-openssl.c:(.text+0x44e): undefined reference to 'SSL_pending'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'pgtls_write':
#0 66.14           fe-secure-openssl.c:(.text+0x4a2): undefined reference to 'ERR_clear_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x4cb): undefined reference to 'SSL_write'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x4f5): undefined reference to 'SSL_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x513): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'pgtls_get_peer_certificate_hash':
#0 66.14           fe-secure-openssl.c:(.text+0x80d): undefined reference to 'X509_get_signature_nid'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x822): undefined reference to 'OBJ_find_sigid_algs'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x863): undefined reference to 'EVP_sha256'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x873): undefined reference to 'OBJ_nid2sn'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x87b): undefined reference to 'EVP_get_digestbyname'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x890): undefined reference to 'OBJ_nid2sn'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x8d7): undefined reference to 'X509_digest'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'openssl_verify_peer_name_matches_certificate_name':
#0 66.14           fe-secure-openssl.c:(.text+0x9e8): undefined reference to 'ASN1_STRING_get0_data'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x9f8): undefined reference to 'ASN1_STRING_length'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'pgtls_verify_peer_name_matches_certificate_guts':
#0 66.14           fe-secure-openssl.c:(.text+0xa67): undefined reference to 'X509_get_ext_d2i'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xb30): undefined reference to 'GENERAL_NAME_free'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xb58): undefined reference to 'X509_get_subject_name'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xb79): undefined reference to 'X509_NAME_get_index_by_NID'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xba2): undefined reference to 'X509_NAME_get_entry'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xbaa): undefined reference to 'X509_NAME_ENTRY_get_data'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'pgtls_init':
#0 66.14           fe-secure-openssl.c:(.text+0xc2e): undefined reference to 'OPENSSL_init_ssl'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'initialize_SSL':
#0 66.14           fe-secure-openssl.c:(.text+0xd52): undefined reference to 'TLS_method'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xd5a): undefined reference to 'SSL_CTX_new'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xd70): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xddb): undefined reference to 'SSL_CTX_set_options'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xdf9): undefined reference to 'SSL_CTX_ctrl'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xed9): undefined reference to 'SSL_CTX_load_verify_locations'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xee3): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xf46): undefined reference to 'SSL_CTX_free'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0xf5f): undefined reference to 'SSL_CTX_get_cert_store'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x102f): undefined reference to 'X509_STORE_load_locations'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1048): undefined reference to 'X509_STORE_set_flags'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x104d): undefined reference to 'ERR_clear_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x10dd): undefined reference to 'SSL_CTX_free'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x122e): undefined reference to 'SSL_CTX_free'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x125d): undefined reference to 'SSL_CTX_use_certificate_chain_file'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1267): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x12ca): undefined reference to 'SSL_CTX_free'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x12ea): undefined reference to 'SSL_new'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x132d): undefined reference to 'SSL_set_ex_data'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1358): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x13b4): undefined reference to 'SSL_CTX_free'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x13db): undefined reference to 'SSL_CTX_free'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x14d8): undefined reference to 'ENGINE_by_id'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x14fe): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1581): undefined reference to 'ENGINE_init'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x158e): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x15f8): undefined reference to 'ENGINE_free'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x164a): undefined reference to 'ENGINE_load_private_key'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1664): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x16d8): undefined reference to 'ENGINE_finish'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x16ee): undefined reference to 'ENGINE_free'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1739): undefined reference to 'SSL_use_PrivateKey'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1747): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x17bb): undefined reference to 'ENGINE_finish'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x17d1): undefined reference to 'ENGINE_free'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x196d): undefined reference to 'SSL_use_PrivateKey_file'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1977): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x19f4): undefined reference to 'SSL_check_private_key'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x19fe): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1a87): undefined reference to 'SSL_set_verify'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1aca): undefined reference to 'SSL_set_options'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1ae7): undefined reference to 'SSL_clear_options'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'open_client_SSL':
#0 66.14           fe-secure-openssl.c:(.text+0x1b2c): undefined reference to 'ERR_clear_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1b42): undefined reference to 'SSL_connect'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1b73): undefined reference to 'SSL_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1b7e): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1d34): undefined reference to 'SSL_get_peer_certificate'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1d5a): undefined reference to 'ERR_get_error'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'pgtls_close':
#0 66.14           fe-secure-openssl.c:(.text+0x1e3f): undefined reference to 'SSL_shutdown'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1e52): undefined reference to 'SSL_free'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1e8f): undefined reference to 'X509_free'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1ec1): undefined reference to 'ENGINE_finish'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1ed4): undefined reference to 'ENGINE_free'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'SSLerrmessage':
#0 66.14           fe-secure-openssl.c:(.text+0x1f58): undefined reference to 'ERR_reason_error_string'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'PQsslAttribute':
#0 66.14           fe-secure-openssl.c:(.text+0x2104): undefined reference to 'SSL_get_current_cipher'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x2116): undefined reference to 'SSL_CIPHER_get_bits'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x2177): undefined reference to 'SSL_get_current_cipher'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x217f): undefined reference to 'SSL_CIPHER_get_name'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x21ae): undefined reference to 'SSL_get_current_compression'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x21f2): undefined reference to 'SSL_get_version'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'my_sock_read':
#0 66.14           fe-secure-openssl.c:(.text+0x2239): undefined reference to 'BIO_get_data'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x2262): undefined reference to 'BIO_clear_flags'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x228a): undefined reference to 'BIO_set_flags'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'my_sock_write':
#0 66.14           fe-secure-openssl.c:(.text+0x22c0): undefined reference to 'BIO_get_data'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x22e9): undefined reference to 'BIO_clear_flags'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x2311): undefined reference to 'BIO_set_flags'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'my_BIO_s_socket':
#0 66.14           fe-secure-openssl.c:(.text+0x233e): undefined reference to 'BIO_s_socket'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x2347): undefined reference to 'BIO_get_new_index'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x236e): undefined reference to 'BIO_meth_new'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x23a4): undefined reference to 'BIO_meth_set_write'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x23c5): undefined reference to 'BIO_meth_set_read'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x23d9): undefined reference to 'BIO_meth_get_gets'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x23ee): undefined reference to 'BIO_meth_set_gets'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x2402): undefined reference to 'BIO_meth_get_puts'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x2417): undefined reference to 'BIO_meth_set_puts'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x242b): undefined reference to 'BIO_meth_get_ctrl'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x2440): undefined reference to 'BIO_meth_set_ctrl'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x2450): undefined reference to 'BIO_meth_get_create'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x2465): undefined reference to 'BIO_meth_set_create'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x2475): undefined reference to 'BIO_meth_get_destroy'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x248a): undefined reference to 'BIO_meth_set_destroy'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x249a): undefined reference to 'BIO_meth_get_callback_ctrl'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x24af): undefined reference to 'BIO_meth_set_callback_ctrl'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x24c2): undefined reference to 'BIO_meth_free'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(fe-secure-openssl.o): in function 'my_SSL_set_fd':
#0 66.14           fe-secure-openssl.c:(.text+0x252b): undefined reference to 'ERR_put_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x253c): undefined reference to 'BIO_new'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x256b): undefined reference to 'ERR_put_error'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x2580): undefined reference to 'BIO_set_data'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x259e): undefined reference to 'SSL_set_bio'
#0 66.14           /usr/bin/ld: fe-secure-openssl.c:(.text+0x25b9): undefined reference to 'BIO_int_ctrl'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(pg_strong_random.o): in function 'pg_strong_random':
#0 66.14           pg_strong_random.c:(.text+0x1e): undefined reference to 'RAND_status'
#0 66.14           /usr/bin/ld: pg_strong_random.c:(.text+0x28): undefined reference to 'RAND_poll'
#0 66.14           /usr/bin/ld: pg_strong_random.c:(.text+0x50): undefined reference to 'RAND_bytes'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(sha2_openssl.o): in function 'pg_sha256_init':
#0 66.14           sha2_openssl.c:(.text+0x18): undefined reference to 'SHA256_Init'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(sha2_openssl.o): in function 'pg_sha256_update':
#0 66.14           sha2_openssl.c:(.text+0x4a): undefined reference to 'SHA256_Update'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(sha2_openssl.o): in function 'pg_sha256_final':
#0 66.14           sha2_openssl.c:(.text+0x74): undefined reference to 'SHA256_Final'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(sha2_openssl.o): in function 'pg_sha512_init':
#0 66.14           sha2_openssl.c:(.text+0x93): undefined reference to 'SHA512_Init'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(sha2_openssl.o): in function 'pg_sha512_update':
#0 66.14           sha2_openssl.c:(.text+0xc5): undefined reference to 'SHA512_Update'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(sha2_openssl.o): in function 'pg_sha512_final':
#0 66.14           sha2_openssl.c:(.text+0xef): undefined reference to 'SHA512_Final'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(sha2_openssl.o): in function 'pg_sha384_init':
#0 66.14           sha2_openssl.c:(.text+0x10e): undefined reference to 'SHA384_Init'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(sha2_openssl.o): in function 'pg_sha384_update':
#0 66.14           sha2_openssl.c:(.text+0x140): undefined reference to 'SHA384_Update'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(sha2_openssl.o): in function 'pg_sha384_final':
#0 66.14           sha2_openssl.c:(.text+0x16a): undefined reference to 'SHA384_Final'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(sha2_openssl.o): in function 'pg_sha224_init':
#0 66.14           sha2_openssl.c:(.text+0x189): undefined reference to 'SHA224_Init'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(sha2_openssl.o): in function 'pg_sha224_update':
#0 66.14           sha2_openssl.c:(.text+0x1bb): undefined reference to 'SHA224_Update'
#0 66.14           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-c41a0106122de8be.rlib(sha2_openssl.o): in function 'pg_sha224_final':
#0 66.14           sha2_openssl.c:(.text+0x1e5): undefined reference to 'SHA224_Final'
#0 66.14           collect2: error: ld returned 1 exit status
#0 66.14
#0 66.14   = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
#0 66.14   = note: use the `-l` flag to specify native libraries to link
#0 66.14   = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
clux commented 8 months ago

that looks like pq trying to use openssl and probably not getting ssl included in linklibs

are you doing openssl crate import in the readme?

madser123 commented 7 months ago

I tried following this, and added openssl to my dependencies (It was not in Cargo.toml before). Heres my cargo tree output for the binary that fails (before adding openssl as a dependency):

hipster-public v0.1.0 (/home/maj/work/hiper-dok/hipster-server/bin/hipster-public)
├── biper v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/biper)
│   ├── bolt-rs v0.3.0 (/home/maj/work/hiper-dok/hipster-server/lib/bolt-rs)
│   │   ├── headhunter v0.2.0 (/home/maj/work/hiper-dok/hipster-server/lib/headhunter)
│   │   │   ├── async-trait v0.1.77 (proc-macro)
│   │   │   │   ├── proc-macro2 v1.0.78
│   │   │   │   │   └── unicode-ident v1.0.12
│   │   │   │   ├── quote v1.0.35
│   │   │   │   │   └── proc-macro2 v1.0.78 (*)
│   │   │   │   └── syn v2.0.48
│   │   │   │       ├── proc-macro2 v1.0.78 (*)
│   │   │   │       ├── quote v1.0.35 (*)
│   │   │   │       └── unicode-ident v1.0.12
│   │   │   └── rand v0.8.5
│   │   │       ├── libc v0.2.152
│   │   │       ├── rand_chacha v0.3.1
│   │   │       │   ├── ppv-lite86 v0.2.17
│   │   │       │   └── rand_core v0.6.4
│   │   │       │       └── getrandom v0.2.12
│   │   │       │           ├── cfg-if v1.0.0
│   │   │       │           └── libc v0.2.152
│   │   │       └── rand_core v0.6.4 (*)
│   │   ├── reqwest v0.11.23
│   │   │   ├── base64 v0.21.7
│   │   │   ├── bytes v1.5.0
│   │   │   ├── cookie v0.16.2
│   │   │   │   ├── percent-encoding v2.3.1
│   │   │   │   └── time v0.3.31
│   │   │   │       ├── deranged v0.3.11
│   │   │   │       │   └── powerfmt v0.2.0
│   │   │   │       ├── itoa v1.0.10
│   │   │   │       ├── libc v0.2.152
│   │   │   │       ├── num_threads v0.1.6
│   │   │   │       ├── powerfmt v0.2.0
│   │   │   │       ├── time-core v0.1.2
│   │   │   │       └── time-macros v0.2.16 (proc-macro)
│   │   │   │           └── time-core v0.1.2
│   │   │   │   [build-dependencies]
│   │   │   │   └── version_check v0.9.4
│   │   │   ├── cookie_store v0.16.2
│   │   │   │   ├── cookie v0.16.2 (*)
│   │   │   │   ├── idna v0.2.3
│   │   │   │   │   ├── matches v0.1.10
│   │   │   │   │   ├── unicode-bidi v0.3.15
│   │   │   │   │   └── unicode-normalization v0.1.22
│   │   │   │   │       └── tinyvec v1.6.0
│   │   │   │   │           └── tinyvec_macros v0.1.1
│   │   │   │   ├── log v0.4.20
│   │   │   │   ├── publicsuffix v2.2.3
│   │   │   │   │   ├── idna v0.3.0
│   │   │   │   │   │   ├── unicode-bidi v0.3.15
│   │   │   │   │   │   └── unicode-normalization v0.1.22 (*)
│   │   │   │   │   └── psl-types v2.0.11
│   │   │   │   ├── serde v1.0.195
│   │   │   │   │   └── serde_derive v1.0.195 (proc-macro)
│   │   │   │   │       ├── proc-macro2 v1.0.78 (*)
│   │   │   │   │       ├── quote v1.0.35 (*)
│   │   │   │   │       └── syn v2.0.48 (*)
│   │   │   │   ├── serde_derive v1.0.195 (proc-macro) (*)
│   │   │   │   ├── serde_json v1.0.111
│   │   │   │   │   ├── itoa v1.0.10
│   │   │   │   │   ├── ryu v1.0.16
│   │   │   │   │   └── serde v1.0.195 (*)
│   │   │   │   ├── time v0.3.31 (*)
│   │   │   │   └── url v2.5.0
│   │   │   │       ├── form_urlencoded v1.2.1
│   │   │   │       │   └── percent-encoding v2.3.1
│   │   │   │       ├── idna v0.5.0
│   │   │   │       │   ├── unicode-bidi v0.3.15
│   │   │   │       │   └── unicode-normalization v0.1.22 (*)
│   │   │   │       └── percent-encoding v2.3.1
│   │   │   ├── encoding_rs v0.8.33
│   │   │   │   └── cfg-if v1.0.0
│   │   │   ├── futures-core v0.3.30
│   │   │   ├── futures-util v0.3.30
│   │   │   │   ├── futures-channel v0.3.30
│   │   │   │   │   ├── futures-core v0.3.30
│   │   │   │   │   └── futures-sink v0.3.30
│   │   │   │   ├── futures-core v0.3.30
│   │   │   │   ├── futures-io v0.3.30
│   │   │   │   ├── futures-macro v0.3.30 (proc-macro)
│   │   │   │   │   ├── proc-macro2 v1.0.78 (*)
│   │   │   │   │   ├── quote v1.0.35 (*)
│   │   │   │   │   └── syn v2.0.48 (*)
│   │   │   │   ├── futures-sink v0.3.30
│   │   │   │   ├── futures-task v0.3.30
│   │   │   │   ├── memchr v2.7.1
│   │   │   │   ├── pin-project-lite v0.2.13
│   │   │   │   ├── pin-utils v0.1.0
│   │   │   │   └── slab v0.4.9
│   │   │   │       [build-dependencies]
│   │   │   │       └── autocfg v1.1.0
│   │   │   ├── h2 v0.3.24
│   │   │   │   ├── bytes v1.5.0
│   │   │   │   ├── fnv v1.0.7
│   │   │   │   ├── futures-core v0.3.30
│   │   │   │   ├── futures-sink v0.3.30
│   │   │   │   ├── futures-util v0.3.30 (*)
│   │   │   │   ├── http v0.2.11
│   │   │   │   │   ├── bytes v1.5.0
│   │   │   │   │   ├── fnv v1.0.7
│   │   │   │   │   └── itoa v1.0.10
│   │   │   │   ├── indexmap v2.1.0
│   │   │   │   │   ├── equivalent v1.0.1
│   │   │   │   │   ├── hashbrown v0.14.3
│   │   │   │   │   └── serde v1.0.195 (*)
│   │   │   │   ├── slab v0.4.9 (*)
│   │   │   │   ├── tokio v1.35.1
│   │   │   │   │   ├── bytes v1.5.0
│   │   │   │   │   ├── libc v0.2.152
│   │   │   │   │   ├── mio v0.8.10
│   │   │   │   │   │   ├── libc v0.2.152
│   │   │   │   │   │   └── log v0.4.20
│   │   │   │   │   ├── num_cpus v1.16.0
│   │   │   │   │   │   └── libc v0.2.152
│   │   │   │   │   ├── pin-project-lite v0.2.13
│   │   │   │   │   ├── signal-hook-registry v1.4.1
│   │   │   │   │   │   └── libc v0.2.152
│   │   │   │   │   ├── socket2 v0.5.5
│   │   │   │   │   │   └── libc v0.2.152
│   │   │   │   │   └── tokio-macros v2.2.0 (proc-macro)
│   │   │   │   │       ├── proc-macro2 v1.0.78 (*)
│   │   │   │   │       ├── quote v1.0.35 (*)
│   │   │   │   │       └── syn v2.0.48 (*)
│   │   │   │   ├── tokio-util v0.7.10
│   │   │   │   │   ├── bytes v1.5.0
│   │   │   │   │   ├── futures-core v0.3.30
│   │   │   │   │   ├── futures-sink v0.3.30
│   │   │   │   │   ├── pin-project-lite v0.2.13
│   │   │   │   │   ├── tokio v1.35.1 (*)
│   │   │   │   │   └── tracing v0.1.40
│   │   │   │   │       ├── pin-project-lite v0.2.13
│   │   │   │   │       └── tracing-core v0.1.32
│   │   │   │   │           └── once_cell v1.19.0
│   │   │   │   └── tracing v0.1.40 (*)
│   │   │   ├── http v0.2.11 (*)
│   │   │   ├── http-body v0.4.6
│   │   │   │   ├── bytes v1.5.0
│   │   │   │   ├── http v0.2.11 (*)
│   │   │   │   └── pin-project-lite v0.2.13
│   │   │   ├── hyper v0.14.28
│   │   │   │   ├── bytes v1.5.0
│   │   │   │   ├── futures-channel v0.3.30 (*)
│   │   │   │   ├── futures-core v0.3.30
│   │   │   │   ├── futures-util v0.3.30 (*)
│   │   │   │   ├── h2 v0.3.24 (*)
│   │   │   │   ├── http v0.2.11 (*)
│   │   │   │   ├── http-body v0.4.6 (*)
│   │   │   │   ├── httparse v1.8.0
│   │   │   │   ├── httpdate v1.0.3
│   │   │   │   ├── itoa v1.0.10
│   │   │   │   ├── pin-project-lite v0.2.13
│   │   │   │   ├── socket2 v0.5.5 (*)
│   │   │   │   ├── tokio v1.35.1 (*)
│   │   │   │   ├── tower-service v0.3.2
│   │   │   │   ├── tracing v0.1.40 (*)
│   │   │   │   └── want v0.3.1
│   │   │   │       └── try-lock v0.2.5
│   │   │   ├── hyper-rustls v0.24.2
│   │   │   │   ├── futures-util v0.3.30 (*)
│   │   │   │   ├── http v0.2.11 (*)
│   │   │   │   ├── hyper v0.14.28 (*)
│   │   │   │   ├── rustls v0.21.10
│   │   │   │   │   ├── log v0.4.20
│   │   │   │   │   ├── ring v0.17.7
│   │   │   │   │   │   ├── getrandom v0.2.12 (*)
│   │   │   │   │   │   ├── spin v0.9.8
│   │   │   │   │   │   └── untrusted v0.9.0
│   │   │   │   │   │   [build-dependencies]
│   │   │   │   │   │   └── cc v1.0.83
│   │   │   │   │   │       └── libc v0.2.152
│   │   │   │   │   ├── rustls-webpki v0.101.7
│   │   │   │   │   │   ├── ring v0.17.7 (*)
│   │   │   │   │   │   └── untrusted v0.9.0
│   │   │   │   │   └── sct v0.7.1
│   │   │   │   │       ├── ring v0.17.7 (*)
│   │   │   │   │       └── untrusted v0.9.0
│   │   │   │   ├── tokio v1.35.1 (*)
│   │   │   │   └── tokio-rustls v0.24.1
│   │   │   │       ├── rustls v0.21.10 (*)
│   │   │   │       └── tokio v1.35.1 (*)
│   │   │   ├── ipnet v2.9.0
│   │   │   ├── log v0.4.20
│   │   │   ├── mime v0.3.17
│   │   │   ├── mime_guess v2.0.4
│   │   │   │   ├── mime v0.3.17
│   │   │   │   └── unicase v2.7.0
│   │   │   │       [build-dependencies]
│   │   │   │       └── version_check v0.9.4
│   │   │   │   [build-dependencies]
│   │   │   │   └── unicase v2.7.0
│   │   │   │       [build-dependencies]
│   │   │   │       └── version_check v0.9.4
│   │   │   ├── once_cell v1.19.0
│   │   │   ├── percent-encoding v2.3.1
│   │   │   ├── pin-project-lite v0.2.13
│   │   │   ├── rustls v0.21.10 (*)
│   │   │   ├── rustls-pemfile v1.0.4
│   │   │   │   └── base64 v0.21.7
│   │   │   ├── serde v1.0.195 (*)
│   │   │   ├── serde_json v1.0.111 (*)
│   │   │   ├── serde_urlencoded v0.7.1
│   │   │   │   ├── form_urlencoded v1.2.1 (*)
│   │   │   │   ├── itoa v1.0.10
│   │   │   │   ├── ryu v1.0.16
│   │   │   │   └── serde v1.0.195 (*)
│   │   │   ├── tokio v1.35.1 (*)
│   │   │   ├── tokio-rustls v0.24.1 (*)
│   │   │   ├── tower-service v0.3.2
│   │   │   ├── url v2.5.0 (*)
│   │   │   └── webpki-roots v0.25.3
│   │   ├── serde v1.0.195 (*)
│   │   ├── serde_json v1.0.111 (*)
│   │   ├── serde_with v3.5.1
│   │   │   ├── serde v1.0.195 (*)
│   │   │   └── serde_with_macros v3.5.1 (proc-macro)
│   │   │       ├── darling v0.20.3
│   │   │       │   ├── darling_core v0.20.3
│   │   │       │   │   ├── fnv v1.0.7
│   │   │       │   │   ├── ident_case v1.0.1
│   │   │       │   │   ├── proc-macro2 v1.0.78 (*)
│   │   │       │   │   ├── quote v1.0.35 (*)
│   │   │       │   │   ├── strsim v0.10.0
│   │   │       │   │   └── syn v2.0.48 (*)
│   │   │       │   └── darling_macro v0.20.3 (proc-macro)
│   │   │       │       ├── darling_core v0.20.3 (*)
│   │   │       │       ├── quote v1.0.35 (*)
│   │   │       │       └── syn v2.0.48 (*)
│   │   │       ├── proc-macro2 v1.0.78 (*)
│   │   │       ├── quote v1.0.35 (*)
│   │   │       └── syn v2.0.48 (*)
│   │   └── url v2.5.0 (*)
│   ├── chrono v0.4.32
│   │   ├── iana-time-zone v0.1.59
│   │   ├── num-traits v0.2.17
│   │   │   [build-dependencies]
│   │   │   └── autocfg v1.1.0
│   │   └── serde v1.0.195 (*)
│   ├── display_attr v0.1.1 (proc-macro)
│   │   ├── proc-macro2 v0.4.30
│   │   │   └── unicode-xid v0.1.0
│   │   ├── quote v0.6.13
│   │   │   └── proc-macro2 v0.4.30 (*)
│   │   └── syn v0.14.9
│   │       ├── proc-macro2 v0.4.30 (*)
│   │       ├── quote v0.6.13 (*)
│   │       └── unicode-xid v0.1.0
│   ├── error-stack v0.4.1
│   │   [build-dependencies]
│   │   └── rustc_version v0.4.0
│   │       └── semver v1.0.21
│   ├── headhunter v0.2.0 (/home/maj/work/hiper-dok/hipster-server/lib/headhunter) (*)
│   ├── hiper-db v0.2.0 (/home/maj/work/hiper-dok/hipster-server/lib/hiper-db)
│   │   ├── chrono v0.4.32 (*)
│   │   ├── rustls v0.21.10 (*)
│   │   ├── secrets v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/secrets)
│   │   │   └── dotenv v0.15.0
│   │   ├── testkit v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/testkit)
│   │   │   └── tokio-test v0.4.3
│   │   │       ├── async-stream v0.3.5
│   │   │       │   ├── async-stream-impl v0.3.5 (proc-macro)
│   │   │       │   │   ├── proc-macro2 v1.0.78 (*)
│   │   │       │   │   ├── quote v1.0.35 (*)
│   │   │       │   │   └── syn v2.0.48 (*)
│   │   │       │   ├── futures-core v0.3.30
│   │   │       │   └── pin-project-lite v0.2.13
│   │   │       ├── bytes v1.5.0
│   │   │       ├── futures-core v0.3.30
│   │   │       ├── tokio v1.35.1 (*)
│   │   │       └── tokio-stream v0.1.14
│   │   │           ├── futures-core v0.3.30
│   │   │           ├── pin-project-lite v0.2.13
│   │   │           └── tokio v1.35.1 (*)
│   │   ├── tokio v1.35.1 (*)
│   │   ├── tokio-postgres v0.7.10
│   │   │   ├── async-trait v0.1.77 (proc-macro) (*)
│   │   │   ├── byteorder v1.5.0
│   │   │   ├── bytes v1.5.0
│   │   │   ├── fallible-iterator v0.2.0
│   │   │   ├── futures-channel v0.3.30 (*)
│   │   │   ├── futures-util v0.3.30 (*)
│   │   │   ├── log v0.4.20
│   │   │   ├── parking_lot v0.12.1
│   │   │   │   ├── lock_api v0.4.11
│   │   │   │   │   └── scopeguard v1.2.0
│   │   │   │   │   [build-dependencies]
│   │   │   │   │   └── autocfg v1.1.0
│   │   │   │   └── parking_lot_core v0.9.9
│   │   │   │       ├── cfg-if v1.0.0
│   │   │   │       ├── libc v0.2.152
│   │   │   │       └── smallvec v1.13.1
│   │   │   ├── percent-encoding v2.3.1
│   │   │   ├── phf v0.11.2
│   │   │   │   └── phf_shared v0.11.2
│   │   │   │       └── siphasher v0.3.11
│   │   │   ├── pin-project-lite v0.2.13
│   │   │   ├── postgres-protocol v0.6.6
│   │   │   │   ├── base64 v0.21.7
│   │   │   │   ├── byteorder v1.5.0
│   │   │   │   ├── bytes v1.5.0
│   │   │   │   ├── fallible-iterator v0.2.0
│   │   │   │   ├── hmac v0.12.1
│   │   │   │   │   └── digest v0.10.7
│   │   │   │   │       ├── block-buffer v0.10.4
│   │   │   │   │       │   └── generic-array v0.14.7
│   │   │   │   │       │       └── typenum v1.17.0
│   │   │   │   │       │       [build-dependencies]
│   │   │   │   │       │       └── version_check v0.9.4
│   │   │   │   │       ├── crypto-common v0.1.6
│   │   │   │   │       │   ├── generic-array v0.14.7 (*)
│   │   │   │   │       │   └── typenum v1.17.0
│   │   │   │   │       └── subtle v2.5.0
│   │   │   │   ├── md-5 v0.10.6
│   │   │   │   │   ├── cfg-if v1.0.0
│   │   │   │   │   └── digest v0.10.7 (*)
│   │   │   │   ├── memchr v2.7.1
│   │   │   │   ├── rand v0.8.5 (*)
│   │   │   │   ├── sha2 v0.10.8
│   │   │   │   │   ├── cfg-if v1.0.0
│   │   │   │   │   ├── cpufeatures v0.2.12
│   │   │   │   │   └── digest v0.10.7 (*)
│   │   │   │   └── stringprep v0.1.4
│   │   │   │       ├── finl_unicode v1.2.0
│   │   │   │       ├── unicode-bidi v0.3.15
│   │   │   │       └── unicode-normalization v0.1.22 (*)
│   │   │   ├── postgres-types v0.2.6
│   │   │   │   ├── bytes v1.5.0
│   │   │   │   ├── chrono v0.4.32 (*)
│   │   │   │   ├── fallible-iterator v0.2.0
│   │   │   │   ├── postgres-protocol v0.6.6 (*)
│   │   │   │   ├── serde v1.0.195 (*)
│   │   │   │   └── serde_json v1.0.111 (*)
│   │   │   ├── rand v0.8.5 (*)
│   │   │   ├── socket2 v0.5.5 (*)
│   │   │   ├── tokio v1.35.1 (*)
│   │   │   ├── tokio-util v0.7.10 (*)
│   │   │   └── whoami v1.4.1
│   │   └── tokio-postgres-rustls v0.10.0
│   │       ├── futures v0.3.30
│   │       │   ├── futures-channel v0.3.30 (*)
│   │       │   ├── futures-core v0.3.30
│   │       │   ├── futures-executor v0.3.30
│   │       │   │   ├── futures-core v0.3.30
│   │       │   │   ├── futures-task v0.3.30
│   │       │   │   └── futures-util v0.3.30 (*)
│   │       │   ├── futures-io v0.3.30
│   │       │   ├── futures-sink v0.3.30
│   │       │   ├── futures-task v0.3.30
│   │       │   └── futures-util v0.3.30 (*)
│   │       ├── ring v0.16.20
│   │       │   ├── libc v0.2.152
│   │       │   ├── spin v0.5.2
│   │       │   └── untrusted v0.7.1
│   │       │   [build-dependencies]
│   │       │   └── cc v1.0.83 (*)
│   │       ├── rustls v0.21.10 (*)
│   │       ├── tokio v1.35.1 (*)
│   │       ├── tokio-postgres v0.7.10 (*)
│   │       └── tokio-rustls v0.24.1 (*)
│   ├── jsonwebtoken v9.2.0
│   │   ├── base64 v0.21.7
│   │   ├── pem v3.0.3
│   │   │   └── base64 v0.21.7
│   │   ├── ring v0.17.7 (*)
│   │   ├── serde v1.0.195 (*)
│   │   ├── serde_json v1.0.111 (*)
│   │   └── simple_asn1 v0.6.2
│   │       ├── num-bigint v0.4.4
│   │       │   ├── num-integer v0.1.45
│   │       │   │   └── num-traits v0.2.17 (*)
│   │       │   │   [build-dependencies]
│   │       │   │   └── autocfg v1.1.0
│   │       │   └── num-traits v0.2.17 (*)
│   │       │   [build-dependencies]
│   │       │   └── autocfg v1.1.0
│   │       ├── num-traits v0.2.17 (*)
│   │       ├── thiserror v1.0.56
│   │       │   └── thiserror-impl v1.0.56 (proc-macro)
│   │       │       ├── proc-macro2 v1.0.78 (*)
│   │       │       ├── quote v1.0.35 (*)
│   │       │       └── syn v2.0.48 (*)
│   │       └── time v0.3.31 (*)
│   ├── regex v1.10.3
│   │   ├── aho-corasick v1.1.2
│   │   │   └── memchr v2.7.1
│   │   ├── memchr v2.7.1
│   │   ├── regex-automata v0.4.4
│   │   │   ├── aho-corasick v1.1.2 (*)
│   │   │   ├── memchr v2.7.1
│   │   │   └── regex-syntax v0.8.2
│   │   └── regex-syntax v0.8.2
│   ├── reqwest v0.11.23 (*)
│   ├── serde v1.0.195 (*)
│   ├── strum v0.25.0
│   │   └── strum_macros v0.25.3 (proc-macro)
│   │       ├── heck v0.4.1
│   │       ├── proc-macro2 v1.0.78 (*)
│   │       ├── quote v1.0.35 (*)
│   │       ├── rustversion v1.0.14 (proc-macro)
│   │       └── syn v2.0.48 (*)
│   └── testkit v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/testkit) (*)
├── bolt-rs v0.3.0 (/home/maj/work/hiper-dok/hipster-server/lib/bolt-rs) (*)
├── chrono v0.4.32 (*)
├── display_attr v0.1.1 (proc-macro) (*)
├── error-stack v0.4.1 (*)
├── graphite v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/graphite)
│   └── tokio v1.35.1 (*)
├── hex v0.4.3
├── hipster v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/hipster)
│   ├── biper v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/biper) (*)
│   ├── bolt-rs v0.3.0 (/home/maj/work/hiper-dok/hipster-server/lib/bolt-rs) (*)
│   ├── chrono v0.4.32 (*)
│   ├── diesel v2.1.4
│   │   ├── bitflags v2.4.2
│   │   ├── byteorder v1.5.0
│   │   ├── chrono v0.4.32 (*)
│   │   ├── diesel_derives v2.1.2 (proc-macro)
│   │   │   ├── diesel_table_macro_syntax v0.1.0
│   │   │   │   └── syn v2.0.48 (*)
│   │   │   ├── proc-macro2 v1.0.78 (*)
│   │   │   ├── quote v1.0.35 (*)
│   │   │   └── syn v2.0.48 (*)
│   │   ├── itoa v1.0.10
│   │   ├── pq-sys v0.4.8
│   │   └── r2d2 v0.8.10
│   │       ├── log v0.4.20
│   │       ├── parking_lot v0.12.1 (*)
│   │       └── scheduled-thread-pool v0.2.7
│   │           └── parking_lot v0.12.1 (*)
│   ├── diesel-derive-enum v2.1.0 (proc-macro)
│   │   ├── heck v0.4.1
│   │   ├── proc-macro2 v1.0.78 (*)
│   │   ├── quote v1.0.35 (*)
│   │   └── syn v2.0.48 (*)
│   ├── display_attr v0.1.1 (proc-macro) (*)
│   ├── error-stack v0.4.1 (*)
│   ├── fern v0.6.2
│   │   ├── log v0.4.20
│   │   └── syslog v6.1.0
│   │       ├── error-chain v0.12.4
│   │       │   [build-dependencies]
│   │       │   └── version_check v0.9.4
│   │       ├── hostname v0.3.1
│   │       │   ├── libc v0.2.152
│   │       │   └── match_cfg v0.1.0
│   │       ├── libc v0.2.152
│   │       ├── log v0.4.20
│   │       └── time v0.3.31 (*)
│   ├── graphite v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/graphite) (*)
│   ├── hiper-db v0.2.0 (/home/maj/work/hiper-dok/hipster-server/lib/hiper-db) (*)
│   ├── hipster_proc_macros v0.1.0 (proc-macro) (/home/maj/work/hiper-dok/hipster-server/lib/hipster_proc_macros)
│   │   ├── quote v1.0.35 (*)
│   │   └── syn v2.0.48 (*)
│   ├── jira v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/jira)
│   │   ├── gen-api v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/gen-api)
│   │   │   ├── async-trait v0.1.77 (proc-macro) (*)
│   │   │   ├── futures v0.3.30 (*)
│   │   │   ├── reqwest v0.11.23 (*)
│   │   │   ├── serde v1.0.195 (*)
│   │   │   ├── serde-xml-rs v0.6.0
│   │   │   │   ├── log v0.4.20
│   │   │   │   ├── serde v1.0.195 (*)
│   │   │   │   ├── thiserror v1.0.56 (*)
│   │   │   │   └── xml-rs v0.8.19
│   │   │   └── serde_json v1.0.111 (*)
│   │   └── headhunter v0.2.0 (/home/maj/work/hiper-dok/hipster-server/lib/headhunter) (*)
│   ├── lazy_static v1.4.0
│   ├── log v0.4.20
│   ├── md5 v0.7.0
│   ├── redis v0.24.0
│   │   ├── combine v4.6.6
│   │   │   ├── bytes v1.5.0
│   │   │   └── memchr v2.7.1
│   │   ├── itoa v1.0.10
│   │   ├── percent-encoding v2.3.1
│   │   ├── ryu v1.0.16
│   │   ├── sha1_smol v1.0.0
│   │   ├── socket2 v0.4.10
│   │   │   └── libc v0.2.152
│   │   └── url v2.5.0 (*)
│   ├── regex v1.10.3 (*)
│   ├── reqwest v0.11.23 (*)
│   ├── rocket v0.5.0
│   │   ├── async-stream v0.3.5 (*)
│   │   ├── async-trait v0.1.77 (proc-macro) (*)
│   │   ├── atomic v0.5.3
│   │   ├── binascii v0.1.4
│   │   ├── bytes v1.5.0
│   │   ├── either v1.9.0
│   │   ├── figment v0.10.14
│   │   │   ├── pear v0.2.8
│   │   │   │   ├── inlinable_string v0.1.15
│   │   │   │   ├── pear_codegen v0.2.8 (proc-macro)
│   │   │   │   │   ├── proc-macro2 v1.0.78 (*)
│   │   │   │   │   ├── proc-macro2-diagnostics v0.10.1
│   │   │   │   │   │   ├── proc-macro2 v1.0.78 (*)
│   │   │   │   │   │   ├── quote v1.0.35 (*)
│   │   │   │   │   │   ├── syn v2.0.48 (*)
│   │   │   │   │   │   └── yansi v1.0.0-rc.1
│   │   │   │   │   │   [build-dependencies]
│   │   │   │   │   │   └── version_check v0.9.4
│   │   │   │   │   ├── quote v1.0.35 (*)
│   │   │   │   │   └── syn v2.0.48 (*)
│   │   │   │   └── yansi v1.0.0-rc.1
│   │   │   │       └── is-terminal v0.4.10
│   │   │   │           └── rustix v0.38.30
│   │   │   │               ├── bitflags v2.4.2
│   │   │   │               └── linux-raw-sys v0.4.13
│   │   │   ├── serde v1.0.195 (*)
│   │   │   ├── toml v0.8.8
│   │   │   │   ├── serde v1.0.195 (*)
│   │   │   │   ├── serde_spanned v0.6.5
│   │   │   │   │   └── serde v1.0.195 (*)
│   │   │   │   ├── toml_datetime v0.6.5
│   │   │   │   │   └── serde v1.0.195 (*)
│   │   │   │   └── toml_edit v0.21.0
│   │   │   │       ├── indexmap v2.1.0 (*)
│   │   │   │       ├── serde v1.0.195 (*)
│   │   │   │       ├── serde_spanned v0.6.5 (*)
│   │   │   │       ├── toml_datetime v0.6.5 (*)
│   │   │   │       └── winnow v0.5.34
│   │   │   └── uncased v0.9.10
│   │   │       └── serde v1.0.195 (*)
│   │   │       [build-dependencies]
│   │   │       └── version_check v0.9.4
│   │   │   [build-dependencies]
│   │   │   └── version_check v0.9.4
│   │   ├── futures v0.3.30 (*)
│   │   ├── indexmap v2.1.0 (*)
│   │   ├── log v0.4.20
│   │   ├── memchr v2.7.1
│   │   ├── multer v2.1.0
│   │   │   ├── bytes v1.5.0
│   │   │   ├── encoding_rs v0.8.33 (*)
│   │   │   ├── futures-util v0.3.30 (*)
│   │   │   ├── http v0.2.11 (*)
│   │   │   ├── httparse v1.8.0
│   │   │   ├── log v0.4.20
│   │   │   ├── memchr v2.7.1
│   │   │   ├── mime v0.3.17
│   │   │   ├── spin v0.9.8
│   │   │   ├── tokio v1.35.1 (*)
│   │   │   └── tokio-util v0.7.10 (*)
│   │   │   [build-dependencies]
│   │   │   └── version_check v0.9.4
│   │   ├── num_cpus v1.16.0 (*)
│   │   ├── parking_lot v0.12.1 (*)
│   │   ├── pin-project-lite v0.2.13
│   │   ├── rand v0.8.5 (*)
│   │   ├── ref-cast v1.0.22
│   │   │   └── ref-cast-impl v1.0.22 (proc-macro)
│   │   │       ├── proc-macro2 v1.0.78 (*)
│   │   │       ├── quote v1.0.35 (*)
│   │   │       └── syn v2.0.48 (*)
│   │   ├── rocket_codegen v0.5.0 (proc-macro)
│   │   │   ├── devise v0.4.1
│   │   │   │   ├── devise_codegen v0.4.1 (proc-macro)
│   │   │   │   │   ├── devise_core v0.4.1
│   │   │   │   │   │   ├── bitflags v2.4.2
│   │   │   │   │   │   ├── proc-macro2 v1.0.78 (*)
│   │   │   │   │   │   ├── proc-macro2-diagnostics v0.10.1 (*)
│   │   │   │   │   │   ├── quote v1.0.35 (*)
│   │   │   │   │   │   └── syn v2.0.48 (*)
│   │   │   │   │   └── quote v1.0.35 (*)
│   │   │   │   └── devise_core v0.4.1 (*)
│   │   │   ├── glob v0.3.1
│   │   │   ├── indexmap v2.1.0
│   │   │   │   ├── equivalent v1.0.1
│   │   │   │   └── hashbrown v0.14.3
│   │   │   ├── proc-macro2 v1.0.78 (*)
│   │   │   ├── quote v1.0.35 (*)
│   │   │   ├── rocket_http v0.5.0
│   │   │   │   ├── cookie v0.18.0
│   │   │   │   │   ├── percent-encoding v2.3.1
│   │   │   │   │   └── time v0.3.31
│   │   │   │   │       ├── deranged v0.3.11
│   │   │   │   │       │   └── powerfmt v0.2.0
│   │   │   │   │       ├── itoa v1.0.10
│   │   │   │   │       ├── powerfmt v0.2.0
│   │   │   │   │       ├── time-core v0.1.2
│   │   │   │   │       └── time-macros v0.2.16 (proc-macro) (*)
│   │   │   │   │   [build-dependencies]
│   │   │   │   │   └── version_check v0.9.4
│   │   │   │   ├── either v1.9.0
│   │   │   │   ├── futures v0.3.30
│   │   │   │   │   ├── futures-channel v0.3.30
│   │   │   │   │   │   ├── futures-core v0.3.30
│   │   │   │   │   │   └── futures-sink v0.3.30
│   │   │   │   │   ├── futures-core v0.3.30
│   │   │   │   │   ├── futures-io v0.3.30
│   │   │   │   │   ├── futures-sink v0.3.30
│   │   │   │   │   ├── futures-task v0.3.30
│   │   │   │   │   └── futures-util v0.3.30
│   │   │   │   │       ├── futures-core v0.3.30
│   │   │   │   │       ├── futures-sink v0.3.30
│   │   │   │   │       ├── futures-task v0.3.30
│   │   │   │   │       ├── pin-project-lite v0.2.13
│   │   │   │   │       └── pin-utils v0.1.0
│   │   │   │   ├── http v0.2.11
│   │   │   │   │   ├── bytes v1.5.0
│   │   │   │   │   ├── fnv v1.0.7
│   │   │   │   │   └── itoa v1.0.10
│   │   │   │   ├── hyper v0.14.28
│   │   │   │   │   ├── bytes v1.5.0
│   │   │   │   │   ├── futures-channel v0.3.30 (*)
│   │   │   │   │   ├── futures-core v0.3.30
│   │   │   │   │   ├── futures-util v0.3.30 (*)
│   │   │   │   │   ├── http v0.2.11 (*)
│   │   │   │   │   ├── http-body v0.4.6
│   │   │   │   │   │   ├── bytes v1.5.0
│   │   │   │   │   │   ├── http v0.2.11 (*)
│   │   │   │   │   │   └── pin-project-lite v0.2.13
│   │   │   │   │   ├── httparse v1.8.0
│   │   │   │   │   ├── httpdate v1.0.3
│   │   │   │   │   ├── itoa v1.0.10
│   │   │   │   │   ├── pin-project-lite v0.2.13
│   │   │   │   │   ├── socket2 v0.5.5
│   │   │   │   │   │   └── libc v0.2.152
│   │   │   │   │   ├── tokio v1.35.1
│   │   │   │   │   │   ├── libc v0.2.152
│   │   │   │   │   │   ├── mio v0.8.10
│   │   │   │   │   │   │   └── libc v0.2.152
│   │   │   │   │   │   ├── pin-project-lite v0.2.13
│   │   │   │   │   │   └── socket2 v0.5.5 (*)
│   │   │   │   │   ├── tower-service v0.3.2
│   │   │   │   │   ├── tracing v0.1.40
│   │   │   │   │   │   ├── pin-project-lite v0.2.13
│   │   │   │   │   │   └── tracing-core v0.1.32
│   │   │   │   │   │       └── once_cell v1.19.0
│   │   │   │   │   └── want v0.3.1
│   │   │   │   │       └── try-lock v0.2.5
│   │   │   │   ├── indexmap v2.1.0 (*)
│   │   │   │   ├── log v0.4.20
│   │   │   │   ├── memchr v2.7.1
│   │   │   │   ├── pear v0.2.8
│   │   │   │   │   ├── inlinable_string v0.1.15
│   │   │   │   │   ├── pear_codegen v0.2.8 (proc-macro) (*)
│   │   │   │   │   └── yansi v1.0.0-rc.1
│   │   │   │   ├── percent-encoding v2.3.1
│   │   │   │   ├── pin-project-lite v0.2.13
│   │   │   │   ├── ref-cast v1.0.22
│   │   │   │   │   └── ref-cast-impl v1.0.22 (proc-macro) (*)
│   │   │   │   ├── smallvec v1.13.1
│   │   │   │   ├── stable-pattern v0.1.0
│   │   │   │   │   └── memchr v2.7.1
│   │   │   │   ├── state v0.6.0
│   │   │   │   ├── time v0.3.31 (*)
│   │   │   │   ├── tokio v1.35.1 (*)
│   │   │   │   └── uncased v0.9.10
│   │   │   │       [build-dependencies]
│   │   │   │       └── version_check v0.9.4
│   │   │   ├── syn v2.0.48 (*)
│   │   │   ├── unicode-xid v0.2.4
│   │   │   └── version_check v0.9.4
│   │   ├── rocket_http v0.5.0
│   │   │   ├── cookie v0.18.0
│   │   │   │   ├── percent-encoding v2.3.1
│   │   │   │   └── time v0.3.31 (*)
│   │   │   │   [build-dependencies]
│   │   │   │   └── version_check v0.9.4
│   │   │   ├── either v1.9.0
│   │   │   ├── futures v0.3.30 (*)
│   │   │   ├── http v0.2.11 (*)
│   │   │   ├── hyper v0.14.28 (*)
│   │   │   ├── indexmap v2.1.0 (*)
│   │   │   ├── log v0.4.20
│   │   │   ├── memchr v2.7.1
│   │   │   ├── pear v0.2.8 (*)
│   │   │   ├── percent-encoding v2.3.1
│   │   │   ├── pin-project-lite v0.2.13
│   │   │   ├── ref-cast v1.0.22 (*)
│   │   │   ├── serde v1.0.195 (*)
│   │   │   ├── smallvec v1.13.1
│   │   │   ├── stable-pattern v0.1.0
│   │   │   │   └── memchr v2.7.1
│   │   │   ├── state v0.6.0
│   │   │   ├── time v0.3.31 (*)
│   │   │   ├── tokio v1.35.1 (*)
│   │   │   └── uncased v0.9.10 (*)
│   │   ├── serde v1.0.195 (*)
│   │   ├── serde_json v1.0.111 (*)
│   │   ├── state v0.6.0
│   │   ├── tempfile v3.9.0
│   │   │   ├── cfg-if v1.0.0
│   │   │   ├── fastrand v2.0.1
│   │   │   └── rustix v0.38.30 (*)
│   │   ├── time v0.3.31 (*)
│   │   ├── tokio v1.35.1 (*)
│   │   ├── tokio-stream v0.1.14 (*)
│   │   ├── tokio-util v0.7.10 (*)
│   │   ├── ubyte v0.10.4
│   │   │   └── serde v1.0.195 (*)
│   │   └── yansi v1.0.0-rc.1 (*)
│   │   [build-dependencies]
│   │   └── version_check v0.9.4
│   ├── rocket_dyn_templates v0.1.0
│   │   ├── normpath v1.1.1
│   │   ├── notify v6.1.1
│   │   │   ├── crossbeam-channel v0.5.11
│   │   │   │   └── crossbeam-utils v0.8.19
│   │   │   ├── filetime v0.2.23
│   │   │   │   ├── cfg-if v1.0.0
│   │   │   │   └── libc v0.2.152
│   │   │   ├── inotify v0.9.6
│   │   │   │   ├── bitflags v1.3.2
│   │   │   │   ├── inotify-sys v0.1.5
│   │   │   │   │   └── libc v0.2.152
│   │   │   │   └── libc v0.2.152
│   │   │   ├── libc v0.2.152
│   │   │   ├── log v0.4.20
│   │   │   ├── mio v0.8.10 (*)
│   │   │   └── walkdir v2.4.0
│   │   │       └── same-file v1.0.6
│   │   ├── rocket v0.5.0 (*)
│   │   ├── tera v1.19.1
│   │   │   ├── chrono v0.4.32 (*)
│   │   │   ├── chrono-tz v0.8.5
│   │   │   │   ├── chrono v0.4.32 (*)
│   │   │   │   └── phf v0.11.2 (*)
│   │   │   │   [build-dependencies]
│   │   │   │   └── chrono-tz-build v0.2.1
│   │   │   │       ├── parse-zoneinfo v0.3.0
│   │   │   │       │   └── regex v1.10.3
│   │   │   │       │       ├── regex-automata v0.4.4
│   │   │   │       │       │   └── regex-syntax v0.8.2
│   │   │   │       │       └── regex-syntax v0.8.2
│   │   │   │       ├── phf v0.11.2
│   │   │   │       │   └── phf_shared v0.11.2
│   │   │   │       │       └── siphasher v0.3.11
│   │   │   │       └── phf_codegen v0.11.2
│   │   │   │           ├── phf_generator v0.11.2
│   │   │   │           │   ├── phf_shared v0.11.2 (*)
│   │   │   │           │   └── rand v0.8.5
│   │   │   │           │       └── rand_core v0.6.4
│   │   │   │           └── phf_shared v0.11.2 (*)
│   │   │   ├── globwalk v0.8.1
│   │   │   │   ├── bitflags v1.3.2
│   │   │   │   ├── ignore v0.4.22
│   │   │   │   │   ├── crossbeam-deque v0.8.5
│   │   │   │   │   │   ├── crossbeam-epoch v0.9.18
│   │   │   │   │   │   │   └── crossbeam-utils v0.8.19
│   │   │   │   │   │   └── crossbeam-utils v0.8.19
│   │   │   │   │   ├── globset v0.4.14
│   │   │   │   │   │   ├── aho-corasick v1.1.2 (*)
│   │   │   │   │   │   ├── bstr v1.9.0
│   │   │   │   │   │   │   └── memchr v2.7.1
│   │   │   │   │   │   ├── log v0.4.20
│   │   │   │   │   │   ├── regex-automata v0.4.4 (*)
│   │   │   │   │   │   └── regex-syntax v0.8.2
│   │   │   │   │   ├── log v0.4.20
│   │   │   │   │   ├── memchr v2.7.1
│   │   │   │   │   ├── regex-automata v0.4.4 (*)
│   │   │   │   │   ├── same-file v1.0.6
│   │   │   │   │   └── walkdir v2.4.0 (*)
│   │   │   │   └── walkdir v2.4.0 (*)
│   │   │   ├── humansize v2.1.3
│   │   │   │   └── libm v0.2.8
│   │   │   ├── lazy_static v1.4.0
│   │   │   ├── percent-encoding v2.3.1
│   │   │   ├── pest v2.7.6
│   │   │   │   ├── memchr v2.7.1
│   │   │   │   ├── thiserror v1.0.56 (*)
│   │   │   │   └── ucd-trie v0.1.6
│   │   │   ├── pest_derive v2.7.6 (proc-macro)
│   │   │   │   ├── pest v2.7.6
│   │   │   │   │   ├── memchr v2.7.1
│   │   │   │   │   ├── thiserror v1.0.56
│   │   │   │   │   │   └── thiserror-impl v1.0.56 (proc-macro) (*)
│   │   │   │   │   └── ucd-trie v0.1.6
│   │   │   │   └── pest_generator v2.7.6
│   │   │   │       ├── pest v2.7.6 (*)
│   │   │   │       ├── pest_meta v2.7.6
│   │   │   │       │   ├── once_cell v1.19.0
│   │   │   │       │   └── pest v2.7.6 (*)
│   │   │   │       │   [build-dependencies]
│   │   │   │       │   └── sha2 v0.10.8
│   │   │   │       │       ├── cfg-if v1.0.0
│   │   │   │       │       ├── cpufeatures v0.2.12
│   │   │   │       │       └── digest v0.10.7
│   │   │   │       │           ├── block-buffer v0.10.4
│   │   │   │       │           │   └── generic-array v0.14.7
│   │   │   │       │           │       └── typenum v1.17.0
│   │   │   │       │           │       [build-dependencies]
│   │   │   │       │           │       └── version_check v0.9.4
│   │   │   │       │           └── crypto-common v0.1.6
│   │   │   │       │               ├── generic-array v0.14.7 (*)
│   │   │   │       │               └── typenum v1.17.0
│   │   │   │       ├── proc-macro2 v1.0.78 (*)
│   │   │   │       ├── quote v1.0.35 (*)
│   │   │   │       └── syn v2.0.48 (*)
│   │   │   ├── rand v0.8.5 (*)
│   │   │   ├── regex v1.10.3 (*)
│   │   │   ├── serde v1.0.195 (*)
│   │   │   ├── serde_json v1.0.111 (*)
│   │   │   ├── slug v0.1.5
│   │   │   │   └── deunicode v1.4.2
│   │   │   └── unic-segment v0.9.0
│   │   │       └── unic-ucd-segment v0.9.0
│   │   │           ├── unic-char-property v0.9.0
│   │   │           │   └── unic-char-range v0.9.0
│   │   │           ├── unic-char-range v0.9.0
│   │   │           └── unic-ucd-version v0.9.0
│   │   │               └── unic-common v0.9.0
│   │   └── walkdir v2.4.0 (*)
│   ├── rocket_sync_db_pools v0.1.0
│   │   ├── diesel v2.1.4 (*)
│   │   ├── r2d2 v0.8.10 (*)
│   │   ├── rocket v0.5.0 (*)
│   │   ├── rocket_sync_db_pools_codegen v0.1.0 (proc-macro)
│   │   │   ├── devise v0.4.1 (*)
│   │   │   └── quote v1.0.35 (*)
│   │   ├── serde v1.0.195 (*)
│   │   └── tokio v1.35.1 (*)
│   │   [build-dependencies]
│   │   └── version_check v0.9.4
│   ├── secrets v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/secrets) (*)
│   ├── serde v1.0.195 (*)
│   ├── serde_json v1.0.111 (*)
│   ├── snailquote v0.3.1
│   │   ├── thiserror v1.0.56 (*)
│   │   └── unicode_categories v0.1.1
│   ├── snipe-it v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/snipe-it)
│   │   ├── gen-api v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/gen-api) (*)
│   │   └── headhunter v0.2.0 (/home/maj/work/hiper-dok/hipster-server/lib/headhunter) (*)
│   ├── syslog v6.1.0 (*)
│   ├── tokio v1.35.1 (*)
│   ├── zabbix v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/zabbix)
│   │   └── gen-api v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/gen-api) (*)
│   └── zendesk v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/zendesk)
│       ├── chrono v0.4.32 (*)
│       ├── gen-api v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/gen-api) (*)
│       └── headhunter v0.2.0 (/home/maj/work/hiper-dok/hipster-server/lib/headhunter) (*)
├── hmac-sha256 v1.1.7
├── jira v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/jira) (*)
├── rocket v0.5.0 (*)
├── rocket_dyn_templates v0.1.0 (*)
├── secrets v0.1.0 (/home/maj/work/hiper-dok/hipster-server/lib/secrets) (*)
├── tokio v1.35.1 (*)
└── urlencoding v2.1.3

As you can see in the above, i'm not actually depending on openssl, as i try to use rustls where i can.

However, after adding the openssl crate to the Cargo.toml and adding the extern crate openssl; before diesel, i now get this:

#0 16.44   = note: /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-20c96eaf1c9750ff.rlib(fe-secure-openssl.o): in function `initialize_SSL':
#0 16.44           fe-secure-openssl.c:(.text+0x14d8): undefined reference to `ENGINE_by_id'
#0 16.44           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1581): undefined reference to `ENGINE_init'
#0 16.44           /usr/bin/ld: fe-secure-openssl.c:(.text+0x15f8): undefined reference to `ENGINE_free'
#0 16.44           /usr/bin/ld: fe-secure-openssl.c:(.text+0x164a): undefined reference to `ENGINE_load_private_key'
#0 16.44           /usr/bin/ld: fe-secure-openssl.c:(.text+0x16d8): undefined reference to `ENGINE_finish'
#0 16.44           /usr/bin/ld: fe-secure-openssl.c:(.text+0x16ee): undefined reference to `ENGINE_free'
#0 16.44           /usr/bin/ld: fe-secure-openssl.c:(.text+0x17bb): undefined reference to `ENGINE_finish'
#0 16.44           /usr/bin/ld: fe-secure-openssl.c:(.text+0x17d1): undefined reference to `ENGINE_free'
#0 16.44           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-20c96eaf1c9750ff.rlib(fe-secure-openssl.o): in function `open_client_SSL':
#0 16.44           fe-secure-openssl.c:(.text+0x1d34): undefined reference to `SSL_get_peer_certificate'
#0 16.44           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-20c96eaf1c9750ff.rlib(fe-secure-openssl.o): in function `pgtls_close':
#0 16.44           fe-secure-openssl.c:(.text+0x1ec1): undefined reference to `ENGINE_finish'
#0 16.44           /usr/bin/ld: fe-secure-openssl.c:(.text+0x1ed4): undefined reference to `ENGINE_free'
#0 16.44           /usr/bin/ld: /home/hiper/target/x86_64-unknown-linux-musl/debug/deps/libpq_sys-20c96eaf1c9750ff.rlib(fe-secure-openssl.o): in function `my_SSL_set_fd':
#0 16.44           fe-secure-openssl.c:(.text+0x252b): undefined reference to `ERR_put_error'
#0 16.44           /usr/bin/ld: fe-secure-openssl.c:(.text+0x256b): undefined reference to `ERR_put_error'
#0 16.44           collect2: error: ld returned 1 exit status
#0 16.44
#0 16.44   = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
#0 16.44   = note: use the `-l` flag to specify native libraries to link
#0 16.44   = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
#0 16.44
#0 16.46 error: could not compile `hipster-public` (bin "hipster-public") due to previous error

@clux Thank you for helping btw. I really appreciate it!

madser123 commented 7 months ago

A thing i would like to add, which i think is weird (I don't know a lot about how these things work, so it might make perfect sense), but i have a couple of binaries, and a couple of libraries in the project/workspace.

I have a "pre-build" docker image, which uses muslrust as the base-image. It then proceeds to build all of my libraries. This works perfectly fine.

However, when i then use the docker image for the binary-builds (which uses the "pre-build" image as a base) it then fails.

But... I only changed the dependencies of one of my libraries - NOT the binary itself.

How come changing dependencies for the library helped, when other binaries compile perfectly fine with the library? And how come the library itself can compile, but when used in a specific binary it won't?

This is of course assuming that the library is the root-cause for the errors - But i think it might be, since changing the deps and importing openssl resolved some of the errors.

madser123 commented 7 months ago

Out of frustration and curiosity, i tried upgrading Openssl to version 3.0 - This did not solve the issue either.

I hope some of you have an idea, cause i am completely lost at this point. Can't figure out what is causing this.

madser123 commented 7 months ago

I found what is causing the error - Haven't found a fix yet though.

I'm using the Rocket framework, and Diesel. In order to use these properly together, i'm using rocket_sync_db_pools - This is what is causing the error.

I have created a small MVP project, to show the error:

Cargo.toml

[package]
name = "pq-test"
version = "0.1.0"
edition = "2021"

[dependencies]
rocket = { version = "0.5.0", features = ["json"] }
rocket_sync_db_pools = { version = "0.1.0", features = ["diesel_postgres_pool"] }
diesel = { version = "2.1.4", features = ["postgres"] }
openssl = { version = "0.10.34", features = ["vendored"] }

main.rs

#[macro_use]
extern crate rocket;
extern crate openssl;

extern crate diesel;

use rocket_sync_db_pools::database;

/// A connection pool for the Hipster database
#[database("hipster")]
pub struct Pool(diesel::PgConnection);

#[rocket::main]
async fn main() {
    let _ = rocket::build().attach(Pool::fairing()).launch().await;
}

My question is now - Is this a problem with Rocket? Or can this be fixed here?

clux commented 7 months ago

This is probably more interaction (or link order issues) with openssl and libpq. If you've gotten a newer version than what is required through cargo transitively or some vendored ssl (the current image only supports openssl 1 branch + libpq <12 due to other issues) then you might get an error like that.

Tbqh, seeing more of this, plus not seeing any traction on people wanting to statically link libpq (#81) I actually want to just disable libpq entirely in this image because it feels ill-advised to lead people down these very complicated goose-chases that are unlikely to result in long-lasting solutions for them (in particular libpq 11 is now 5 major versions behind, it's the last version that works, no one seems to care enough to improve it, and pq devs don't care either).

My advice would be to take a simpler non-musl path if you are using pq.

madser123 commented 7 months ago

@clux That sucks, but if that's the only proper solution at this point, then that's what i'll have to do.

Thank you again, for the help - Really appreciate it