-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Milestone
Description
We hack around issues trying to reference OpenSSL from our Linux-Bionic builds here:
runtime/src/native/libs/System.Security.Cryptography.Native/extra_libs.cmake
Lines 10 to 24 in 8669b74
| if(FORCE_ANDROID_OPENSSL) | |
| set(OPENSSL_CRYPTO_LIBRARY /usr/lib/x86_64-linux-gnu/libcrypto.so) | |
| set(OPENSSL_SSL_LIBRARY /usr/lib/x86_64-linux-gnu/libssl.so) | |
| # Things get more wrong. We need Desktop OpenSSL headers, but | |
| # /usr/include is special cased and forbidden. We need to copy | |
| # the headers to a different location and use them | |
| if(NOT DEFINED OPENSSL_INCLUDE_DIR) | |
| string(RANDOM LENGTH 24 _s) | |
| set(OPENSSL_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/${_s}/opensslheaders CACHE PATH "temporary directory") | |
| file(MAKE_DIRECTORY ${OPENSSL_INCLUDE_DIR}) | |
| file(COPY /usr/include/openssl DESTINATION ${OPENSSL_INCLUDE_DIR}) | |
| file(GLOB_RECURSE opensslconf /usr/include/*/openssl/*conf*.h) | |
| file(COPY ${opensslconf} DESTINATION ${OPENSSL_INCLUDE_DIR}/openssl/) | |
| endif() | |
| endif() |
This hack works with OpenSSL 1.1 headers, but breaks with OpenSSL 3.x headers, which check the target architecture. This breaks for our linux-bionic builds, which try to build for architectures that the multilib-compatible headers aren't set up to support.
This is the cause of the break requiring #102849 and makes our linux-bionic builds incompatible with Azure Linux 3.0.
Metadata
Metadata
Assignees
Type
Projects
Status
No status