-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cmake looks for static version of OpenSSL when building AWS static #1926
Comments
Hi Henrique, The short answer is "It's complicated"... We have a dependency on openssl because we have a dependency on curl inside the SDK, at the same time, we have a dependency on AWS CRT package which itself has a dependency on aws-lc and s2n that have a dependency on aws-lc or openssl aka libcrypto. We could definitely improve our documentation about In the meantime, CentOS/RedHat yum-based distros have a package openssl-static that should be available in the repo and provide you a static version of openssl. I hope this could be a solution for you for now. Best regards, |
Sergey, openssl-static is available only on Centos-7, not Centos-8. |
I'm using this patch with S3 on Redhat 7/8 and Ubuntu 18.04/20.04/21.04/22.04 and it all compiles, builds and runs great both the AWS lib and the application, no issues. |
I think, as already mentioned, the static/shared library issue is indeed complicated. On my box (running current Manjaro) I have no static version of libcrypto library, but the SDK itself builds fine with both I'm wondering whether this might be a side effect of some other dependencies (e.g. aws-lambda-cpp which I also use). However, when I build my project without using the SDK, all builds fine. |
Henrique, thanks a lot for your insights and PR and confirmation that it works for you. |
Krzysiek,
It sounds like there is somewhere an undeclared interface dependency in the SDK/CRT. We have a test that builds a small test app to catch this type of issues but it seems it did not work this time.
|
The original issue is solved by the submitter's PR. |
|
Describe the bug
The build fails on CentOS 7/8 with crypto_LIBRARY not found if
-DBUILD_SHARED_LIBS=OFF
is passed.Expected Behavior
The build should use the dynamic version of the OpenSSL library if the static version is not available.
Current Behavior
When defining
-DBUILD_SHARED_LIBS=OFF
the build searches for a respective static version of OpenSSL which is not available in some distributions like Redhat/CentOS.Reproduction Steps
On Redhat 7/8, checkout AWS as usual then issue
it should fail with
Possible Solution
A simple solution is just to replace the use of the crypto static library with the shared one if the static is not found.
Additional Information/Context
I am not totally acquainted on why the reason to pick up the static openssl library version when building static but it does sound out of place to me.
AWS CPP SDK version used
1.9.253
Compiler and Version used
gcc (GCC) 9.2.1 20191120 (Red Hat 9.2.1-2)
Operating System and version
CentOS-8 from docker
The text was updated successfully, but these errors were encountered: