cross-rs / cross

“Zero setup” cross compilation and “cross testing” of Rust crates
Apache License 2.0
6.27k stars 357 forks source link

Fix zig image #1425

Closed Emilgardis closed 5 months ago

Emilgardis commented 5 months ago

zig - ❌

     Running `/target/debug/build/hellopp-4198e14c1842cfb5/build-script-build`
The following warnings were emitted during compilation:

warning: hellopp@0.1.0: error: unsupported linker arg: -melf_i386

error: failed to run custom build command for `hellopp v0.1.0 (/tmp/tmp.JaHyf9r5NC)`

Caused by:
  process didn't exit successfully: `/target/debug/build/hellopp-4198e14c1842cfb5/build-script-build` (exit status: 1)
  --- stdout
  TARGET = Some("i586-unknown-linux-musl")
  OPT_LEVEL = Some("0")
  HOST = Some("x86_64-unknown-linux-gnu")
  CXX_i586-unknown-linux-musl = None
  CXX_i586_unknown_linux_musl = Some("/target/.zig-cache/cargo-zigbuild/0.17.3/zigcxx-i586-unknown-linux-musl.sh")
  CXXFLAGS_i586-unknown-linux-musl = None
  CXXFLAGS_i586_unknown_linux_musl = None
  TARGET_CXXFLAGS = None
  CXXFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = None
  running: "/target/.zig-cache/cargo-zigbuild/0.17.3/zigcxx-i586-unknown-linux-musl.sh" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m32" "-march=pentium" "-Wl,-melf_i386" "-Wall" "-Wextra" "-o" "/target/i586-unknown-linux-musl/debug/build/hellopp-d2cec04140b3245e/out/hellopp.o" "-c" "hellopp.cc"
  cargo:warning=error: unsupported linker arg: -melf_i386
  exit status: 1

  --- stderr

  error occurred: Command "/target/.zig-cache/cargo-zigbuild/0.17.3/zigcxx-i586-unknown-linux-musl.sh" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m32" "-march=pentium" "-Wl,-melf_i386" "-Wall" "-Wextra" "-o" "/target/i586-unknown-linux-musl/debug/build/hellopp-d2cec04140b3245e/out/hellopp.o" "-c" "hellopp.cc" with args "zigcxx-i586-unknown-linux-musl.sh" did not execute successfully (status code exit status: 1).

this error is https://github.com/rust-cross/cargo-zigbuild/issues/96

I'm not sure if this is our fault or zigbuild