System.Security.Native.Cryptography.Native needs libssl.so and libcrypto.so, both of which are provided by Termux This sets rpath to help the linker find them during runtime --- a/src/runtime/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt +++ b/src/runtime/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt @@ -1,6 +1,7 @@ project(System.Security.Cryptography.Native C) # These are happening inside of OpenSSL-defined macros out of our control +add_link_options("-Wl,-rpath,@TERMUX_PREFIX@/lib") add_compile_options(-Wno-cast-align) add_compile_options(-Wno-reserved-id-macro) add_compile_options(-Wno-documentation)