rapiz1 / rathole

A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
Apache License 2.0
9.86k stars 495 forks source link

编译出错,报以下错误 #271

Open fyhong opened 1 year ago

fyhong commented 1 year ago

我按照dock里面的命令编译,每次到最后都是显示以下错误。请问这是什么原因

l/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: error adding symbols: File in wrong format collect2: error: ld returned 1 exit status

rapiz1 commented 1 year ago

请提供具体的可复现步骤,如依次执行了哪些命令。

fyhong commented 1 year ago

我用的是docker docker pull messense/rust-musl-cross:mipsel-musl-amd64 docker run --rm -it -v /root/cross:/home messense/rust-musl-cross:arm-musleabi-amd64 然后直接在里面运行cargo build -r

kLiHz commented 1 year ago

From the log, the build failed at the linking process and the linker used is /usr/bin/ld, which is probably the system linker. And the message suggests that the object file's format cannot be read by this linker, so an appropriate linker is needed.

It turns out that you may need to tell cargo which linker to use when doing cross-compiling, or it falls back to the system default. Try passing --config target.$TARGET.linker=\"rust-lld\" to cargo.

107295472 commented 1 year ago

请提供具体的可复现步骤,如依次执行了哪些命令。 在阿里云ecs上查杀说有后门