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

Cross-compiling breaks with ncurses-5.101.0? #207

Open
097115 opened this issue Dec 6, 2021 · 3 comments
Open

Cross-compiling breaks with ncurses-5.101.0? #207

097115 opened this issue Dec 6, 2021 · 3 comments

Comments

@097115
Copy link

097115 commented Dec 6, 2021

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 :)

@097115 097115 changed the title Cross-compiling with OSXCross breaks with ncurses-5.101.0? Cross-compiling breaks with ncurses-5.101.0? Dec 6, 2021
@097115
Copy link
Author

097115 commented Dec 6, 2021

It's actually the same if trying to build i686-unknown-linux-gnu target on a x86_64 system. So, it's not really OSXCross-related issue.

But probably I'm just missing something extremely obvious? :)

@yozhgoor
Copy link

yozhgoor commented Mar 7, 2022

Same for me. Logs can be found here.

   c1: fatal error C1083: Cannot open source file: 'D:\a\cursive-example\cursive-example\target\debug\build\ncurses-82fdfbbdf18706a5\out\chtype_size.c': Permission denied

  --- stderr
  cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
  thread 'main' panicked at 'assertion failed: command.status().expect(\"compilation failed\").success()', C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\ncurses-5.101.0\build.rs:105:5

No problem on x86_64-unknown-linux-gnu but both x86_64-windows-mvsc and x86_64-apple-darwin cannot compile ncurses v5.101.0 with a similar output.

I use a similar CI configuration on another project without problem since today.

@correabuscar
Copy link
Contributor

@yozhgoor that's #127 ie. it doesn't support Windows

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

3 participants