The essapi-sys build fails due to inability to find symbols from openssl. Any advice here would be great.
cargo run --example aes_encrypt_decrypt --features "generate-bindings integration-tests bundled"
All of the libraries are present for openssl-3 as well as the related pkg-config files.
/usr/include/ssl
/usr/lib64/libcrypto.so
/usr/lib64/libssl.so
/usr/lib64/pkgconfig/libcrypto.pc
/usr/lib64/pkgconfig/libssl.pc
/usr/lib64/pkgconfig/openssl.pc
/usr/share/doc/packages/libopenssl-3-devel
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-m64" "/tmp/rustczVKruu/symbols.o" "<30 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/deps/{libtss_esapi-b74b32e6553b7274,libhostname_validator-207514500d34db57,libstrum-1b852b4aa568f5c5,libsha3-108bdcdcb1075802,libkeccak-8b3cd4a0072181a5,libsm2-33bed472c5bd4460,libsm3-14d536a22a41e4f0,libp521-8f16c6298974fc50,libp192-4848a2d3f3c189dd,libp384-0390eaa9d2bd5f7b,libp256-973989e9cf1576a8,libp224-186e271df33570fc,libprimeorder-e26b3a1049eadb53,libserde-45c71fd2861cfa28,libserde_core-6b718945fbcc98f3,libregex-3f1047a899343f83,libregex_automata-1122fcba119d8eb1,libaho_corasick-56ca3e81afd40e5a,libmemchr-0f07d7c340c7cee2,libregex_syntax-b325ad76ad00641a,libenumflags2-224b1ee70d220441,libx509_cert-aa46d670eb70b756,librsa-aedff3af0f601888,libsha1-de92d09df0e4dcda,libsha2-b071e5e2d01a5622,libcpufeatures-965da2e628aa3ebd,libpkcs1-0832a044fe15132a,libnum_bigint_dig-5e15c699ea263488,liblibm-63dd8845b720c15b,libnum_iter-6e35b1c6c3dd8728,librand-9c7c782877d29bd1,librand_chacha-3eb71e0a147ef8f5,libppv_lite86-e26e27027a950c15,libzerocopy-f806c24807f719fb,libnum_integer-508b61a008c34155,libnum_traits-c6ff946125d559f7,liblazy_static-3f8eab4e2e7ce884,libspin-689451490509ec6f,libsmallvec-0f8403f8dc76f60b,libecdsa-b59bd1fa8d23edd8,librfc6979-4165f7a15e3768cc,libsignature-02d13d265d05dd6c,libelliptic_curve-2dc357aba1b2cce4,libsec1-d076eefef2d19d5a,libpkcs8-adefa844cee9cc1d,libspki-c7221c66fbc3c4c2,libder-173372408f7a1454,libflagset-41360143281b60d5,libpem_rfc7468-4013dcb89cd787ef,libbase64ct-47026b9ca9a440a4,libhkdf-cdb8454e8999da10,libhmac-fb03a411a1a7e7bd,libcrypto_bigint-1b6984e81893f877,libbase16ct-cd4b6fee274155fb,libgroup-a0ea10762c5d3482,libff-4b36faade62b4dd3,librand_core-0441f9929900ea55,libgetrandom-53378f8fffdce44d,liblibc-1784a02f99458686,libcfg_if-a3662b74b62b86e1,libdigest-69b1fcc05d3cd598,libsubtle-93c85a9c0a5259b1,libconst_oid-2505ff7b49e5ccc5,libblock_buffer-dbaf8182450e5dc8,libcrypto_common-31a8cbcf4b4e8c63,libgeneric_array-8168893bfc21df32,libtypenum-aa9b4271e041a3f4,libtss_esapi_sys-9fcd049654669494,libbitfield-1d6d0ec9c0ef768b,libzeroize-97e2f99b3f17a65f,libmalloced-e73e5d8ee95eb50f,liblog-a104af7ddd07da4f}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-ltss2-sys" "-ltss2-esys" "-ltss2-tctildr" "-ltss2-mu" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/tmp/rustczVKruu/raw-dylibs" "-B<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/lib" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/examples/aes_encrypt_decrypt-b7fbdfdc2720a6b1" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/lib/libtss2-esys.a(src_tss2_esys_libtss2_esys_la-Esys_Create.o): in function `Esys_Create_Async':
/home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/tpm2-tss/src/tss2-esys/api/Esys_Create.c:221:(.text.Esys_Create_Async+0x3d7): undefined reference to `Tss2_Sys_Create_Prepare'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/tpm2-tss/src/tss2-esys/api/Esys_Create.c:248:(.text.Esys_Create_Async+0x689): undefined reference to `Tss2_Sys_SetCmdAuths'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/tpm2-tss/src/tss2-esys/api/Esys_Create.c:253:(.text.Esys_Create_Async+0x723): undefined reference to `Tss2_Sys_ExecuteAsync'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/lib/libtss2-esys.a(src_tss2_esys_libtss2_esys_la-Esys_Create.o): in function `Esys_Create_Finish':
/home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/tpm2-tss/src/tss2-esys/api/Esys_Create.c:369:(.text.Esys_Create_Finish+0x476): undefined reference to `Tss2_Sys_ExecuteFinish'
....
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/tpm2-tss/src/tss2-esys/esys_crypto_ossl.c:1350:(.text.iesys_cryptossl_sym_sm4_decrypt+0x15c): undefined reference to `EVP_CIPHER_CTX_new'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/tpm2-tss/src/tss2-esys/esys_crypto_ossl.c:1357:(.text.iesys_cryptossl_sym_sm4_decrypt+0x295): undefined reference to `EVP_DecryptInit'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/tpm2-tss/src/tss2-esys/esys_crypto_ossl.c:1363:(.text.iesys_cryptossl_sym_sm4_decrypt+0x320): undefined reference to `EVP_DecryptUpdate'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/tpm2-tss/src/tss2-esys/esys_crypto_ossl.c:1367:(.text.iesys_cryptossl_sym_sm4_decrypt+0x3a1): undefined reference to `EVP_DecryptFinal'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/tpm2-tss/src/tss2-esys/esys_crypto_ossl.c:1374:(.text.iesys_cryptossl_sym_sm4_decrypt+0x462): undefined reference to `EVP_CIPHER_CTX_free'
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
= note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= 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#rustc-link-lib)
error: could not compile `tss-esapi` (example "aes_encrypt_decrypt") due to 1 previous error
Formatting the cc line:
"cc"
"-m64"
"/tmp/rustczVKruu/symbols.o"
"<30 object files omitted>"
"-Wl,--as-needed"
"-Wl,-Bstatic"
"/home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/deps/{libtss_esapi-b74b32e6553b7274,libhostname_validator-207514500d34db57,libstrum-1b852b4aa568f5c5,libsha3-108bdcdcb1075802,libkeccak-8b3cd4a0072181a5,libsm2-33bed472c5bd4460,libsm3-14d536a22a41e4f0,libp521-8f16c6298974fc50,libp192-4848a2d3f3c189dd,libp384-0390eaa9d2bd5f7b,libp256-973989e9cf1576a8,libp224-186e271df33570fc,libprimeorder-e26b3a1049eadb53,libserde-45c71fd2861cfa28,libserde_core-6b718945fbcc98f3,libregex-3f1047a899343f83,libregex_automata-1122fcba119d8eb1,libaho_corasick-56ca3e81afd40e5a,libmemchr-0f07d7c340c7cee2,libregex_syntax-b325ad76ad00641a,libenumflags2-224b1ee70d220441,libx509_cert-aa46d670eb70b756,librsa-aedff3af0f601888,libsha1-de92d09df0e4dcda,libsha2-b071e5e2d01a5622,libcpufeatures-965da2e628aa3ebd,libpkcs1-0832a044fe15132a,libnum_bigint_dig-5e15c699ea263488,liblibm-63dd8845b720c15b,libnum_iter-6e35b1c6c3dd8728,librand-9c7c782877d29bd1,librand_chacha-3eb71e0a147ef8f5,libppv_lite86-e26e27027a950c15,libzerocopy-f806c24807f719fb,libnum_integer-508b61a008c34155,libnum_traits-c6ff946125d559f7,liblazy_static-3f8eab4e2e7ce884,libspin-689451490509ec6f,libsmallvec-0f8403f8dc76f60b,libecdsa-b59bd1fa8d23edd8,librfc6979-4165f7a15e3768cc,libsignature-02d13d265d05dd6c,libelliptic_curve-2dc357aba1b2cce4,libsec1-d076eefef2d19d5a,libpkcs8-adefa844cee9cc1d,libspki-c7221c66fbc3c4c2,libder-173372408f7a1454,libflagset-41360143281b60d5,libpem_rfc7468-4013dcb89cd787ef,libbase64ct-47026b9ca9a440a4,libhkdf-cdb8454e8999da10,libhmac-fb03a411a1a7e7bd,libcrypto_bigint-1b6984e81893f877,libbase16ct-cd4b6fee274155fb,libgroup-a0ea10762c5d3482,libff-4b36faade62b4dd3,librand_core-0441f9929900ea55,libgetrandom-53378f8fffdce44d,liblibc-1784a02f99458686,libcfg_if-a3662b74b62b86e1,libdigest-69b1fcc05d3cd598,libsubtle-93c85a9c0a5259b1,libconst_oid-2505ff7b49e5ccc5,libblock_buffer-dbaf8182450e5dc8,libcrypto_common-31a8cbcf4b4e8c63,libgeneric_array-8168893bfc21df32,libtypenum-aa9b4271e041a3f4,libtss_esapi_sys-9fcd049654669494,libbitfield-1d6d0ec9c0ef768b,libzeroize-97e2f99b3f17a65f,libmalloced-e73e5d8ee95eb50f,liblog-a104af7ddd07da4f}.rlib"
"<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib"
"-Wl,-Bdynamic"
"-ltss2-sys"
"-ltss2-esys"
"-ltss2-tctildr"
"-ltss2-mu"
"-lgcc_s"
"-lutil"
"-lrt"
"-lpthread"
"-lm"
"-ldl"
"-lc"
"-L"
"/tmp/rustczVKruu/raw-dylibs"
"-B<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld"
"-Wl,--eh-frame-hdr"
"-Wl,-z,noexecstack"
"-L"
"/home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/build/tss-esapi-sys-651211342ace232f/out/lib"
"-L"
"<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib"
"-o"
"/home/886b45ce-98b2-4d79-9069-c9ff25bc0232/development/rust-tss-esapi/target/debug/examples/aes_encrypt_decrypt-b7fbdfdc2720a6b1"
"-Wl,--gc-sections"
"-pie"
"-Wl,-z,relro,-z,now"
"-nodefaultlibs"
The essapi-sys build fails due to inability to find symbols from openssl. Any advice here would be great.
All of the libraries are present for openssl-3 as well as the related pkg-config files.
Formatting the cc line: