aws / aws-lc-rs

aws-lc-rs is a cryptographic library using AWS-LC for its cryptographic operations. The library strives to be API-compatible with the popular Rust library named ring.
Other
267 stars 48 forks source link

aws-lc-sys failed to build for mipsel #203

Closed secext2022 closed 1 year ago

secext2022 commented 1 year ago

Problem:

aws-lc-sys v0.9.0 failed to build for mipsel.

build command:

export OPENWRT_SDK=/home/s2/openwrt-sdk-22.03.5-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64
export PATH=$OPENWRT_SDK/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin:$PATH
export CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-openwrt-linux-gcc
export CC=mipsel-openwrt-linux-gcc
cargo build --release --target mipsel-unknown-linux-musl

Relevant details

AWS-LC commit: aws-lc-sys v0.9.0

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

Build log:

Caused by: process didn't exit successfully: /home/s2/test/target/release/build/aws-lc-sys-7abcb37ecf1a3586/build-script-main (exit status: 101) --- stdout cargo:rustc-cfg=use_bindgen_generated CMAKE_TOOLCHAIN_FILE_mipsel-unknown-linux-musl = None CMAKE_TOOLCHAIN_FILE_mipsel_unknown_linux_musl = None TARGET_CMAKE_TOOLCHAIN_FILE = None CMAKE_TOOLCHAIN_FILE = None CMAKE_GENERATOR_mipsel-unknown-linux-musl = None CMAKE_GENERATOR_mipsel_unknown_linux_musl = None TARGET_CMAKE_GENERATOR = None CMAKE_GENERATOR = None CMAKE_PREFIX_PATH_mipsel-unknown-linux-musl = None CMAKE_PREFIX_PATH_mipsel_unknown_linux_musl = None TARGET_CMAKE_PREFIX_PATH = None CMAKE_PREFIX_PATH = None CMAKE_mipsel-unknown-linux-musl = None CMAKE_mipsel_unknown_linux_musl = None TARGET_CMAKE = None CMAKE = Some("cmake") running: cd "/home/s2/test/target/mipsel-unknown-linux-musl/release/build/aws-lc-sys-4c2fa93da43d9497/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/home/s2/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/aws-lc-sys-0.9.0" "-DBUILD_SHARED_LIBS=0" "-DCMAKE_BUILD_TYPE=release" "-DBORINGSSL_PREFIX=aws_lc_0_9_0" "-DBORINGSSL_PREFIX_HEADERS=/home/s2/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/aws-lc-sys-0.9.0/generated-include" "-DBUILD_TESTING=OFF" "-DBUILD_LIBSSL=OFF" "-DDISABLE_PERL=ON" "-DDISABLE_GO=ON" "-DCMAKE_SYSTEM_NAME=Linux" "-DCMAKE_SYSTEM_PROCESSOR=mips" "-DCMAKE_INSTALL_PREFIX=/home/s2/test/target/mipsel-unknown-linux-musl/release/build/aws-lc-sys-4c2fa93da43d9497/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC" "-DCMAKE_C_COMPILER=/home/s2/openwrt-sdk-22.03.5-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin/mipsel-openwrt-linux-gcc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC" "-DCMAKE_CXX_COMPILER=mipsel-linux-musl-g++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC" "-DCMAKE_ASM_COMPILER=/home/s2/openwrt-sdk-22.03.5-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin/mipsel-openwrt-linux-gcc" "--no-warn-unused-cli" Not searching for unused variables given on the command line. -- The C compiler identification is GNU 11.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/s2/openwrt-sdk-22.03.5-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin/mipsel-openwrt-linux-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- 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 '-O3 -DNDEBUG'. -- stdalign_check.c probe is positive, enabling AWS_LC_STDALIGN_AVAILABLE -- builtin_swap_check.c probe is positive, enabling AWS_LC_BUILTIN_SWAP_SUPPORTED -- Unknown processor found. Using generic implementations. Processor:mips -- The ASM compiler identification is GNU -- Found assembler: /home/s2/openwrt-sdk-22.03.5-ramips-mt76x8_gcc-11.2.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin/mipsel-openwrt-linux-gcc -- Detected generic linux platform. No assembly files will be included. -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE
-- Configuring done (1.8s) -- Generating done (0.1s) -- Build files have been written to: /home/s2/test/target/mipsel-unknown-linux-musl/release/build/aws-lc-sys-4c2fa93da43d9497/out/build running: cd "/home/s2/test/target/mipsel-unknown-linux-musl/release/build/aws-lc-sys-4c2fa93da43d9497/out/build" && MAKEFLAGS="-j --jobserver-fds=9,10 --jobserver-auth=9,10" "cmake" "--build" "." "--target" "install" "--config" "Release" [ 0%] Built target boringssl_prefix_symbols [ 0%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_bitstr.c.o [ 1%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_bool.c.o [ 2%] Building C object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/bcm.c.o [ 2%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_d2i_fp.c.o [ 3%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_dup.c.o [ 3%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_gentm.c.o [ 3%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_i2d_fp.c.o [ 4%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_int.c.o [ 4%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_mbstr.c.o [ 5%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_object.c.o [ 5%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_octet.c.o [ 5%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_strex.c.o [ 6%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_strnid.c.o [ 6%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_time.c.o [ 7%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_type.c.o [ 7%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_utctm.c.o [ 7%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/a_utf8.c.o [ 8%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/asn1_lib.c.o [ 8%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/asn1_par.c.o [ 9%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/asn_pack.c.o [ 9%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/f_int.c.o [ 10%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/f_string.c.o [ 10%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/tasn_dec.c.o [ 10%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/tasn_enc.c.o [ 11%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/tasn_fre.c.o [ 11%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/tasn_new.c.o [ 12%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/tasn_typ.c.o [ 12%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/tasn_utl.c.o [ 12%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/asn1/posix_time.c.o [ 13%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/base64/base64.c.o [ 13%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bio/bio.c.o [ 14%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bio/bio_mem.c.o [ 14%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bio/connect.c.o [ 14%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bio/fd.c.o [ 15%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bio/file.c.o [ 15%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bio/hexdump.c.o [ 16%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bio/pair.c.o [ 16%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bio/printf.c.o [ 17%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bio/socket.c.o [ 17%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bio/socket_helper.c.o [ 17%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/blake2/blake2.c.o [ 18%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bn_extra/bn_asn1.c.o [ 18%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bn_extra/convert.c.o [ 19%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/buf/buf.c.o [ 19%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bytestring/asn1_compat.c.o [ 19%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bytestring/ber.c.o [ 20%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bytestring/cbb.c.o [ 20%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bytestring/cbs.c.o [ 21%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/bytestring/unicode.c.o [ 21%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/chacha/chacha.c.o [ 21%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/cipher_extra.c.o [ 22%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/derive_key.c.o [ 22%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/e_aesctrhmac.c.o [ 23%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/e_aesgcmsiv.c.o [ 23%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/e_chacha20poly1305.c.o [ 24%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/e_aes_cbc_hmac_sha1.c.o [ 24%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/e_aes_cbc_hmac_sha256.c.o [ 24%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/e_des.c.o [ 25%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/e_null.c.o [ 25%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/e_rc2.c.o [ 26%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/e_rc4.c.o [ 26%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/e_tls.c.o [ 26%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/tls_cbc.c.o [ 27%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/conf/conf.c.o [ 27%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/crypto.c.o [ 28%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/curve25519/curve25519.c.o [ 28%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/curve25519/curve25519_nohw.c.o [ 28%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/curve25519/spake25519.c.o [ 29%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/des/des.c.o [ 29%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/dh_extra/params.c.o [ 30%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/dh_extra/dh_asn1.c.o [ 30%] Building C object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/fips_shared_support.c.o [ 31%] Building C object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/cpucap/cpucap.c.o [ 31%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/digest_extra/digest_extra.c.o [ 32%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/dsa/dsa.c.o [ 32%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/dsa/dsa_asn1.c.o [ 32%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ecdh_extra/ecdh_extra.c.o [ 33%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ecdsa_extra/ecdsa_asn1.c.o [ 33%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ec_extra/ec_asn1.c.o [ 34%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ec_extra/ec_derive.c.o [ 34%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ec_extra/hash_to_curve.c.o [ 34%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/err/err.c.o [ 35%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/err_data.c.o [ 35%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/engine/engine.c.o [ 36%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/evp_asn1.c.o [ 36%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/p_dsa_asn1.c.o [ 36%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/p_ec_asn1.c.o [ 37%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/p_ed25519.c.o [ 37%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/p_ed25519_asn1.c.o [ 38%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/p_kem.c.o [ 38%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/p_kem_asn1.c.o [ 39%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/p_rsa_asn1.c.o [ 39%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/p_x25519.c.o [ 39%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/p_x25519_asn1.c.o [ 40%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/p_methods.c.o [ 40%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/print.c.o [ 41%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/scrypt.c.o [ 41%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/evp_extra/sign.c.o [ 41%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ex_data.c.o [ 42%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/hpke/hpke.c.o [ 42%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/hrss/hrss.c.o [ 43%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/kem/kem.c.o [ 43%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/kem/kem_methods.c.o [ 43%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/kyber/kyber512r3_ref.c.o [ 44%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/kyber/kyber768r3_ref.c.o [ 44%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/kyber/kyber1024r3_ref.c.o [ 45%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/kyber/pqcrystals_kyber_ref_common/fips202.c.o [ 45%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/kyber/kem_kyber.c.o [ 46%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/lhash/lhash.c.o [ 46%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/mem.c.o [ 46%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/obj/obj.c.o [ 47%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/obj/obj_xref.c.o [ 47%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ocsp/ocsp_asn.c.o [ 48%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ocsp/ocsp_client.c.o [ 48%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ocsp/ocsp_extension.c.o [ 48%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ocsp/ocsp_http.c.o [ 49%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ocsp/ocsp_lib.c.o [ 49%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ocsp/ocsp_print.c.o [ 50%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ocsp/ocsp_server.c.o [ 50%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/ocsp/ocsp_verify.c.o [ 50%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/pem/pem_all.c.o [ 51%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/pem/pem_info.c.o [ 51%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/pem/pem_lib.c.o [ 52%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/pem/pem_oth.c.o [ 52%] Building C object aws-lc/crypto/CMakeFiles/crypto_objects.dir/pem/pem_pk8.c.o

--- stderr CMake Deprecation Warning at CMakeLists.txt:6 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at aws-lc/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined mipsel-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined /home/s2/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/aws-lc-sys-0.9.0/aws-lc/crypto/pem/pem_lib.c: In function 'aws_lc_0_9_0_PEM_read_bio': /home/s2/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/aws-lc-sys-0.9.0/aws-lc/crypto/pem/pem_lib.c:705:11: error: 'strncmp' of strings of length 1 and 9 and bound of 9 evaluates to nonzero [-Werror=string-compare] 705 | if (strncmp(buf, "-----END ", 9) == 0) { | ^~~~~~~~ cc1: all warnings being treated as errors make[2]: [aws-lc/crypto/CMakeFiles/crypto_objects.dir/build.make:1742: aws-lc/crypto/CMakeFiles/crypto_objects.dir/pem/pem_lib.c.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:204: aws-lc/crypto/CMakeFiles/crypto_objects.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... In file included from /home/s2/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/aws-lc-sys-0.9.0/aws-lc/crypto/fipsmodule/bcm.c:118: /home/s2/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/aws-lc-sys-0.9.0/aws-lc/crypto/fipsmodule/modes/cfb.c: In function 'aws_lc_0_9_0_CRYPTO_cfb128_encrypt': /home/s2/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/aws-lc-sys-0.9.0/aws-lc/crypto/fipsmodule/modes/cfb.c:120:17: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 120 | ivec[n] = c; | ~~^ /home/s2/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/aws-lc-sys-0.9.0/aws-lc/crypto/fipsmodule/modes/cfb.c:61:56: note: at offset 16 into destination object 'ivec' of size [0, 16] 61 | const AES_KEY key, uint8_t ivec[16], unsigned num, | ~~^~ cc1: all warnings being treated as errors make[2]: [aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/build.make:76: aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/bcm.c.o] Error 1 make[1]: [CMakeFiles/Makefile2:257: aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 thread 'main' panicked at ' command did not execute successfully, got: exit status: 2

build script failed, must exit now', /home/s2/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/cmake-0.1.50/src/lib.rs:1098:5 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

justsmth commented 1 year ago

I was able to get the compilation to succeed using cross:

❯ cross build --features bindgen --target mipsel-unknown-linux-musl
   Compiling proc-macro2 v1.0.56
   Compiling quote v1.0.27
   Compiling syn v2.0.15
   Compiling prettyplease v0.2.4
   Compiling bindgen v0.66.1
   Compiling aws-lc-sys v0.9.0 (/home/justsmth/repos/aws-lc-rs/aws-lc-sys)
    Finished dev [unoptimized + debuginfo] target(s) in 20.14s

However, attempting to run the tests fails with an "illegal instruction".

❯ cross test --features bindgen --target mipsel-unknown-linux-musl
   Compiling aws-lc-sys v0.9.0 (/Users/justsmth/repos/aws-lc-rs/aws-lc-sys)
    Finished test [unoptimized + debuginfo] target(s) in 33.17s
     Running unittests src/lib.rs (/target/mipsel-unknown-linux-musl/debug/deps/aws_lc_sys-f71d150808f9e67a)
...
running 2 tests
test error_checking ... qemu: uncaught target signal 4 (Illegal instruction) - core dumped
error: test failed, to rerun pass `--test sanity-tests`

Caused by:
  process didn't exit successfully: `/qemu-runner mipsel /target/mipsel-unknown-linux-musl/debug/deps/sanity_tests-8ac6987961ccc5ef` (signal: 4, SIGILL: illegal instruction)

We need to look into this further to identify the cause of the failure.

secext2022 commented 1 year ago

Ok, I tested and it build ok with cross. Thank you.

I did not run the test, but the compiled binary (which use this library) can run on the mipsel device. So close this issue now.