-
Notifications
You must be signed in to change notification settings - Fork 122
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
Error Cross Compiling aws-iot-device-sdk-cpp-v2 with MUSL ARM #384
Comments
Thank you for reporting this issue!
The warning message does not fail the build.
Would you help provide the Docker image(e.g. ubuntu-18.04)? |
Hi @bryce-shang, Thanks for the response. I was able to work through this issue. With these flags, Crypto library is picking up ARM specific assembly code for compilation. I had tried the CMAKE_SYSTEM_PROCESSOR alone, but that had not worked. With inclusion of CMAKE_SYSTEM_NAME, it started working. The command now used for compilation is: Closing this issue. |
Hi @bryce-shang , To answer your question, I am using stock alpine 3.13 image, which can be downloaded using |
* Address -Xcheck:jni warnings for AES/CBC + If one of the input/output buffers is a direct byte buffer and the other one is a byte[], there is a chance that we call GetDirectBufferAddress after calling GetPrimitiveArrayCritical. This triggers a warning and this PR addresses that. + JIOBlobs is introduced that handles both input and output buffers. This class helps with addressing the warnings caused by -Xcheck:jni and it also avoids calling GetPrimitiveArrayCritical twice if the same byte[] is used for input and output. + When decrypting in AES/CBC/PKCS7Padding mode, AWS-LC touches the output buffer beyond its returned length. This means in ACCP we need to over allocate when calling update in multi-step decryption.
Problem:
I am trying to cross compile aws-iot-device-sdk-cpp-v2 using ARM MUSL toolchain. But the compilation is failing at aws-lc. When executing the Cmake command before the actual build, noticed that it is detecting the CMAKE_SYSTEM_PROCESSOR as x86_64. I think this maybe the reason for the failure, as the file at which it is failing is assembly code for x86 (crt/aws-crt-cpp/crt/aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/aesni-x86.S.o)
Also tried setting CMAKE_SYSTEM_PROCESSOR to arm by doing export and by passing it as set argument for cmake.
There is an issue flagged for GCC compiler version (current one in use in this toolchain is 11.2.1)
Similar issue was already logged (aws/aws-iot-device-sdk-cpp-v2#293)
Created this new issue as that one is already closed due to staleness.
Thanks in advance. Any help is appreciated.
Relevant details
ARM MUSL toolchain : (http://musl.cc/armv7l-linux-musleabihf-cross.tgz)
AWS-LC commit: 7e7f06c (HEAD, tag: v0.0.2)
aws-iot-device-sdk-cpp-v2 commit : bc51b8a97e2590b03f0118107ee19c85f281c1e3 (v1.15.2)
System information: for linux, below info can be collected by running
uname -srvmp
Building it on an Alpine 3.13 docker container
Linux 5.4.0-91-generic #102~18.04.1-Ubuntu SMP Thu Nov 11 14:46:36 UTC 2021 x86_64 unknown
Same results on a Ubuntu 18.04 VM as well.
Build log:
The text was updated successfully, but these errors were encountered: