Skip to content

Conversation

@DmitriyMusatkin
Copy link
Contributor

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.

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():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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