Skip to content

Fix linking of code using the aws library if the aws library is built to produce static libraries. - #4005

Open
jmccl wants to merge 2 commits into
aws:mainfrom
jmccl:main
Open

jmccl wants to merge 2 commits into
aws:mainfrom
jmccl:main

Conversation

@jmccl

@jmccl jmccl commented Nov 19, 2026 •

Copy link
Copy Markdown

This Dockerfile reproduces the issue. When built it produces this output when running cmake on the test code.

0.566 CMake Error at /usr/local/lib/cmake/aws-cpp-sdk-core/aws-cpp-sdk-core-targets.cmake:61 (set_target_properties):
0.566   The link interface of target "aws-cpp-sdk-core" contains:
0.566 
0.566     ZLIB::ZLIB
0.566 
0.566   but the target was not found.  Possible reasons include:
0.566 
0.566     * There is a typo in the target name.
0.566     * A find_package call is missing for an IMPORTED target.
0.566     * An ALIAS target is missing.

The fix is to find the zlib dependency in the aws code.

(I'm not sure when the dependency arose. I'd been running code from a couple of years ago, so it may not have been recent.)

These changes were produced by Claude and reviewed by me. I've tested the fix on debian:bookworm.

Description of changes:

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants