Open
Conversation
TingDaoK
reviewed
Oct 27, 2025
setup.py
Outdated
Comment on lines
381
to
389
| # Warning: very hacky. feel free to replace with something cleaner | ||
| # Problem: if you install python through homebrew, python config ldflags | ||
| # will point to homebrew lib folder. | ||
| # setuptools puts python ldflags before any of our lib paths, so if there is openssl or | ||
| # another libcrypto in homebrew libs, it will get picked up before aws-lc we are building against. | ||
| # And then we have fun failures due to lib mismatch. | ||
| # I could not find a cleaner way, so lets just hook into linker command and make sure | ||
| # our libs appear before other libs. | ||
| if sys.platform == 'darwin' and using_libcrypto() and not using_system_libs() and not using_system_libcrypto(): |
Contributor
There was a problem hiding this comment.
just think out load, do we want to enable this all the time?
eg:
- when we are using the system lib, I'd expect us to not build aws-lc, so that it won't override the libcrypto path as well.
- It's the same condition for other platforms as well, right? I believe the last time I saw something similar was with linux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
More details in comments.
TLDR homebrew python forces an order of deps that makes us pick up system openssl instead of aws-lc during linking when we build against aws-lc, cause a mismatch at runtime. Hack around that.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.