ITADN

Cross-compiling breaks with ncurses-5.101.0?

#207Open097115 创建于 2021-12-06
0
097115commented
I'm trying to build a project with GitLab's CI using docker image `katharostech/rust-osxcross`. It works nice for native build, however with `--target=x86_64-apple-darwin` it breaks like the following: cargo build --target=x86_64-apple-darwin Compiling itoa v0.4.8 Compiling ryu v1.0.6 Compiling serde v1.0.130 Compiling libc v0.2.109 Compiling serde_json v1.0.72 Compiling ncurses v5.101.0 error: failed to run custom build command for `ncurses v5.101.0` Caused by: process didn't exit successfully: `/builds/me/myproject/target/debug/build/ncurses-21d2ecc62be4b2b5/build-script-build` (exit code: 101) --- stdout cargo:rerun-if-env-changed=PKG_CONFIG_PATH cargo:rerun-if-env-changed=NCURSES5_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64-apple-darwin cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64_apple_darwin cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS 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=TARGET_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG 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=TARGET_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=NCURSES_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64-apple-darwin cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64_apple_darwin cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS 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=TARGET_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG 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=TARGET_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR cargo:rustc-link-lib=ncurses OPT_LEVEL = Some("0") TARGET = Some("x86_64-apple-darwin") HOST = Some("x86_64-unknown-linux-gnu") CC_x86_64-apple-darwin = None CC_x86_64_apple_darwin = None TARGET_CC = None CC = None CROSS_COMPILE = None CFLAGS_x86_64-apple-darwin = None CFLAGS_x86_64_apple_darwin = None TARGET_CFLAGS = None CFLAGS = None CRATE_CC_NO_DEFAULTS = None DEBUG = Some("true") CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2,sse3,ssse3") --- stderr cc: error: x86_64: No such file or directory cc: error: unrecognized command line option '-arch'; did you mean '-march='? thread 'main' panicked at 'assertion failed: command.status().expect("compilation failed").success()', /builds/me/myproject/.cargo/registry/src/github.com-1ecc6299db9ec823/ncurses-5.101.0/build.rs:105:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. And just in case on my local Ubuntu with OSXcross installed, it breaks in the similar manner, too. Would be grateful for any hint or assistance :)
3 条评论