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

Error during Cross-Compiling aws-iot-device-sdk-python-v2 with make #795

Closed
Sourabh-ALTEN opened this issue Feb 9, 2023 · 4 comments
Closed
Labels
closed-for-staleness response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@Sourabh-ALTEN
Copy link

Sourabh-ALTEN commented Feb 9, 2023

Problem:

I am trying to cross-compile aws-iot-device-sdk-python-v2 which requires aws-crt-python. I am working on building a custom Linux distribution using Buildroot for aarch64. But during make I am getting below errors from asm

Build log:

>>> python-awscrt 0.16.10 Building
(cd [...]output/build/python-awscrt-0.16.10//; _PYTHON_HOST_PLATFORM="linux-aarch64" _PYTHON_PROJECT_BASE="[...]output/build/python3-3.10.8" _PYTHON_SYSCONFIGDATA_NAME="`{ [ -e [...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10//_sysconfigdata__linux_*.py ] && basename [...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10//_sysconfigdata__linux_*.py .py; } || true`" PATH="[...]output/host/bin:[...]output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" PATH="[...]output/host/bin:[...]output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" AR="[...]output/host/bin/aarch64-linux-gcc-ar" AS="[...]output/host/bin/aarch64-linux-as" LD="[...]output/host/bin/aarch64-linux-ld" NM="[...]output/host/bin/aarch64-linux-gcc-nm" CC="[...]output/host/bin/aarch64-linux-gcc" GCC="[...]output/host/bin/aarch64-linux-gcc" CPP="[...]output/host/bin/aarch64-linux-cpp" CXX="[...]output/host/bin/aarch64-linux-g++" FC="[...]output/host/bin/aarch64-linux-gfortran" F77="[...]output/host/bin/aarch64-linux-gfortran" RANLIB="[...]output/host/bin/aarch64-linux-gcc-ranlib" READELF="[...]output/host/bin/aarch64-linux-readelf" STRIP="[...]output/host/bin/aarch64-linux-strip" OBJCOPY="[...]output/host/bin/aarch64-linux-objcopy" OBJDUMP="[...]output/host/bin/aarch64-linux-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/bin/gcc" CXX_FOR_BUILD="/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I[...]output/host/include" CFLAGS_FOR_BUILD="-O2 -I[...]output/host/include" CXXFLAGS_FOR_BUILD="-O2 -I[...]output/host/include" LDFLAGS_FOR_BUILD="-L[...]output/host/lib -Wl,-rpath,[...]output/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="[...]output/host/bin/aarch64-linux-as" DEFAULT_LINKER="[...]output/host/bin/aarch64-linux-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=1" CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=1" LDFLAGS="" FCFLAGS=" -Os -g0" FFLAGS=" -Os -g0" PKG_CONFIG="[...]output/host/bin/pkg-config" STAGING_DIR="[...]output/host/aarch64-buildroot-linux-gnu/sysroot" INTLTOOL_PERL=/usr/bin/perl PYTHONPATH="[...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10/" PYTHONNOUSERSITE=1 SETUPTOOLS_USE_DISTUTILS=stdlib _python_sysroot=[...]output/host/aarch64-buildroot-linux-gnu/sysroot _python_prefix=/usr _python_exec_prefix=/usr  [...]output/host/bin/python setup.py build  )
[...]output/build/python-awscrt-0.16.10/setup.py:5: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  import distutils.ccompiler
running build
running build_py
running build_ext
> /usr/bin/cmake -H[...]output/build/python-awscrt-0.16.10/crt -Bbuild/temp.linux-aarch64-3.10/deps -DCMAKE_INSTALL_PREFIX=build/temp.linux-aarch64-3.10/deps/install -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=arm
-- Checking for module 'libunwind-generic'
--   Package 'libunwind-generic', required by 'virtual:world', not found
libunwind not found. Disabling unwind tests.
-- 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 '-O2 -g -DNDEBUG'.
CMake Warning at aws-lc/CMakeLists.txt:240 (message):
  Currently, GCC 10.3.0 is not supported due to a memcmp related bug reported
  in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189.

  We strongly recommend against using the GCC 10.3.0 compiler.


-- Test stdalign_check.c passed, enabling AWS_LC_STDALIGN_AVAILABLE
-- Test builtin_swap_check.c passed, enabling AWS_LC_BUILTIN_SWAP_SUPPORTED
Copying platform assembly files from [...]output/build/python-awscrt-0.16.10/crt/aws-lc/generated-src/linux-x86_64/crypto/ to [...]output/build/python-awscrt-0.16.10/build/temp.linux-aarch64-3.10/deps/aws-lc/crypto
-- Detected CMAKE_SYSTEM_PROCESSOR as x86_64
-- Detected 64-Bit system
-- madvise() support detected
-- clone() support detected
-- S2N found target: crypto
-- CMAKE_AR found: /usr/bin/ar
-- CMake 3.16.3
-- Packaging currently only supported on Fedora.
-- Using libcrypto from AWS-LC
-- Configuring done
-- Generating done
-- Build files have been written to: [...]output/build/python-awscrt-0.16.10/build/temp.linux-aarch64-3.10/deps
> /usr/bin/cmake --build build/temp.linux-aarch64-3.10/deps --config RelWithDebInfo --target install
[  0%] Built target global_target
[  8%] Built target aws-c-common
[  8%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_add_p384.S.S.o
[  8%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_sub_p384.S.S.o
[  8%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_tomont_p384.S.S.o
[  9%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_deamont_p384.S.S.o
[  9%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_neg_p384.S.S.o
[  9%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_montsqr_p384.S.S.o
[  9%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_nonzero_6.S.S.o
[ 10%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_littleendian_6.S.S.o
[ 10%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_montmul_p384.S.S.o
[ 10%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_montsqr_p384_alt.S.S.o
[ 10%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_montmul_p384_alt.S.S.o
[ 10%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p521/bignum_add_p521.S.S.o
[ 11%] Built target aws-c-compression
[ 12%] Built target aws-checksums
[ 13%] Built target aws-c-sdkutils
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p384/bignum_sub_p384.S: Assembler messages:
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p384/bignum_sub_p384.S:67: Error: unknown mnemonic `movq' -- `movq (%rsi),%rax'
.
.
.
make[4]: *** [aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/build.make:337: aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_littleendian_6.S.S.o] Error 1
make[4]: *** [aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/build.make:312: aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p384/bignum_montmul_p384.S.S.o] Error 1
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S: Assembler messages:
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:66: Error: unknown mnemonic `pushq' -- `pushq %rbx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:67: Error: unknown mnemonic `pushq' -- `pushq %r12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:72: Error: unknown mnemonic `stc' -- `stc'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:73: Error: unknown mnemonic `movq' -- `movq (%rsi),%rax'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:74: Error: unknown mnemonic `adcq' -- `adcq (%rdx),%rax'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:75: Error: unknown mnemonic `movq' -- `movq 8(%rsi),%rcx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:76: Error: unknown mnemonic `adcq' -- `adcq 8(%rdx),%rcx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:77: Error: unknown mnemonic `movq' -- `movq 16(%rsi),%r8'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:78: Error: unknown mnemonic `adcq' -- `adcq 16(%rdx),%r8'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:79: Error: unknown mnemonic `movq' -- `movq 24(%rsi),%r9'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:80: Error: unknown mnemonic `adcq' -- `adcq 24(%rdx),%r9'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:81: Error: unknown mnemonic `movq' -- `movq 32(%rsi),%r10'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:82: Error: unknown mnemonic `adcq' -- `adcq 32(%rdx),%r10'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:83: Error: unknown mnemonic `movq' -- `movq 40(%rsi),%r11'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:84: Error: unknown mnemonic `adcq' -- `adcq 40(%rdx),%r11'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:85: Error: unknown mnemonic `movq' -- `movq 48(%rsi),%r12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:86: Error: unknown mnemonic `adcq' -- `adcq 48(%rdx),%r12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:87: Error: unknown mnemonic `movq' -- `movq 56(%rsi),%rbx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:88: Error: unknown mnemonic `adcq' -- `adcq 56(%rdx),%rbx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:89: Error: unknown mnemonic `movq' -- `movq 64(%rsi),%rsi'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:90: Error: unknown mnemonic `adcq' -- `adcq 64(%rdx),%rsi'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:95: Error: unknown mnemonic `movq' -- `movq $512,%rdx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:96: Error: unknown mnemonic `andq' -- `andq %rsi,%rdx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:103: Error: unknown mnemonic `cmpq' -- `cmpq $512,%rdx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:105: Error: unknown mnemonic `sbbq' -- `sbbq $0,%rax'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:106: Error: unknown mnemonic `movq' -- `movq %rax,(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:107: Error: unknown mnemonic `sbbq' -- `sbbq $0,%rcx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:108: Error: unknown mnemonic `movq' -- `movq %rcx,8(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:109: Error: unknown mnemonic `sbbq' -- `sbbq $0,%r8'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:110: Error: unknown mnemonic `movq' -- `movq %r8,16(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:111: Error: unknown mnemonic `sbbq' -- `sbbq $0,%r9'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:112: Error: unknown mnemonic `movq' -- `movq %r9,24(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:113: Error: unknown mnemonic `sbbq' -- `sbbq $0,%r10'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:114: Error: unknown mnemonic `movq' -- `movq %r10,32(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:115: Error: unknown mnemonic `sbbq' -- `sbbq $0,%r11'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:116: Error: unknown mnemonic `movq' -- `movq %r11,40(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:117: Error: unknown mnemonic `sbbq' -- `sbbq $0,%r12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:118: Error: unknown mnemonic `movq' -- `movq %r12,48(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:119: Error: unknown mnemonic `sbbq' -- `sbbq $0,%rbx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:120: Error: unknown mnemonic `movq' -- `movq %rbx,56(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:121: Error: unknown mnemonic `sbbq' -- `sbbq %rdx,%rsi'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:122: Error: unknown mnemonic `movq' -- `movq %rsi,64(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:126: Error: unknown mnemonic `popq' -- `popq %r12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_add_p521.S:127: Error: unknown mnemonic `popq' -- `popq %rbx'
[ 13%] Building ASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p521/bignum_sub_p521.S.S.o
make[4]: *** [aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/build.make:342: aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p521/bignum_add_p521.S.S.o] Error 1
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S: Assembler messages:
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:65: Error: unknown mnemonic `pushq' -- `pushq %rbx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:66: Error: unknown mnemonic `pushq' -- `pushq %r12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:70: Error: unknown mnemonic `movq' -- `movq (%rsi),%rax'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:71: Error: unknown mnemonic `subq' -- `subq (%rdx),%rax'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:72: Error: unknown mnemonic `movq' -- `movq 8(%rsi),%rcx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:73: Error: unknown mnemonic `sbbq' -- `sbbq 8(%rdx),%rcx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:74: Error: unknown mnemonic `movq' -- `movq 16(%rsi),%r8'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:75: Error: unknown mnemonic `sbbq' -- `sbbq 16(%rdx),%r8'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:76: Error: unknown mnemonic `movq' -- `movq 24(%rsi),%r9'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:77: Error: unknown mnemonic `sbbq' -- `sbbq 24(%rdx),%r9'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:78: Error: unknown mnemonic `movq' -- `movq 32(%rsi),%r10'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:79: Error: unknown mnemonic `sbbq' -- `sbbq 32(%rdx),%r10'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:80: Error: unknown mnemonic `movq' -- `movq 40(%rsi),%r11'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:81: Error: unknown mnemonic `sbbq' -- `sbbq 40(%rdx),%r11'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:82: Error: unknown mnemonic `movq' -- `movq 48(%rsi),%r12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:83: Error: unknown mnemonic `sbbq' -- `sbbq 48(%rdx),%r12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:84: Error: unknown mnemonic `movq' -- `movq 56(%rsi),%rbx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:85: Error: unknown mnemonic `sbbq' -- `sbbq 56(%rdx),%rbx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:86: Error: unknown mnemonic `movq' -- `movq 64(%rsi),%rsi'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:87: Error: unknown mnemonic `sbbq' -- `sbbq 64(%rdx),%rsi'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:94: Error: unknown mnemonic `sbbq' -- `sbbq $0,%rax'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:95: Error: unknown mnemonic `movq' -- `movq %rax,(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:96: Error: unknown mnemonic `sbbq' -- `sbbq $0,%rcx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:97: Error: unknown mnemonic `movq' -- `movq %rcx,8(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:98: Error: unknown mnemonic `sbbq' -- `sbbq $0,%r8'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:99: Error: unknown mnemonic `movq' -- `movq %r8,16(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:100: Error: unknown mnemonic `sbbq' -- `sbbq $0,%r9'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:101: Error: unknown mnemonic `movq' -- `movq %r9,24(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:102: Error: unknown mnemonic `sbbq' -- `sbbq $0,%r10'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:103: Error: unknown mnemonic `movq' -- `movq %r10,32(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:104: Error: unknown mnemonic `sbbq' -- `sbbq $0,%r11'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:105: Error: unknown mnemonic `movq' -- `movq %r11,40(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:106: Error: unknown mnemonic `sbbq' -- `sbbq $0,%r12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:107: Error: unknown mnemonic `movq' -- `movq %r12,48(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:108: Error: unknown mnemonic `sbbq' -- `sbbq $0,%rbx'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:109: Error: unknown mnemonic `movq' -- `movq %rbx,56(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:110: Error: unknown mnemonic `sbbq' -- `sbbq $0,%rsi'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:111: Error: unknown mnemonic `andq' -- `andq $0x1FF,%rsi'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:112: Error: unknown mnemonic `movq' -- `movq %rsi,64(%rdi)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:116: Error: unknown mnemonic `popq' -- `popq %r12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/third_party/s2n-bignum/x86_att/p521/bignum_sub_p521.S:117: Error: unknown mnemonic `popq' -- `popq %rbx'
make[4]: *** [aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/build.make:347: aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p521/bignum_sub_p521.S.S.o] Error 1
make[3]: *** [CMakeFiles/Makefile2:1296: aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/all] Error 2
make[3]: *** Waiting for unfinished jobs....
[ 13%] Building ASM object aws-lc/crypto/CMakeFiles/crypto_objects.dir/hrss/asm/poly_rq_mul.S.o
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S: Assembler messages:
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:304: Error: unknown pseudo-op: `.att_syntax'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:307: Error: unknown mnemonic `push' -- `push %rbp'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:309: Error: bad register expression
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:310: Error: unknown mnemonic `movq' -- `movq %rsp,%rbp'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:311: Error: bad register expression
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:312: Error: unknown mnemonic `push' -- `push %r12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:313: Error: bad register expression
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:321: Error: operand 1 must be an integer register -- `mov %rcx,%r8'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:322: Error: unknown mnemonic `addq' -- `addq $6144+12288+512+9408+32,%r8'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:323: Error: operand 1 must be an integer register -- `mov %r8,%rax'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:324: Error: unknown mnemonic `subq' -- `subq $6144,%r8'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:325: Error: operand 1 must be an integer register -- `mov %r8,%r11'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:326: Error: unknown mnemonic `subq' -- `subq $12288,%r8'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:327: Error: operand 1 must be an integer register -- `mov %r8,%r12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:328: Error: unknown mnemonic `subq' -- `subq $512,%r8'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:329: Error: unknown mnemonic `vmovdqa' -- `vmovdqa const3(%rip),%ymm3'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:330: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 0(%rsi),%ymm0'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:331: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 88(%rsi),%ymm1'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:332: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 176(%rsi),%ymm2'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:333: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 264(%rsi),%ymm12'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:334: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 1056(%rsi),%ymm4'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:335: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 1144(%rsi),%ymm5'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:336: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 1232(%rsi),%ymm6'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:337: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 1320(%rsi),%ymm7'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:338: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 352(%rsi),%ymm8'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:339: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 440(%rsi),%ymm9'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:340: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 528(%rsi),%ymm10'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:341: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 616(%rsi),%ymm11'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:342: Error: unknown mnemonic `vmovdqa' -- `vmovdqa %ymm0,0(%rax)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:343: Error: unknown mnemonic `vmovdqa' -- `vmovdqa %ymm1,96(%rax)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:344: Error: unknown mnemonic `vpaddw' -- `vpaddw %ymm0,%ymm1,%ymm14'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:345: Error: unknown mnemonic `vmovdqa' -- `vmovdqa %ymm14,192(%rax)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:346: Error: unknown mnemonic `vmovdqa' -- `vmovdqa %ymm2,288(%rax)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:347: Error: unknown mnemonic `vmovdqa' -- `vmovdqa %ymm12,384(%rax)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:348: Error: unknown mnemonic `vpaddw' -- `vpaddw %ymm2,%ymm12,%ymm14'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:349: Error: unknown mnemonic `vmovdqa' -- `vmovdqa %ymm14,480(%rax)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:350: Error: unknown mnemonic `vpaddw' -- `vpaddw %ymm0,%ymm2,%ymm14'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:351: Error: unknown mnemonic `vmovdqa' -- `vmovdqa %ymm14,576(%rax)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:352: Error: unknown mnemonic `vpaddw' -- `vpaddw %ymm1,%ymm12,%ymm15'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:353: Error: unknown mnemonic `vmovdqa' -- `vmovdqa %ymm15,672(%rax)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:354: Error: unknown mnemonic `vpaddw' -- `vpaddw %ymm14,%ymm15,%ymm14'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:355: Error: unknown mnemonic `vmovdqa' -- `vmovdqa %ymm14,768(%rax)'
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:356: Error: unknown mnemonic `vmovdqa' -- `vmovdqa %ymm4,5184(%rax)'
.
.
.
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:8483: Error: bad register expression
[...]output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:8484: Error: bad register expression
make[4]: *** [aws-lc/crypto/CMakeFiles/crypto_objects.dir/build.make:3083: aws-lc/crypto/CMakeFiles/crypto_objects.dir/hrss/asm/poly_rq_mul.S.o] Error 1
make[3]: *** [CMakeFiles/Makefile2:1269: aws-lc/crypto/CMakeFiles/crypto_objects.dir/all] Error 2
make[2]: *** [Makefile:141: all] Error 2
Traceback (most recent call last):
  File "[...]output/build/python-awscrt-0.16.10/setup.py", line 348, in <module>
    setuptools.setup(
  File "[...]output/host/lib/python3.10/site-packages/setuptools/__init__.py", line 155, in setup
    return distutils.core.setup(**attrs)
  File "[...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "[...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "[...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "[...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "[...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "[...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "[...]output/build/python-awscrt-0.16.10/setup.py", line 255, in run
    self._build_dependencies(dep_build_dir, dep_install_path)
  File "[...]output/build/python-awscrt-0.16.10/setup.py", line 247, in _build_dependencies
    self._build_dependencies_impl(build_dir, install_path)
  File "[...]output/build/python-awscrt-0.16.10/setup.py", line 204, in _build_dependencies_impl
    run_cmd(build_cmd)
  File "[...]output/build/python-awscrt-0.16.10/setup.py", line 37, in run_cmd
    subprocess.check_call(args)
  File "[...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/cmake', '--build', 'build/temp.linux-aarch64-3.10/deps', '--config', 'RelWithDebInfo', '--target', 'install']' returned non-zero exit status 2.
make[1]: *** [package/pkg-generic.mk:293: [...]output/build/python-awscrt-0.16.10/.stamp_built] Error 1

I have no idea what it is complaining about. Can anyone please let me know how to reslove this?

Thanks in advance

@Sourabh-ALTEN
Copy link
Author

Update:

I think I managed to resolve the issue. I used the cmake provided by Buildroot instead of host cmake. And this somehow resolved it. At least build is successful.

@Sourabh-ALTEN
Copy link
Author

Update 2:

I did a make clean and trying to do make again to build the image. But, I am getting the same errors as before. Nothing has changed in the configurations (using cmake provided by Buildroot).

>>> python-awscrt 0.16.10 Building
(cd [...]output/build/python-awscrt-0.16.10//; _PYTHON_HOST_PLATFORM="linux-aarch64" _PYTHON_PROJECT_BASE="[...]output/build/python3-3.10.8" _PYTHON_SYSCONFIGDATA_NAME="`{ [ -e [...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10//_sysconfigdata__linux_*.py ] && basename [...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10//_sysconfigdata__linux_*.py .py; } || true`" PATH="[...]output/host/bin:[...]output/host/sbin:[...]opt/aarch64-buildroot-linux-gnu_sdk-buildroot/bin:[...]opt/aarch64-buildroot-linux-gnu_sdk-buildroot/sbin:[...]opt/aarch64-buildroot-linux-gnu_sdk-buildroot/bin:[...]opt/aarch64-buildroot-linux-gnu_sdk-buildroot/sbin:[...]opt/aarch64-buildroot-linux-gnu_sdk-buildroot/bin:[...]opt/aarch64-buildroot-linux-gnu_sdk-buildroot/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" PATH="[...]output/host/bin:[...]output/host/sbin:[...]opt/aarch64-buildroot-linux-gnu_sdk-buildroot/bin:[...]opt/aarch64-buildroot-linux-gnu_sdk-buildroot/sbin:[...]opt/aarch64-buildroot-linux-gnu_sdk-buildroot/bin:[...]opt/aarch64-buildroot-linux-gnu_sdk-buildroot/sbin:[...]opt/aarch64-buildroot-linux-gnu_sdk-buildroot/bin:[...]opt/aarch64-buildroot-linux-gnu_sdk-buildroot/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" AR="[...]output/host/bin/aarch64-linux-gcc-ar" AS="[...]output/host/bin/aarch64-linux-as" LD="[...]output/host/bin/aarch64-linux-ld" NM="[...]output/host/bin/aarch64-linux-gcc-nm" CC="[...]output/host/bin/aarch64-linux-gcc" GCC="[...]output/host/bin/aarch64-linux-gcc" CPP="[...]output/host/bin/aarch64-linux-cpp" CXX="[...]output/host/bin/aarch64-linux-g++" FC="[...]output/host/bin/aarch64-linux-gfortran" F77="[...]output/host/bin/aarch64-linux-gfortran" RANLIB="[...]output/host/bin/aarch64-linux-gcc-ranlib" READELF="[...]output/host/bin/aarch64-linux-readelf" STRIP="[...]output/host/bin/aarch64-linux-strip" OBJCOPY="[...]output/host/bin/aarch64-linux-objcopy" OBJDUMP="[...]output/host/bin/aarch64-linux-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/bin/gcc" CXX_FOR_BUILD="/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I[...]output/host/include" CFLAGS_FOR_BUILD="-O2 -I[...]output/host/include" CXXFLAGS_FOR_BUILD="-O2 -I[...]output/host/include" LDFLAGS_FOR_BUILD="-L[...]output/host/lib -Wl,-rpath,[...]output/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="[...]output/host/bin/aarch64-linux-as" DEFAULT_LINKER="[...]output/host/bin/aarch64-linux-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=1" CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=1" LDFLAGS="" FCFLAGS=" -Os -g0" FFLAGS=" -Os -g0" PKG_CONFIG="[...]output/host/bin/pkg-config" STAGING_DIR="[...]output/host/aarch64-buildroot-linux-gnu/sysroot" INTLTOOL_PERL=/usr/bin/perl PYTHONPATH="[...]output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/python3.10/" PYTHONNOUSERSITE=1 SETUPTOOLS_USE_DISTUTILS=stdlib _python_sysroot=[...]output/host/aarch64-buildroot-linux-gnu/sysroot _python_prefix=/usr _python_exec_prefix=/usr  [...]output/host/bin/python setup.py build  )
[...]output/build/python-awscrt-0.16.10/setup.py:5: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  import distutils.ccompiler
running build
running build_py
running build_ext
> [...]output/host/bin/cmake -H[...]output/build/python-awscrt-0.16.10/crt -Bbuild/temp.linux-aarch64-3.10/deps -DCMAKE_INSTALL_PREFIX=build/temp.linux-aarch64-3.10/deps/install -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=arm
-- 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 '-O2 -g -DNDEBUG'.
CMake Warning at aws-lc/CMakeLists.txt:240 (message):
  Currently, GCC 10.3.0 is not supported due to a memcmp related bug reported
  in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189.

  We strongly recommend against using the GCC 10.3.0 compiler.


-- Test stdalign_check.c passed, enabling AWS_LC_STDALIGN_AVAILABLE
-- Test builtin_swap_check.c passed, enabling AWS_LC_BUILTIN_SWAP_SUPPORTED
Copying platform assembly files from [...]output/build/python-awscrt-0.16.10/crt/aws-lc/generated-src/linux-x86_64/crypto/ to [...]output/build/python-awscrt-0.16.10/build/temp.linux-aarch64-3.10/deps/aws-lc/crypto
-- Detected CMAKE_SYSTEM_PROCESSOR as x86_64
-- Detected 64-Bit system
-- madvise() support detected
-- clone() support detected
-- S2N found target: crypto
-- CMAKE_AR found: /usr/bin/ar
-- CMake 3.16.9
-- Packaging currently only supported on Fedora.
-- Using libcrypto from AWS-LC
-- Configuring done

I am also using this

cmake_args.extend([
            f'-DCMAKE_SYSTEM_NAME=Linux',
            f'-DCMAKE_SYSTEM_PROCESSOR=arm'
        ])

in setup.py

What's not clear is -- Detected CMAKE_SYSTEM_PROCESSOR as x86_64. I expected this to be arm as we have set it in setup.py. I don't know why this is being overwritten during make

@Sourabh-ALTEN Sourabh-ALTEN reopened this Feb 13, 2023
@andrewhop
Copy link
Contributor

Can you link to your setup.py? Are you sure it's passing the expected arguments to CMake when configuring AWS-LC?

A few other things you could try:

  1. Set CMAKE_C_COMPILER_TARGET and CMAKE_CXX_COMPILER
  2. Set CMAKE_SYSTEM_PROCESSOR in a toolchain file, the issue might be CMake is ignoring the command line arguments:

When cross-compiling, a CMAKE_TOOLCHAIN_FILE should set the CMAKE_SYSTEM_PROCESSOR variable to match target architecture that it specifies (via CMAKE__COMPILER and perhaps CMAKE__COMPILER_TARGET).

@skmcgrail skmcgrail added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Mar 6, 2023
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

This issue has not received a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Mar 6, 2023
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants