Files
termux-packages/packages/dotnet8.0/0009-runtime-src-native-libs-System.Security.Cryptography.Native-CMakelists.txt.patch
termux-pacman-bot 8cfc858bb4 fix(main/dotnet): fixes System.Security.Cryptography.Native.Openssl linker errors for .NET 8/9 (#24052)
System.Security.Cryptography.Native.Openssl needs libssl and libcrypto but does not have termux's libdir in its rpath
This adds the libdir to rpath for System.Security.Cryptography.Native.Openssl for both versions
2025-04-03 01:31:11 +00:00

14 lines
661 B
Diff

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)