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

Kernel windows not known to work with OS gnu #60

Closed
jafri opened this issue Nov 1, 2022 · 4 comments
Closed

Kernel windows not known to work with OS gnu #60

jafri opened this issue Nov 1, 2022 · 4 comments

Comments

@jafri
Copy link

jafri commented Nov 1, 2022

On M1 Mac, running rust with target x86_64-pc-windows-gnu

process didn't exit successfully: `target/release/build/libffi-sys-7f2a7ab9ea025606/build-script-build` (exit status: 101)
--- stdout
checking build system type... aarch64-apple-darwin21.6.0
checking host system type... 
--- stderr
Invalid configuration `x86_64-pc-windows-gnu': Kernel `windows' not known to work with OS `gnu'.
configure: error: /bin/sh ./config.sub x86_64-pc-windows-gnu failed
thread 'main' panicked at 'Configuring libffi', /.cargo/registry/src/github.com-1ecc6299db9ec823/libffi-sys-2.0.1/build/common.rs:8:5

Backtrace

  stack backtrace:
    0: rust_begin_unwind
              at /rustc/95a3a7277b44bbd2dd3485703d9a05f64652b60e/library/std/src/panicking.rs:575:5
    1: core::panicking::panic_fmt
              at /rustc/95a3a7277b44bbd2dd3485703d9a05f64652b60e/library/core/src/panicking.rs:65:14
    2: core::panicking::panic_display
    3: build_script_build::common::run_command
    4: build_script_build::not_msvc::configure_libffi
    5: build_script_build::not_msvc::build_and_link
    6: build_script_build::main
    7: core::ops::function::FnOnce::call_once
@jafri jafri changed the title Kernel windows' not known to work with OS gnu' Kernel windows not known to work with OS gnu Nov 1, 2022
@yorickpeterse
Copy link
Collaborator

yorickpeterse commented Nov 2, 2022

@jafri Please provide some sort of sample program that reproduces this problem, along with the exact command used to compile it. A backtrace alone isn't enough to debug (cross) compilation problems 😃

@yorickpeterse
Copy link
Collaborator

@jafri This is a friendly reminder to please provide a way to reproduce this issue. Without it there's nothing we can do to help.

@jafri
Copy link
Author

jafri commented Nov 9, 2022

Was not able to reproduce

@jafri jafri closed this as completed Nov 9, 2022
@RickSKy
Copy link

RickSKy commented Nov 17, 2023

I have the same problem in apple M2:

error: failed to run custom build command for `libffi-sys v2.3.0`

Caused by:
  process didn't exit successfully: `/home/ub/target/release/build/libffi-sys-bac7e949b60e9201/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
  CC_x86_64-pc-windows-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
  CC_x86_64_pc_windows_gnu = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = Some("x86_64-w64-mingw32-gcc")
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
  CFLAGS_x86_64-pc-windows-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
  CFLAGS_x86_64_pc_windows_gnu = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  checking build system type... aarch64-unknown-linux-gnu
  checking host system type... 
  --- stderr
  Invalid configuration `x86_64-pc-windows-gnu': Kernel `windows' not known to work with OS `gnu'.
  configure: error: /bin/bash ./config.sub x86_64-pc-windows-gnu failed
  thread 'main' panicked at /home/ub/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-2eab394af869c8a2/libffi-sys-2.3.0/build/common.rs:8:5:
  Configuring libffi
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

in config.toml

[target.x86_64-pc-windows-gnu]
linker = "x86_64-w64-mingw32-gcc"
ar = "x86_64-w64-mingw32-ar"

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