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

Parsec 1.1RC2 build fails on Macos #640

Open
anta5010 opened this issue Sep 29, 2022 · 2 comments
Open

Parsec 1.1RC2 build fails on Macos #640

anta5010 opened this issue Sep 29, 2022 · 2 comments

Comments

@anta5010
Copy link
Collaborator

When building Parsec 1.1RC2 with:

bash-3.2$ rustc --version
rustc 1.64.0 (a55dd71d5 2022-09-19)
bash-3.2$ cargo --version
cargo 1.64.0 (387270bc7 2022-09-16)
bash-3.2$ clang --version
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I see this issue

  [ 62%] Building C object library/CMakeFiles/mbedcrypto.dir/psa_crypto_se.c.o

  --- stderr
  /Users/antant01/.cargo/registry/src/github.com-1ecc6299db9ec823/psa-crypto-sys-0.9.3/vendor/library/psa_crypto_cipher.c:267:12: error: parameter 'output_size' set but not used [-Werror,-Wunused-but-set-parameter]
      size_t output_size,
             ^
  1 error generated.
  make[2]: *** [library/CMakeFiles/mbedcrypto.dir/psa_crypto_cipher.c.o] Error 1
  make[2]: *** Waiting for unfinished jobs....
  make[1]: *** [library/CMakeFiles/mbedcrypto.dir/all] Error 2
  make: *** [all] Error 2
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 2

  build script failed, must exit now', /Users/antant01/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.45/src/lib.rs:894:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Related issues:
Mbed-TLS/mbedtls#4935
parallaxsecond/rust-psa-crypto#85

I don't know why we don't see this issue in Parsec CI pipelines.
I can also build 1.1RC2 successfully in Yocto with clang 15.0.2.
Maybe -Werror,-Wunused-but-set-parameter is omitted there.

@anta5010
Copy link
Collaborator Author

The same issue is seen when building Parsec 1.0.0 on Macos.
But, no issues when Parsec 1.1.0RC2 built in an Ubuntu 22.04 container with clang 14.0
So, it looks like Macos only issue

@anta5010
Copy link
Collaborator Author

anta5010 commented Oct 4, 2022

I've got a similar issue when tried to build parsec in Yocto with clang 15.0.2 and musl instead of libgc:

|   running: "cmake" "/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/cargo_home/bitbake/psa-crypto-sys-0.9.3/./vendor" "-DENABLE_PROGRAMS=OFF" "-DENABLE_TESTING=OFF" "-DCMAKE_INSTALL_PREFIX=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/build/target/aarch64-poky-linux-musl/release/build/psa-crypto-sys-473c732ebd60b788/out" "-DCMAKE_C_FLAGS= -I/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/build/target/aarch64-poky-linux-musl/release/build/psa-crypto-sys-473c732ebd60b788/out -DMBEDTLS_CONFIG_FILE=\'<config.h>\' -ffunction-sections -fdata-sections -fPIC -pipe -feliminate-unused-debug-types -fmacro-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/git=/usr/src/debug/parsec-service/1.1.0-r0 -fdebug-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/git=/usr/src/debug/parsec-service/1.1.0-r0 -fmacro-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/build=/usr/src/debug/parsec-service/1.1.0-r0 -fdebug-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/build=/usr/src/debug/parsec-service/1.1.0-r0 -fdebug-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/recipe-sysroot= -fmacro-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/recipe-sysroot= -fdebug-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/recipe-sysroot-native=" "-DCMAKE_C_COMPILER=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/wrapper/target-rust-cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -pipe -feliminate-unused-debug-types -fmacro-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/git=/usr/src/debug/parsec-service/1.1.0-r0 -fdebug-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/git=/usr/src/debug/parsec-service/1.1.0-r0 -fmacro-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/build=/usr/src/debug/parsec-service/1.1.0-r0 -fdebug-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/build=/usr/src/debug/parsec-service/1.1.0-r0 -fdebug-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/recipe-sysroot= -fmacro-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/recipe-sysroot= -fdebug-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/recipe-sysroot-native= -fvisibility-inlines-hidden" "-DCMAKE_CXX_COMPILER=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/wrapper/target-rust-cxx" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -pipe -feliminate-unused-debug-types -fmacro-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/git=/usr/src/debug/parsec-service/1.1.0-r0 -fdebug-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/git=/usr/src/debug/parsec-service/1.1.0-r0 -fmacro-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/build=/usr/src/debug/parsec-service/1.1.0-r0 -fdebug-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/build=/usr/src/debug/parsec-service/1.1.0-r0 -fdebug-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/recipe-sysroot= -fmacro-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/recipe-sysroot= -fdebug-prefix-map=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/recipe-sysroot-native=" "-DCMAKE_ASM_COMPILER=/data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/wrapper/target-rust-cc" "-DCMAKE_BUILD_TYPE=Release"
|   -- The C compiler identification is Clang 15.0.2
|   -- Detecting C compiler ABI info
|   -- Detecting C compiler ABI info - done
|   -- Check for working C compiler: /data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/wrapper/target-rust-cc - skipped
|   -- Detecting C compile features
|   -- Detecting C compile features - done
|   -- Found Python3: /data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/recipe-sysroot-native/usr/bin/python3-native/python3.10 (found version "3.10.6") found components: Interpreter
|   -- Configuring done
|   -- Generating done
|   -- Build files have been written to: /data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/build/target/aarch64-poky-linux-musl/release/build/psa-crypto-sys-473c732ebd60b788/out/build
|   running: "cmake" "--build" "." "--target" "install" "--config" "Release" "--"
|   [  1%] Building C object library/CMakeFiles/mbedcrypto.dir/aes.c.o
|   [  2%] Building C object library/CMakeFiles/mbedcrypto.dir/aesni.c.o
|   [  3%] Building C object library/CMakeFiles/mbedcrypto.dir/aria.c.o
|   [  4%] Building C object library/CMakeFiles/mbedcrypto.dir/asn1parse.c.o
|   [  5%] Building C object library/CMakeFiles/mbedcrypto.dir/asn1write.c.o
|   [  6%] Building C object library/CMakeFiles/mbedcrypto.dir/base64.c.o
|   [  7%] Building C object library/CMakeFiles/mbedcrypto.dir/bignum.c.o
|   [  8%] Building C object library/CMakeFiles/mbedcrypto.dir/camellia.c.o
|   [ 10%] Building C object library/CMakeFiles/mbedcrypto.dir/ccm.c.o
|
|   --- stderr
|   CMake Warning:
|     Manually-specified variables were not used by the project:
|
|       CMAKE_ASM_COMPILER
|       CMAKE_ASM_FLAGS
|       CMAKE_CXX_COMPILER
|       CMAKE_CXX_FLAGS
|
|
|   /data/shared/yocto/poky/build/tmp/work/cortexa57-poky-linux-musl/parsec-service/1.1.0-r0/cargo_home/bitbake/psa-crypto-sys-0.9.3/vendor/library/bignum.c:1650:29: error: variable 't' set but not used [-Werror,-Wunused-but-set-variable]
|       mbedtls_mpi_uint c = 0, t = 0;
|                               ^
|   1 error generated.
|   make[2]: *** [library/CMakeFiles/mbedcrypto.dir/build.make:160: library/CMakeFiles/mbedcrypto.dir/bignum.c.o] Error 1
|   make[2]: *** Waiting for unfinished jobs....
|   make[1]: *** [CMakeFiles/Makefile2:166: library/CMakeFiles/mbedcrypto.dir/all] Error 2
|   make: *** [Makefile:136: all] Error 2
|   thread 'main' panicked at '
|   command did not execute successfully, got: exit status: 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant