Open Wyvern opened 1 month ago
It's not possible to help you with the information you've given. Need more information.
rustc 1.83.0-nightly (ed04567ba 2024-09-28)
linking failed only on -Zbuild-std
, build without it succeeded.
This is the full error output:
error: linking with `x86_64-unknown-freebsd13-gcc.sh` 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-freebsd13-gcc.sh" "-Wl,--version-script=/tmp/rustcxcoybW/list" "-Wl,--no-undefined-version" "-m64" "/tmp/rustcxcoybW/symbols.o" "/target/x86_64-unknown-freebsd/src/deps/Img-ad24612e0952e6f0.Img.3e18e81114b9f627-cgu.0.rcgu.o" "-Wl,--as-needed" "-Wl,-Bstatic" "/target/x86_64-unknown-freebsd/src/deps/libcompiler_builtins-5fa8f84ee86bdccf.rlib" "-Wl,-Bdynamic" "-lrt" "-lutil" "-lexecinfo" "-lkvm" "-lmemstat" "-lkvm" "-lutil" "-lprocstat" "-lrt" "-ldevstat" "-lexecinfo" "-
= note: + set -euo pipefail
+ main -Wl,--version-script=/tmp/rustcxcoybW/list -Wl,--no-undefined-version -m64 /tmp/rustcxcoybW/symbols.o /target/x86_64-unknown-freebsd/src/deps/Img-ad24612e0952e6f0.Img.3e18e81114b9f627-cgu.0.rcgu.o -Wl,--as-needed -Wl,-Bstatic /target/x86_64-unknown-freebsd/src/deps/libcompiler_builtins-5fa8f84ee86bdccf.rlib -Wl,-Bdynamic -lrt -lutil -lexecinfo -lkvm -lmemstat -lkvm -lutil -lprocstat -lrt -ldevstat -lexecinfo -lpthread -lgcc_s -lc -lm -lrt -lpthread -lrt -lutil -lexecinfo -lkvm -lmemstat -lkvm -lutil -lprocstat -lrt -ldevstat -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 -Wl,--eh-frame-hdr -Wl,-z,noexecstack -o /target/x86_64-unknown-freebsd/src/deps/Img-ad24612e0952e6f0 -Wl,--no-gc-sections -pie
+ [[ 59 -eq 0 ]]
+ exec x86_64-unknown-freebsd13-gcc -Wl,--version-script=/tmp/rustcxcoybW/list -Wl,--no-undefined-version -m64 /tmp/rustcxcoybW/symbols.o /target/x86_64-unknown-freebsd/src/deps/Img-ad24612e0952e6f0.Img.3e18e81114b9f627-cgu.0.rcgu.o -Wl,--as-needed -Wl,-Bstatic /target/x86_64-unknown-freebsd/src/deps/libcompiler_builtins-5fa8f84ee86bdccf.rlib -Wl,-Bdynamic -lrt -lutil -lexecinfo -lkvm -lmemstat -lkvm -lutil -lprocstat -lrt -ldevstat -lexecinfo -lpthread -lgcc_s -lc -lm -lrt -lpthread -lrt -lutil -lexecinfo -lkvm -lmemstat -lkvm -lutil -lprocstat -lrt -ldevstat -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 -Wl,--eh-frame-hdr -Wl,-z,noexecstack -o /target/x86_64-unknown-freebsd/src/deps/Img-ad24612e0952e
/usr/local/lib/gcc/x86_64-unknown-freebsd13/6.4.0/../../../../x86_64-unknown-freebsd13/bin/ld: /target/x86_64-unknown-freebsd/src/deps/Img-ad24612e0952e6f0: local symbol `environ' in /usr/local/lib/gcc/x86_64-unknown-freebsd13/6.4.0/../../../../x86_64-unknown-freebsd13/lib/Scrt1.o is referenced by DSO
/usr/local/lib/gcc/x86_64-unknown-freebsd13/6.4.0/../../../../x86_64-unknown-freebsd13/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
Same thing here, can you try https://github.com/cross-rs/cross/issues/1564#issuecomment-2381401919
try #1564 (comment)
Tried install cross using main branch but still show install tagged version 0.2.5 of cross.
Not sure whether cargo install cross --git https://github.com/cross-rs/cross --branch main
is the right way to do.
Detail message like below:
What's wrong and how to fix it?