libffi-rs icon indicating copy to clipboard operation
libffi-rs copied to clipboard

Kernel windows not known to work with OS gnu

Open RickSKy opened this issue 2 years ago • 1 comments

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"

and in env TARGET_CC=x86_64-w64-mingw32-gcc TARGET_AR=x86_64-w64-mingw32-ar

RickSKy avatar Nov 17 '23 10:11 RickSKy

what i do is just cross compile rustpython (https://github.com/RustPython/RustPython)

RickSKy avatar Nov 17 '23 11:11 RickSKy