-
Notifications
You must be signed in to change notification settings - Fork 110
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
Iot SDK crashing when statically linked with MUSL toolchain #308
Comments
In case anyone else comes across this, I encountered this problem and was able to solve it by setting the CMAKE flag, "BYO_CRYPTO" in aws-c-cal (https://github.com/awslabs/aws-c-cal). Specifically, add "-DBYO_CRYPTO=ON" to the cmake command for compiling aws-cpp-sdk. This worked for me when trying to build a full static library that includes aws-cpp-sdk. |
|
BYO_CRYPTO is only going to help people that are using the regular AWS SDK for C++ and don't need any CRT functionality. For IoT customers, BYO_CRYPTO requires you to implement a large suite of cryptographic and tls functionality on your own. |
Thanks for the response, A dynamic link for libcrypto alone worked for me, with all other SDK libraries statically linked. But it would be interesting to know if there is a way to static link crypto as well. |
I had the same issue. @joseph-vincent 's solution is the only on that worked for me. Remove the
|
@joseph-vincent did this work for you?
|
Hey,
|
Changing this to a feature request as this sdk does not currently support alpine linux, but this is something that is on our backlog. |
We now support alpine linux and have CI tests to make sure it continues to work. Please let us know if you run into any problems when using this sdk when linked to MUSL toolchains |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
Unable to run statically linked application with AWS SDK compiled with MUSL toolchain. SDK is throwing error "Unable to load symbols from process space". The same application can be compiled with dynamic linking and works fine.
Platform/OS/Device
Compiling the SDK and application on Alpine 3.13 container with MUSL toolchain http://musl.cc/x86_64-linux-musl-cross.tgz
Running on Ubuntu x86
SDK version number
Tried on v1.12.0 , v1.12.4 and v1.13.0
To Reproduce (observed behavior)
Steps to reproduce the behavior (please share code)
Expected behavior
The Application will crash as soon as it starts and give below output.
Logs/output
#:~/Temp/aws_iot_testclient$ ./build/basic_pub_sub
Fatal error condition occurred in /code/aws-iot-device-sdk-cpp-v2/crt/aws-crt-cpp/crt/aws-c-cal/source/unix/openssl_platform_init.c:488: process && "Unable to load symbols from process space"
Exiting Application
No call stack information available
Aborted (core dumped)
Additional context
#:~/Temp/aws_iot_testclient$ sudo find / -name libcrypto.so|grep -v docker
/home/devbox/Temp/libcrypto.so
/x86_64-linux-musl-cross/local/lib/libcrypto.so
/usr/local/lib/libcrypto.so
/usr/lib/x86_64-linux-gnu/libcrypto.so
The text was updated successfully, but these errors were encountered: