Skip to content
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

Custom OpenSSL location no longer respected in aws 1.11.x #2809

Closed
nrgiii opened this issue Jan 8, 2024 · 4 comments
Closed

Custom OpenSSL location no longer respected in aws 1.11.x #2809

nrgiii opened this issue Jan 8, 2024 · 4 comments
Assignees
Labels
bug This issue is a bug. closing-soon This issue will automatically close in 4 days unless further comments are made. Cmake Cmake related submissions p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Comments

@nrgiii
Copy link

nrgiii commented Jan 8, 2024

Describe the bug

We build aws using our own openssl version compiled from source. In 1.9.x we pass the path to our openssl using these cmake variables and all is well: -DLibCrypto_INCLUDE_DIR, -DLibCrypto_LIBRARY, -DOPENSSL_ROOT_DIR

In 1.11.x this no longer works and cmake complains some of these variables are unused:

CMake Warning:
  Manually-specified variables were not used by the project:

    LibCrypto_INCLUDE_DIR
    LibCrypto_LIBRARY

Then at runtime we get this abort():

s2n_init() failed: 402653268 (The libcrypto major version number seen at compile-time is different from the major version number seen at run-time)

Fatal error condition occurred in /export/moop1/users/normg/gs371/externals/aws/crt/aws-crt-cpp/crt/aws-c-io/source/s2n/s2n_tls_channel_handler.c:203: 0 && "s2n_init() failed"```

Expected Behavior

aws-sdk-cpp should fully support specifying a custom path to the openssl directory and not rely on the version installed on the host.

Current Behavior

cmake arguments specifying openssl/crypto directory are ignored. This is a regression and worked correctly in 1.9.x
LibCrypto_INCLUDE_DIR
LibCrypto_LIBRARY

Reproduction Steps

  1. build a version of openssl from source that has a different major version from the openssl installed on the host.
  2. build aws-sdk-cpp
  3. load the openssl /crypto libraries from CodeDeploy generated client capitilization inconsistency breaks builds for case-sensitive operating systems. #1 before loading the aws shared lib.
  4. call Aws::InitAPI()

Possible Solution

Restore cmake behavior in 1.9.x that allowed custom openssl/crypto library to be specified.

Additional Information/Context

Possibly related to these issues:

#2735
#1888

AWS CPP SDK version used

1.11.237

Compiler and Version used

gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

Operating System and version

Unbuntu 20.04

@nrgiii nrgiii added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 8, 2024
@jmklix jmklix added the Cmake Cmake related submissions label Jan 9, 2024
@jmklix jmklix self-assigned this Jan 9, 2024
@jmklix jmklix added the p2 This is a standard priority issue label Jan 9, 2024
@sbiscigl
Copy link
Contributor

build aws-sdk-cpp

could you please elaborate on how you are building the SDK? specifically the cmake parameters. I see you mention LibCrypto_INCLUDE_DIR and LibCrypto_LIBRARY but what other cmake paramteres are you using? specifically if you are putting your openssl libs in CMAKE_PREFIX_PATH as that is how Findcrypto looks for them.

@jmklix jmklix added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. and removed needs-triage This issue or PR still needs to be triaged. labels Jan 11, 2024
Copy link

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jan 14, 2024
@nrgiii
Copy link
Author

nrgiii commented Jan 15, 2024

Hi @sbiscigl , setting CMAKE_PREFIX_PATH resolves the issue. Thank you for your help.

@nrgiii nrgiii closed this as completed Jan 15, 2024
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closing-soon This issue will automatically close in 4 days unless further comments are made. Cmake Cmake related submissions p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.
Projects
None yet
Development

No branches or pull requests

3 participants