Skip to content

Fails to build tests #109

@mouse07410

Description

@mouse07410
$ cargo test --release
.  .  .
   Compiling dhkem v0.0.1-alpha (/Users/ur20980/src/KEMs/dhkem)
   Compiling x-wing v0.0.1-pre.1 (/Users/ur20980/src/KEMs/x-wing)
error: failed to run custom build command for `safe-oqs-sys v0.10.0+liboqs-0.10.1`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/Users/ur20980/src/KEMs/target/release/build/safe-oqs-sys-064c12fb89c13c36/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBOQS_NO_VENDOR
  cargo:rerun-if-env-changed=LIBOQS_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=LIBOQS_STATIC
  cargo:rerun-if-env-changed=LIBOQS_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  CMAKE_TOOLCHAIN_FILE_x86_64-apple-darwin = None
  CMAKE_TOOLCHAIN_FILE_x86_64_apple_darwin = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-apple-darwin = None
  CMAKE_GENERATOR_x86_64_apple_darwin = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-apple-darwin = None
  CMAKE_PREFIX_PATH_x86_64_apple_darwin = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-apple-darwin = None
  CMAKE_x86_64_apple_darwin = None
  HOST_CMAKE = None
  CMAKE = None
  running: cd "/Users/ur20980/src/KEMs/target/release/build/safe-oqs-sys-058f212ba6024498/out/build" && CMAKE_PREFIX_PATH="" LC_ALL="C" "cmake" "/Users/ur20980/.cargo/registry/src/index.crates.io-6f17d22bba15001f/safe-oqs-sys-0.10.0+liboqs-0.10.1/liboqs" "-DCMAKE_OSX_ARCHITECTURES=x86_64" "-DOQS_BUILD_ONLY_LIB=Yes" "-DOQS_DIST_BUILD=Yes" "-DOQS_ENABLE_KEM_BIKE=No" "-DOQS_ENABLE_KEM_CLASSIC_MCELIECE=No" "-DOQS_ENABLE_KEM_FRODOKEM=Yes" "-DOQS_ENABLE_KEM_HQC=No" "-DOQS_ENABLE_KEM_KYBER=No" "-DOQS_ENABLE_KEM_NTRUPRIME=No" "-DOQS_ENABLE_KEM_ML_KEM=No" "-DOQS_ENABLE_SIG_DILITHIUM=No" "-DOQS_ENABLE_SIG_FALCON=No" "-DOQS_ENABLE_SIG_SPHINCS=No" "-DOQS_ENABLE_SIG_ML_DSA=No" "-DOQS_USE_OPENSSL=No" "-DCMAKE_INSTALL_PREFIX=/Users/ur20980/src/KEMs/target/release/build/safe-oqs-sys-058f212ba6024498/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 --target=x86_64-apple-macosx15.2" "-DCMAKE_C_COMPILER=/opt/local/bin/clang" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 --target=x86_64-apple-macosx15.2 -std=gnu++20 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" "-DCMAKE_CXX_COMPILER=/opt/local/bin/clang++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 --target=x86_64-apple-macosx15.2" "-DCMAKE_ASM_COMPILER=/opt/local/bin/clang" "-DCMAKE_BUILD_TYPE=Release"
  -- The C compiler identification is AppleClang 16.0.0.16000026
  -- The ASM compiler identification is AppleClang
  -- Found assembler: /opt/local/bin/clang
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /opt/local/bin/clang - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Performing Test CC_SUPPORTS_WA_NOEXECSTACK
  -- Performing Test CC_SUPPORTS_WA_NOEXECSTACK - Success
  -- Performing Test LD_SUPPORTS_WL_Z_NOEXECSTACK
  -- Performing Test LD_SUPPORTS_WL_Z_NOEXECSTACK - Failed
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
  -- Found Threads: TRUE
  -- Alg enablement unchanged
  -- Looking for getentropy
  -- Looking for getentropy - found
  -- Looking for aligned_alloc
  -- Looking for aligned_alloc - found
  -- Looking for posix_memalign
  -- Looking for posix_memalign - found
  -- Looking for memalign
  -- Looking for memalign - not found
  -- Looking for explicit_bzero
  -- Looking for explicit_bzero - not found
  -- Looking for memset_s
  -- Looking for memset_s - found
  -- Configuring done (68.8s)
  -- Generating done (0.2s)
  -- Build files have been written to: /Users/ur20980/src/KEMs/target/release/build/safe-oqs-sys-058f212ba6024498/out/build
  running: cd "/Users/ur20980/src/KEMs/target/release/build/safe-oqs-sys-058f212ba6024498/out/build" && LC_ALL="C" MAKEFLAGS="-j --jobserver-fds=8,9 --jobserver-auth=8,9" "cmake" "--build" "/Users/ur20980/src/KEMs/target/release/build/safe-oqs-sys-058f212ba6024498/out/build" "--target" "oqs" "--config" "Release"
  [  2%] Building C object src/kem/frodokem/CMakeFiles/frodokem_avx2.dir/external/frodo640aes_avx2.c.o
  [  5%] Building C object src/kem/frodokem/CMakeFiles/frodokem_avx2.dir/external/frodo976aes_avx2.c.o
  [  8%] Building C object src/kem/frodokem/CMakeFiles/frodokem_avx2.dir/external/frodo1344aes_avx2.c.o
  [ 10%] Building C object src/kem/frodokem/CMakeFiles/frodokem_avx2.dir/external/frodo640shake_avx2.c.o
  [ 13%] Building C object src/kem/frodokem/CMakeFiles/frodokem_avx2.dir/external/frodo976shake_avx2.c.o
  [ 16%] Building C object src/kem/frodokem/CMakeFiles/frodokem_avx2.dir/external/frodo1344shake_avx2.c.o
  [ 16%] Built target frodokem_avx2
  [ 18%] Building C object src/common/CMakeFiles/common.dir/aes/aes.c.o
  [ 21%] Building C object src/common/CMakeFiles/common.dir/aes/aes_c.c.o
  [ 24%] Building C object src/common/CMakeFiles/common.dir/aes/aes128_ni.c.o
  [ 27%] Building C object src/common/CMakeFiles/common.dir/aes/aes256_ni.c.o
  [ 29%] Building C object src/common/CMakeFiles/common.dir/sha2/sha2.c.o
  [ 32%] Building C object src/common/CMakeFiles/common.dir/sha2/sha2_c.c.o
  [ 35%] Building C object src/common/CMakeFiles/common.dir/sha3/xkcp_sha3.c.o
  [ 37%] Building C object src/common/CMakeFiles/common.dir/sha3/xkcp_sha3x4.c.o
  [ 40%] Building C object src/common/CMakeFiles/common.dir/common.c.o
  [ 43%] Building C object src/common/CMakeFiles/common.dir/pqclean_shims/fips202.c.o
  [ 45%] Building C object src/common/CMakeFiles/common.dir/pqclean_shims/fips202x4.c.o
  [ 48%] Building C object src/common/CMakeFiles/common.dir/rand/rand.c.o
  [ 48%] Built target common
  [ 51%] Building C object src/common/sha3/xkcp_low/CMakeFiles/xkcp_low_keccakp_1600_plain64.dir/KeccakP-1600/plain-64bits/KeccakP-1600-opt64.c.o
  [ 51%] Built target xkcp_low_keccakp_1600_plain64
  [ 54%] Building C object src/common/sha3/xkcp_low/CMakeFiles/xkcp_low_keccakp_1600times4_serial.dir/KeccakP-1600times4/serial/KeccakP-1600-times4-on1.c.o
  [ 54%] Built target xkcp_low_keccakp_1600times4_serial
  [ 56%] Building ASM object src/common/sha3/xkcp_low/CMakeFiles/xkcp_low_keccakp_1600_avx2.dir/KeccakP-1600/avx2/KeccakP-1600-AVX2.S.o
  [ 56%] Built target xkcp_low_keccakp_1600_avx2
  [ 59%] Building C object src/common/sha3/xkcp_low/CMakeFiles/xkcp_low_keccakp_1600times4_avx2.dir/KeccakP-1600times4/avx2/KeccakP-1600-times4-SIMD256.c.o
  [ 59%] Built target xkcp_low_keccakp_1600times4_avx2
  [ 62%] Building C object src/kem/frodokem/CMakeFiles/frodokem.dir/kem_frodokem640aes.c.o
  [ 64%] Building C object src/kem/frodokem/CMakeFiles/frodokem.dir/external/frodo640aes.c.o
  [ 67%] Building C object src/kem/frodokem/CMakeFiles/frodokem.dir/kem_frodokem640shake.c.o
  [ 70%] Building C object src/kem/frodokem/CMakeFiles/frodokem.dir/external/frodo640shake.c.o
  [ 72%] Building C object src/kem/frodokem/CMakeFiles/frodokem.dir/kem_frodokem976aes.c.o
  [ 75%] Building C object src/kem/frodokem/CMakeFiles/frodokem.dir/external/frodo976aes.c.o
  [ 78%] Building C object src/kem/frodokem/CMakeFiles/frodokem.dir/kem_frodokem976shake.c.o
  [ 81%] Building C object src/kem/frodokem/CMakeFiles/frodokem.dir/external/frodo976shake.c.o
  [ 83%] Building C object src/kem/frodokem/CMakeFiles/frodokem.dir/kem_frodokem1344aes.c.o
  [ 86%] Building C object src/kem/frodokem/CMakeFiles/frodokem.dir/external/frodo1344aes.c.o
  [ 89%] Building C object src/kem/frodokem/CMakeFiles/frodokem.dir/kem_frodokem1344shake.c.o
  [ 91%] Building C object src/kem/frodokem/CMakeFiles/frodokem.dir/external/frodo1344shake.c.o
  [ 91%] Built target frodokem
  [ 94%] Building C object src/CMakeFiles/oqs.dir/kem/kem.c.o
  [ 97%] Building C object src/CMakeFiles/oqs.dir/sig/sig.c.o
  [100%] Linking C static library ../lib/liboqs.a
  [100%] Built target oqs
  cargo:root=/Users/ur20980/src/KEMs/target/release/build/safe-oqs-sys-058f212ba6024498/out
  cargo:rustc-link-lib=static=oqs
  cargo:rustc-link-search=native=/Users/ur20980/src/KEMs/target/release/build/safe-oqs-sys-058f212ba6024498/out/build/lib

  --- stderr
  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_CXX_COMPILER
      CMAKE_CXX_FLAGS


  gmake: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  /Users/ur20980/src/KEMs/target/release/build/safe-oqs-sys-058f212ba6024498/out/build/include/oqs/common.h:14:10: fatal error: 'stdlib.h' file not found
  thread 'main' panicked at /Users/ur20980/.cargo/registry/src/index.crates.io-6f17d22bba15001f/safe-oqs-sys-0.10.0+liboqs-0.10.1/build.rs:33:10:
  Unable to generate bindings: ClangDiagnostic("/Users/ur20980/src/KEMs/target/release/build/safe-oqs-sys-058f212ba6024498/out/build/include/oqs/common.h:14:10: fatal error: 'stdlib.h' file not found\n")
  stack backtrace:
     0: _rust_begin_unwind
     1: core::panicking::panic_fmt
     2: core::result::unwrap_failed
     3: core::result::Result<T,E>::expect
     4: build_script_build::generate_bindings
     5: build_script_build::main::{{closure}}
     6: build_script_build::main
     7: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
$

Also, I have the current LIBOQS installed - it would be nice if KEMs didn't bother to build its own C copy of liboqs, but used the one I already have tested and installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions