Skip to content

Commit 545f5c0

Browse files
PS-10627 fix: Fix linking issues on Debian (missing zlib symbols coming from libcrypto) (#90)
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'.
1 parent b5d1299 commit 545f5c0

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

CMakePresets.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"cacheVariables": {
1616
"CMAKE_PREFIX_PATH": "${sourceParentDir}/aws-sdk-cpp-install-${presetName};${sourceParentDir}/boost-install-${presetName}",
1717
"CPP_STANDARD": "20",
18+
"S2N_USE_CRYPTO_SHARED_LIBS": "ON",
1819
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
1920
"BUILD_TESTING": "ON"
2021
}

extra/cmake_presets/aws-sdk-cpp/CMakePresets.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
"CPP_STANDARD": "20",
1717
"ENABLE_UNITY_BUILD": "ON",
1818
"BUILD_SHARED_LIBS": "OFF",
19+
"AWS_USE_CRYPTO_SHARED_LIBS": "ON",
20+
"S2N_USE_CRYPTO_SHARED_LIBS": "ON",
1921
"FORCE_SHARED_CRT": "OFF",
2022
"ENABLE_TESTING": "OFF",
2123
"AUTORUN_UNIT_TESTS": "OFF",

0 commit comments

Comments
 (0)