Problem:
When cross-compiling aws-lc-sys for aarch64-unknown-linux-gnu target, the build fails with an error indicating that __ARM_ARCH is not defined during ARM assembly file compilation. The error occurs in aws-lc/include/openssl/asm_base.h:77 when compiling ARM assembly files (e.g., arm/aes/aes-xts-dec.S). This issue has been confirmed in both v0.36.0 and v0.37.0 (latest as of Jan 23, 2026).
Error Message:
error: #error "ARM assembler must define __ARM_ARCH"
#error "ARM assembler must define __ARM_ARCH"
^
Reproduction Steps:
- Set up cross-compilation environment for
aarch64-unknown-linux-gnu (e.g., using maturin-action with manylinux Docker containers)
- Build a Rust project that depends on
aws-lc-sys = "0.37.0" (or 0.36.0)
- The build fails during ARM assembly compilation phase with the
__ARM_ARCH error
Environment:
- Build tool:
maturin-action (using manylinux Docker containers)
- CI/CD: GitHub Actions
- Docker platform:
linux/arm64 (for aarch64 target)
Relevant details
AWS-LC for Rust versions or commit: aws-lc-sys = "0.36.0" (tested, has the issue), aws-lc-sys = "0.37.0" (latest as of Jan 23, 2026, tested and confirmed same issue), aws-lc-rs = "1.15.4" (direct dependency)
System information:
- CPU architecture: x86-64 (host), aarch64 (target)
- CPU name: GitHub Actions runner (x86_64 host)
- OS: Ubuntu 22.04 (host), Linux (target - aarch64-unknown-linux-gnu)
Build log:
- The log tells compiler and version.
warning: aws-lc-sys@0.37.0: In file included from /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.37.0/aws-lc/third_party/s2n-bignum/s2n-bignum-to-be-imported/arm/aes/aes-xts-dec.S:4:0:
warning: aws-lc-sys@0.37.0: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.37.0/aws-lc/include/openssl/asm_base.h:77:2: error: #error "ARM assembler must define __ARM_ARCH"
warning: aws-lc-sys@0.37.0: #error "ARM assembler must define __ARM_ARCH"
warning: aws-lc-sys@0.37.0: ^
error: failed to run custom build command for `aws-lc-sys v0.37.0`
Caused by:
process didn't exit successfully: `/home/runner/work/aerospike-client-python-async/aerospike-client-python-async/target/release/build/aws-lc-sys-0b48bad560a68ec3/build-script-main` (exit status: 1)
Cross-compiler information:
- Compiler:
aarch64-unknown-linux-gnu-gcc
- Target:
aarch64-unknown-linux-gnu
- Host:
x86_64-unknown-linux-gnu
- Rust version: 1.90.0
Build Configuration:
We're using the following environment variables to force pre-generated bindings:
AWS_LC_SYS_CMAKE_BUILDER=0
AWS_LC_SYS_EXTERNAL_BINDGEN=0
AWS_LC_SYS_NO_PREGENERATED_SRC=0
What We've Tried:
- Tested aws-lc-sys 0.36.0 - confirmed
__ARM_ARCH issue
- Tested aws-lc-sys 0.37.0 (released Jan 23, 2026 with aws-lc-rs v1.15.4) - same
__ARM_ARCH issue persists
- Set environment variables to force pre-generated bindings (
AWS_LC_SYS_CMAKE_BUILDER=0, AWS_LC_SYS_EXTERNAL_BINDGEN=0, AWS_LC_SYS_NO_PREGENERATED_SRC=0)
- Attempted to use
aws-lc-rs with bindgen feature, but this forced bindgen for all targets (including x86_64 with pre-generated bindings), requiring libclang which isn't available in manylinux Docker containers
AWS_LC_SYS_NO_ASM only works for debug builds, not release builds
Expected Behavior:
The build should succeed for aarch64-unknown-linux-gnu target, as this platform is listed as having pre-generated bindings available according to the platform support documentation.
Actual Behavior:
The build fails during ARM assembly compilation because the cross-compiler (aarch64-unknown-linux-gnu-gcc) doesn't properly define __ARM_ARCH when compiling ARM assembly files (.S files). This occurs during the AWS-LC C library compilation phase, not during Rust binding generation.
Related Issues:
Workaround:
Currently, we've disabled aarch64-unknown-linux-gnu builds in our CI until this issue is resolved. We're only building for x86_64-unknown-linux-gnu and i686-unknown-linux-gnu targets.
Problem:
When cross-compiling
aws-lc-sysforaarch64-unknown-linux-gnutarget, the build fails with an error indicating that__ARM_ARCHis not defined during ARM assembly file compilation. The error occurs inaws-lc/include/openssl/asm_base.h:77when compiling ARM assembly files (e.g.,arm/aes/aes-xts-dec.S). This issue has been confirmed in both v0.36.0 and v0.37.0 (latest as of Jan 23, 2026).Error Message:
Reproduction Steps:
aarch64-unknown-linux-gnu(e.g., usingmaturin-actionwith manylinux Docker containers)aws-lc-sys = "0.37.0"(or0.36.0)__ARM_ARCHerrorEnvironment:
maturin-action(using manylinux Docker containers)linux/arm64(for aarch64 target)Relevant details
AWS-LC for Rust versions or commit:
aws-lc-sys = "0.36.0"(tested, has the issue),aws-lc-sys = "0.37.0"(latest as of Jan 23, 2026, tested and confirmed same issue),aws-lc-rs = "1.15.4"(direct dependency)System information:
Build log:
Cross-compiler information:
aarch64-unknown-linux-gnu-gccaarch64-unknown-linux-gnux86_64-unknown-linux-gnuBuild Configuration:
We're using the following environment variables to force pre-generated bindings:
What We've Tried:
__ARM_ARCHissue__ARM_ARCHissue persistsAWS_LC_SYS_CMAKE_BUILDER=0,AWS_LC_SYS_EXTERNAL_BINDGEN=0,AWS_LC_SYS_NO_PREGENERATED_SRC=0)aws-lc-rswithbindgenfeature, but this forced bindgen for all targets (including x86_64 with pre-generated bindings), requiring libclang which isn't available in manylinux Docker containersAWS_LC_SYS_NO_ASMonly works for debug builds, not release buildsExpected Behavior:
The build should succeed for
aarch64-unknown-linux-gnutarget, as this platform is listed as having pre-generated bindings available according to the platform support documentation.Actual Behavior:
The build fails during ARM assembly compilation because the cross-compiler (
aarch64-unknown-linux-gnu-gcc) doesn't properly define__ARM_ARCHwhen compiling ARM assembly files (.Sfiles). This occurs during the AWS-LC C library compilation phase, not during Rust binding generation.Related Issues:
aarch64_unknown_linux_muslWorkaround:
Currently, we've disabled
aarch64-unknown-linux-gnubuilds in our CI until this issue is resolved. We're only building forx86_64-unknown-linux-gnuandi686-unknown-linux-gnutargets.