Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix MacOS release target and missing npx binary for release
Had MacOS error such as: Compiling group v0.12.1 Compiling hmac v0.12.1 The following warnings were emitted during compilation: warning: [email protected]: clang: error: invalid Darwin version number: macosx13.0 warning: [email protected]: clang: warning: overriding '-mmacosx-version-min=10.7.0' option with '--target=x86_64-apple-macosx13.0' [-Woverriding-t-option] warning: [email protected]: clang: error: invalid version number in '--target=x86_64-apple-macosx13.0' error: failed to run custom build command for `ring v0.17.8` Caused by: process didn't exit successfully: `/target/release/build/ring-5ab6f4fa8a125f61/build-script-build` (exit status: 1) --- stdout cargo:rerun-if-env-changed=RING_PREGENERATE_ASM cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_8_ OPT_LEVEL = Some(3) OUT_DIR = Some(/target/x86_64-apple-darwin/release/build/ring-aa28d4dfd2b794be/out) TARGET = Some(x86_64-apple-darwin) HOST = Some(x86_64-unknown-linux-gnu) cargo:rerun-if-env-changed=CC_x86_64-apple-darwin CC_x86_64-apple-darwin = None cargo:rerun-if-env-changed=CC_x86_64_apple_darwin CC_x86_64_apple_darwin = Some(x86_64-apple-darwin22-clang) cargo:rerun-if-env-changed=CC_KNOWN_WRAPPER_CUSTOM CC_KNOWN_WRAPPER_CUSTOM = None RUSTC_WRAPPER = None cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS CRATE_CC_NO_DEFAULTS = None DEBUG = Some(false) cargo:rerun-if-env-changed=MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET = None cargo:rerun-if-env-changed=CFLAGS_x86_64-apple-darwin CFLAGS_x86_64-apple-darwin = None cargo:rerun-if-env-changed=CFLAGS_x86_64_apple_darwin CFLAGS_x86_64_apple_darwin = Some(-stdlib=libc++ -fuse-ld=x86_64-apple-darwin22-ld) cargo:rerun-if-env-changed=CC_SHELL_ESCAPED_FLAGS CC_SHELL_ESCAPED_FLAGS = None CARGO_ENCODED_RUSTFLAGS = Some() cargo:warning=clang: error: invalid Darwin version number: macosx13.0 cargo:warning=clang: warning: overriding '-mmacosx-version-min=10.7.0' option with '--target=x86_64-apple-macosx13.0' [-Woverriding-t-option] cargo:warning=clang: error: invalid version number in '--target=x86_64-apple-macosx13.0' --- stderr error occurred in cc-rs: Command LC_ALL="C" "x86_64-apple-darwin22-clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "--target=x86_64-apple-macosx13.0" "-I" "include" "-I" "/target/x86_64-apple-darwin/release/build/ring-aa28d4dfd2b794be/out" "-stdlib=libc++" "-fuse-ld=x86_64-apple-darwin22-ld" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-gfull" "-DNDEBUG" "-o" "/target/x86_64-apple-darwin/release/build/ring-aa28d4dfd2b794be/out/172e8fe49fe517e0-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args x86_64-apple-darwin22-clang did not execute successfully (status code exit status: 1). warning: build failed, waiting for other jobs to finish... Adding MACOSX_DEPLOYMENT_TARGET variable solved the issue. Cross-building Mac locally is too flaky and painful, often breaking for whatever reason. Better use something like GitHub Mac runner ?
- Loading branch information