Macos openssl-sys build error
error: failed to run custom build command for openssl-sys v0.9.54
Caused by:
process didn't exit successfully: /Volumes/SOFT/redox.old/prefix/x86_64-unknown-redox/rust-freestanding-build/build/x86_64-apple-darwin/stage2-tools/release/build/openssl-sys-cad48e7ea76d719a/build-script-main
(exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
CC_x86_64-apple-darwin = Some("cc")
CFLAGS_x86_64-apple-darwin = Some("-ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64 -stdlib=libc++")
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("cmpxchg16b,fxsr,mmx,sse,sse2,sse3,ssse3")
running "perl" "./Configure" "--prefix=/Volumes/SOFT/redox.old/prefix/x86_64-unknown-redox/rust-freestanding-build/build/x86_64-apple-darwin/stage2-tools/x86_64-apple-darwin/release/build/openssl-sys-4103538815689194/out/openssl-build/install" "no-dso" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-engine" "no-async" "no-shared" "darwin64-x86_64-cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-arch" "x86_64" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-arch" "x86_64" "-stdlib=libc++"
--- stderr
Failure! build file wasn't produced. Please read INSTALL and associated NOTES files. You may also have to look over your available compiler tool chain or change your configuration.
target already defined - darwin64-x86_64-cc (offending arg: x86_64) thread 'main' panicked at '
Error configuring OpenSSL build: Command: "perl" "./Configure" "--prefix=/Volumes/SOFT/redox.old/prefix/x86_64-unknown-redox/rust-freestanding-build/build/x86_64-apple-darwin/stage2-tools/x86_64-apple-darwin/release/build/openssl-sys-4103538815689194/out/openssl-build/install" "no-dso" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-engine" "no-async" "no-shared" "darwin64-x86_64-cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-arch" "x86_64" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-arch" "x86_64" "-stdlib=libc++" Exit status: exit code: 255
', /Home/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/openssl-src-111.9.0+1.1.1g/src/lib.rs:379:13
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:
warning: src/zlib/gzlib.c:214:15: error: implicitly declaring library function 'snprintf' with type 'int (char *, unsigned long, const char *, ...)' [-Werror,-Wimplicit-function-declaration] warning: (void)snprintf(state->path, len + 1, "%s", (const char *)path); warning: ^ warning: src/zlib/gzlib.c:214:15: note: include the header <stdio.h> or explicitly provide a declaration for 'snprintf' warning: 1 error generated.
error: build failed command did not execute successfully: "/Volumes/SOFT/redox.old/prefix/x86_64-unknown-redox/rust-freestanding-build/build/x86_64-apple-darwin/stage0/bin/cargo" "build" "--target" "x86_64-apple-darwin" "-Zbinary-dep-depinfo" "-j" "12" "--release" "--manifest-path" "/Volumes/SOFT/redox.old/rust/src/tools/cargo/Cargo.toml" "--features" "rustc-workspace-hack/all-static" "--message-format" "json-render-diagnostics" expected success, got: exit code: 101 failed to run: /Volumes/SOFT/redox.old/prefix/x86_64-unknown-redox/rust-freestanding-build/build/bootstrap/debug/bootstrap build Build completed unsuccessfully in 0:52:44 make[1]: *** [all] Error 1 make: *** [prefix/x86_64-unknown-redox/rust-freestanding-install] Error 2