From 1312220037b66e33725c3e1e5b6f4a5c39ad8bb2 Mon Sep 17 00:00:00 2001 From: Yura Sorokin Date: Thu, 12 Mar 2026 19:37:24 +0100 Subject: [PATCH] PS-10627 fix: Fix linking issues on Debian (missing zlib symbols coming from libcrypto) https://perconadev.atlassian.net/browse/PS-10627 Fixed an issue with not being able to link main project executable on Debian platforms where 'libcrypto' is built with 'zstd'. Reworked the way how we build AWS SDK C++ libraries. We now pass 2 additional CMake options ('S2N_USE_CRYPTO_SHARED_LIBS=ON' and 'CMAKE_EXPORT_COMPILE_COMMANDS=ON') which instructs Cmake to use shared version of the 'libcrypto' when building AWS SDK C++ libraries. In addition, we also pass the same 'S2N_USE_CRYPTO_SHARED_LIBS' to the main project CMake execution in order to get rid of static 'libcrypto.a' dependency coming from the second level dependencies of 'aws-cpp-sdk-s3-crt'. --- CMakePresets.json | 1 + extra/cmake_presets/aws-sdk-cpp/CMakePresets.json | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CMakePresets.json b/CMakePresets.json index 9522fc3..2eeae69 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -15,6 +15,7 @@ "cacheVariables": { "CMAKE_PREFIX_PATH": "${sourceParentDir}/aws-sdk-cpp-install-${presetName};${sourceParentDir}/boost-install-${presetName}", "CPP_STANDARD": "20", + "S2N_USE_CRYPTO_SHARED_LIBS": "ON", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON", "BUILD_TESTING": "ON" } diff --git a/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json b/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json index 88c49cf..b903261 100644 --- a/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json +++ b/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json @@ -16,6 +16,8 @@ "CPP_STANDARD": "20", "ENABLE_UNITY_BUILD": "ON", "BUILD_SHARED_LIBS": "OFF", + "AWS_USE_CRYPTO_SHARED_LIBS": "ON", + "S2N_USE_CRYPTO_SHARED_LIBS": "ON", "FORCE_SHARED_CRT": "OFF", "ENABLE_TESTING": "OFF", "AUTORUN_UNIT_TESTS": "OFF",