aws / aws-lc

AWS-LC is a general-purpose cryptographic library maintained by the AWS Cryptography team for AWS and their customers. It іs based on code from the Google BoringSSL project and the OpenSSL project.
Other
374 stars 114 forks source link

Unknown processor:mipsel when cross-compiling for MIPS #557

Closed stwirth closed 2 years ago

stwirth commented 2 years ago

Problem:

CMake Error at _deps/aws-iot-device-sdk-cpp-v2-src/crt/aws-crt-cpp/crt/aws-lc/CMakeLists.txt:629 (message):
  Unknown processor:mipsel

Relevant details

AWS-LC commit: commit 11b50d39cf2378703a4ca6b6fee9d76a2e9852d1 (HEAD, tag: v1.0.2)

System information: for linux, below info can be collected by running uname -srvmp

Build log:

-- The C compiler identification is GNU 7.2.0
-- The CXX compiler identification is GNU 7.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /project/out/product/halley5.v30_nand_5.10-eng/obj/buildroot-intermediate/host/bin/mips-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /project/out/product/halley5.v30_nand_5.10-eng/obj/buildroot-intermediate/host/bin/mips-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_FIND_ROOT_PATH=/project/out/product/halley5.v30_nand_5.10-eng/obj/buildroot-intermediate/host/mipsel-buildroot-linux-gnu/sysroot
-- AWS CRT C++ v0.17.30
-- CMake 3.18.6
-- Performing Test AWS_HAVE_WINAPI_DESKTOP
-- Performing Test AWS_HAVE_WINAPI_DESKTOP - Failed
-- Performing Test AWS_ARCH_INTEL
-- Performing Test AWS_ARCH_INTEL - Failed
-- Performing Test AWS_ARCH_ARM64
-- Performing Test AWS_ARCH_ARM64 - Failed
-- Performing Test AWS_ARCH_ARM32
-- Performing Test AWS_ARCH_ARM32 - Failed
-- Performing Test AWS_HAVE_GCC_INLINE_ASM
-- Performing Test AWS_HAVE_GCC_INLINE_ASM - Success
-- Performing Test AWS_HAVE_AUXV
-- Performing Test AWS_HAVE_AUXV - Success
-- Performing Test AWS_HAVE_EXECINFO
-- Performing Test AWS_HAVE_EXECINFO - Success
-- Performing Test AWS_HAVE_LINUX_IF_LINK_H
-- Performing Test AWS_HAVE_LINUX_IF_LINK_H - Success
-- Performing Test HAVE_M_AVX2_FLAG
-- Performing Test HAVE_M_AVX2_FLAG - Failed
-- Performing Test HAVE_AVX2_INTRINSICS
-- Performing Test HAVE_AVX2_INTRINSICS - Failed
-- Performing Test HAVE_MM256_EXTRACT_EPI64
-- Performing Test HAVE_MM256_EXTRACT_EPI64 - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Performing Test HAS_FPIC_FLAG
-- Performing Test HAS_FPIC_FLAG - Success
-- Performing Test HAS_MOUTLINE_ATOMICS
-- Performing Test HAS_MOUTLINE_ATOMICS - Failed
-- Performing Test HAS_64BIT_FILE_OFFSET_BY_DEFAULT
-- Performing Test HAS_64BIT_FILE_OFFSET_BY_DEFAULT - Success
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Performing Test HAS_WGNU
-- Performing Test HAS_WGNU - Failed
-- Performing Test HAVE_SYSCONF
-- Performing Test HAVE_SYSCONF - Success
-- Looking for pthread_attr_setaffinity_np
-- Looking for pthread_attr_setaffinity_np - found
-- Performing Test HAS_SANITIZERS
-- Performing Test HAS_SANITIZERS - Failed
-- Packaging currently only supported on Fedora.
-- Performing Test HAS_WNO_STRINGOP_OVERFLOW
-- Performing Test HAS_WNO_STRINGOP_OVERFLOW - Success
-- Performing Test HAS_WNO_ARRAY_PARAMETER
-- Performing Test HAS_WNO_ARRAY_PARAMETER - Success
-- Go not found. Disabling some code generation and using pre-generated code in generated-src/
-- Perl not found. Disabling some code generation and using pre-generated code in generated-src/
-- Run check_run file_to_test 'memcmp_invalid_stripped_check.c', flag_to_set 'MEMCMP_INVALID_STRIPPED', and compile_flags ' -DNDEBUG'.
-- Test stdalign_check.c passed, enabling AWS_LC_STDALIGN_AVAILABLE
-- Test builtin_swap_check.c passed, enabling AWS_LC_BUILTIN_SWAP_SUPPORTED
CMake Error at _deps/aws-iot-device-sdk-cpp-v2-src/crt/aws-crt-cpp/crt/aws-lc/CMakeLists.txt:629 (message):
  Unknown processor:mipsel

-- Configuring incomplete, errors occurred!
stwirth commented 2 years ago

Adding another three lines like these for mipsel makes the compilation go through: https://github.com/awslabs/aws-lc/blob/c84082e8661439f2ed81f29eb03a6f3c9a9eb8c7/CMakeLists.txt#L651-L653

dkostic commented 2 years ago

Hi @stwirth, thanks for submitting the issue. The mipsel label is for little-endian MIPS, right?

stwirth commented 2 years ago

Yes, I think so.

dkostic commented 2 years ago

ok, we'll open a PR to fix that.

DominicDams commented 2 years ago

Just want to update that the PR set something off in our CI. I'm looking into why and will update the PR to fix the issue asap.

DominicDams commented 2 years ago

Sorry for the delay, I need to update some docker images for this, and that ballooned into more work than expected because of how our CI update process works. I'm planning to either get our CI updated today or Monday, at which point I'll try and get the PR to fix this merged.