mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-24 14:17:52 -05:00
Hide statically linked OpenSSL symbols from the dynamic symbol table
Arrow/Parquet/Thrift (vcpkg) link OpenSSL statically, regardless of gRPC. On Linux these symbols ended up in the dynamic symbol table of the executable and interposed the system OpenSSL loaded by the Qt TLS plugin (and by libssh2/libldap via libcurl). Mixing two OpenSSL versions caused a crash in the TLS handshake, e.g. when pressing Authenticate for Sumo.
This commit is contained in:
1 parent
1581e06f2b
commit
9613251e9a
1 file changed
+10
@@ -225,6 +225,16 @@ endif()
|
||||
|
||||
target_link_libraries(ResInsight PRIVATE ${LINK_LIBRARIES})
|
||||
|
||||
# Arrow/Parquet/Thrift (vcpkg) link OpenSSL statically, independent of gRPC.
|
||||
# Keep those symbols out of the dynamic symbol table, otherwise they interpose
|
||||
# the system OpenSSL loaded by the Qt TLS plugin (and by libssh2/libldap via
|
||||
# libcurl), mixing two OpenSSL versions and crashing during the TLS handshake.
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
target_link_options(
|
||||
ResInsight PRIVATE "LINKER:--exclude-libs,libssl.a:libcrypto.a"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_link_libraries(ResInsight PRIVATE xcb)
|
||||
endif()
|
||||
|
||||
Reference in new issue
Block a user