Repository navigation
Description
Describe the bug
I was using the following on previous debian releases:
cmake -DCMAKE_BUILD_TYPE=Release -DSTATIC_LINKING=1 DBUILD_ONLY="email;route53domains;route53"
On trixie this results in the following:
[ 98%] Building CXX object tests/aws-cpp-sdk-core-tests/CMakeFiles/aws-cpp-sdk-core-tests.dir/utils/xml/XmlSerializerTest.cpp.o
[ 98%] Linking CXX executable aws-cpp-sdk-core-tests
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libcrypto.a(libcrypto-lib-c_zstd.o): undefined reference to symbol 'ZSTD_compress'
/usr/bin/ld: /lib/x86_64-linux-gnu/libzstd.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [tests/aws-cpp-sdk-core-tests/CMakeFiles/aws-cpp-sdk-core-tests.dir/build.make:1738: tests/aws-cpp-sdk-core-tests/aws-cpp-sdk-core-tests] Error 1
make[1]: *** [CMakeFiles/Makefile2:1505: tests/aws-cpp-sdk-core-tests/CMakeFiles/aws-cpp-sdk-core-tests.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Claude informs me that it's due to this.
The error comes from trixie’s newer OpenSSL (3.5). Debian builds it with zstd support, and its compression code lives in libcrypto.a. Bookworm’s OpenSSL 3.0 didn’t depend on zstd, which is why the same build works there.
Your build is linking the static libcrypto.a. A static archive doesn’t carry its own dependencies, so the linker needs -lzstd on the command line, and the SDK’s CMake doesn’t add it. The message “DSO missing from command line” means exactly that: libzstd.so was found indirectly, but it isn’t explicitly listed.
(As an aside, using AWS_USE_CRYPTO_SHARED_LIBS does not fix things, although I would prefer to statically link.)
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
Tests Link
Current Behavior
Tests don't link
Reproduction Steps
cmake -DCMAKE_BUILD_TYPE=Release -DSTATIC_LINKING=1 DBUILD_ONLY="email;route53domains;route53"
make
Possible Solution
No response
Additional Information/Context
No response
AWS CPP SDK version used
1.11.921 (HEAD as of yesterday)
Compiler and Version used
gcc (Debian 14.2.0-19) 14.2.0
Operating System and version
Debian Trixie, fully patched
Activity
sbiscigl commentedon Nov 2, 2026
Hey thanks for reaching out, was unaware Debian started building their OpenSSL with zstd. Since static libraries don't carry their dependencies, if you're linking statically, now everything with an OpenSSL dependency needs to link zstd, not just the SDK. That's on how Debian packages OpenSSL rather than the SDK, but you have three options to work around it.
install
libzstd-devand add the cmake configuration option-DCMAKE_CXX_STANDARD_LIBRARIES="-lzstd", which will link zstd when the SDK's tests are built. you'll also need to add zstd when linking your own application against the static SDK.this will continue to use the system openssl
sample docker image working:
configure with
-DUSE_OPENSSL=OFF, which will use the aws-lc project that already exists in the build tree, skipping system openssl entirely. this has runtime consequences as updating system libcrypto won't update the version the SDK is running with, however this will use the packaged version of crypto in our dependency set.sample docker image working:
Findcryptocmake files.aws-c-cal
s2n
the SDK doesn't actually pick your crypto, the dependencies you build alongside the SDK do. they have a cmake module that finds and links libcrypto. updating those to pull in zstd would be the cmake recipe location to bring it in.
jmccl commentedon Nov 4, 2026
Thanks for the suggestions. #1 helps a lot.
However, my impression is this a a openssl 3.5+ and static linking issue, not a Debian issue as such.
(The CMake magic needs to be '-DCMAKE_CXX_STANDARD_LIBRARIES="-lzstd -lz"', fwiw)
sbiscigl commentedon Nov 4, 2026
yeah youre right, in that case option 3 is what you would need to go with, and aws-c-cal and s2n would need to update their find crypto scripts to respect linking zstd. however option 2 would be preferred to that, as its using the packaged libcrypto in the build tree.
also from the s2n documenation they specifically call out
so they only plan on supporting those versions, if you want them to support higher versions thats a feature request they would need to work on. being that is their support matrix i would even callout out using 3.1.x+ as a potential support risk.
the dockerfile above builds as written, curious why you need "lz"? or ar you referring to your build process and not the dockerfile from above?