Linking issue with 1.11.337
srinivasab3 opened this issue · 6 comments
Describe the bug
Took the latest tag 1.11.337 and built the AWS SDK.. Build was successful.
While building the application binary, getting linking error.
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_CBC_Cipher(Aws::Crt::Optional<aws_byte_cursor> const&, Aws::Crt::Optional<aws_byte_cursor> const&, aws_allocator*)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::ResolutionOutcome::~ResolutionOutcome()'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::RuleEngine::Resolve(Aws::Crt::Endpoints::RequestContext const&) const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::RequestContext::AddString(aws_byte_cursor const&, aws_byte_cursor const&)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::ResolutionOutcome::GetProperties() const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Auth::AwsSigningConfig::SetShouldSignHeaderUserData(void*)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::Encrypt(aws_byte_cursor const&, aws_byte_buf&)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::operator bool() const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_CTR_Cipher(Aws::Crt::Optional<aws_byte_cursor> const&, Aws::Crt::Optional<aws_byte_cursor> const&, aws_allocator*)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::Reset()'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::Hash::ComputeOneShot(aws_byte_cursor const&, aws_byte_buf&, unsigned long)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::GetIV() const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::ApiHandle::GetOrCreateStaticDefaultHostResolver()'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::GetState() const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::ResolutionOutcome::IsEndpoint() const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::Decrypt(aws_byte_cursor const&, aws_byte_buf&)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::ApiAllocator()'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::GetKey() const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_KeyWrap_Cipher(Aws::Crt::Optional<aws_byte_cursor> const&, aws_allocator*)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::ResolutionOutcome::IsError() const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::RequestContext::RequestContext(aws_allocator*)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::ResolutionOutcome::GetHeaders() const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::RequestContext::~RequestContext()'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::RequestContext::AddBoolean(aws_byte_cursor const&, bool)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::GetTag() const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::GenerateRandomBytes(aws_byte_buf&, unsigned long)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::Hash::CreateSHA1(aws_allocator*)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::ApiHandle::GetCrtVersion() const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::FinalizeDecryption(aws_byte_buf&)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::ResolutionOutcome::GetUrl() const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::RuleEngine::RuleEngine(aws_byte_cursor const&, aws_byte_cursor const&, aws_allocator*)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::RuleEngine::~RuleEngine()'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_GCM_Cipher(Aws::Crt::Optional<aws_byte_cursor> const&, Aws::Crt::Optional<aws_byte_cursor> const&, Aws::Crt::Optional<aws_byte_cursor> const&, Aws::Crt::Optional<aws_byte_cursor> const&, aws_allocator*)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::SymmetricCipher::FinalizeEncryption(aws_byte_buf&)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::ByteBufInit(aws_allocator*, unsigned long)'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Crypto::Hash::DigestSize() const'
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to `Aws::Crt::Endpoints::ResolutionOutcome::GetError() const'
Expected Behavior
NA
Current Behavior
NA
Reproduction Steps
NA
Possible Solution
No response
Additional Information/Context
No response
AWS CPP SDK version used
1.11.337
Compiler and Version used
gcc
Operating System and version
Linux
Reproduction Steps
NA
could you please provide reproduction steps, if we can reproduce we can fix it. If i had to take a guess though wherever your application is linking from is linking a old version of aws-crt-cpp
Hi,
I am using https://github.com/aws/aws-iot-device-sdk-cpp-v2 as well. But it was not updated to latest. After updating the version to v1.32.6, most of the linking errors are resolved.
But now I am seeing
/usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to Aws::Crt::Crypto::SymmetricCipher::GetState() const' /usr/bin/ld: /ros_ws/src/install/tools/lib/libaws-cpp-sdk-core.so: undefined reference to
Aws::Crt::ByteBufInit(aws_allocator*, unsigned long)'
This is because, in aws-iot-device-sdk-cpp-v2 aws-crt-cpp is not updated to latest one where GetState and ByteBufInit are added. So can you please check and do the needful.
iot sdk bumped their crt dependency and that should resolve this issue.
https://github.com/aws/aws-iot-device-sdk-cpp-v2/releases/tag/v1.32.7
Now I am able to build my app successfully with v1.32.7.
But now I am getting following error while running the app..
Jun 06 12:58:28 localhost cis[16075]: s2n_init() failed: 402653268 (The libcrypto major version name seen at compile-time is different from the major version name seen at run-time)
Jun 06 12:58:28 localhost cis[16075]: Fatal error condition occurred in /ros_ws/src/IhmJellyfishAwsSdkSource/aws-iot-device-sdk-cpp-v2/crt/aws-crt-cpp/crt/aws-c-io/source/s2n/s2n_tls_channel_handler.c:203: 0 && "s2n_init() failed"
That error means that libcrypto present during runtime was different than the one used during compilation (ex. compiled against openssl 1.1.1, but running against 3.0). things like strace can tell you which lib is being loaded at run time
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.