Open Wyvern opened 1 month ago
Need more information like what crate you're building and what version of cross + rust you're using.
rustc 1.83.0-nightly (ed04567ba 2024-09-28)
cross v0.2.5
linking failed only on -Zbuild-std
option used.
full error output:
error: linking with `x86_64-unknown-netbsd-gcc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin" VSLANG="1033" "x86_64-unknown-netbsd-gcc" "-Wl,--version-script=/tmp/rustcBXCPRL/list" "-Wl,--no-undefined-version" "-m64" "/tmp/rustcBXCPRL/symbols.o" "/target/x86_64-unknown-netbsd/src/deps/Img-29662ff3a552f03e.Img.fbd75c3e15ec2a83-cgu.0.rcgu.o" "-Wl,--as-needed" "-Wl,-Bstatic" "/target/x86_64-unknown-netbsd/src/deps/libcompiler_builtins-fc34f90c07646ef5.rlib" "-Wl,-Bdynamic" "-lutil" "-lrt" "-lutil" "-lexecinfo" "-lpthread" "-lrt" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lrt" "-lutil" "-lexecinfo" "-B/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld" "-B/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld" "-B/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld" "-fuse-ld=lld" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-o" "/target/x86_64-unknown-netbsd/src/deps/Img-29662ff3a552f03e" "-Wl,--no-gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,--strip-all" "-Wl,--enable-new-dtags" "-Wl,-z,origin" "-fno-ident" "-fno-rtti" "-fno-exceptions" "-fno-backtrace" "-fomit-frame-pointer" "-fno-unwind-tables" "-fno-asynchronous-unwind-tables" "-fPIC" "-fPIE"
= note: rust-lld: error: unknown argument '-dc'
rust-lld: error: unknown argument '-dp'
collect2: error: ld returned 1 exit status
can you try using cross from the main branch or change the image to the :main
image.
cargo install cross --git https://github.com/cross-rs/cross
or
#Cross.toml
[target.x86_64-unknown-netbsd]
image = "ghcr.io/cross-rs/x86_64-unknown-netbsd:main"
try using cross from the main branch
cargo install cross --git https://github.com/cross-rs/cross --branch main
?
also tried main image in Cross.toml like below:
[target.x86_64-unknown-netbsd]
image = "ghcr.io/cross-rs/x86_64-unknown-netbsd:main"
[target.x86_64-unknown-freebsd]
image = "ghcr.io/cross-rs/x86_64-unknown-freebsd:main"
nothing change, still got the same linking error.
As below:
And advice or how fix it?