Closed Ludea closed 1 year ago
Hi @Ludea
I have the very same issue but on a different platform. I've fixed it by adding required information to the config.
In my case (for Raspberry Pi / ARMv7).
Content of ~/.cargo/config
[target.armv7-unknown-linux-gnueabihf]
strip = "/usr/bin/arm-linux-gnueabihf-strip"
objcopy = "/usr/bin/arm-linux-gnueabihf-objcopy"
linker = "/usr/bin/arm-linux-gnueabihf-gcc"
You can't use strip
command when cross compiling, because it is platform specific, like your compiler and linker are. You need a special version for the target, configured like the error says.
[target.armv7-unknown-linux-gnueabihf] strip = "/usr/bin/arm-linux-gnueabihf-strip" objcopy = "/usr/bin/arm-linux-gnueabihf-objcopy" linker = "/usr/bin/arm-linux-gnueabihf-gcc"
Can we use env var to setup strip ? I already do this when building app and creating deb
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
CXX_aarch64_unknown_linux_gnu: aarch64-linux-gnu-g++
@Ludea It seems there is no such option.
closing, I use cargo config to specify strip and objcopy path
Hi,
I trying to create a .deb with my app for aarch64 from x86_64 hosts.
I install
g++-aarch64-linux-gnu libc6-dev-arm64-cross
, runcargo build --release --target aarch64-unknown-linux-gnu
all is fineWhen running
cargo deb -p myapp --target aarch64-unknown-linux-gnu
, I getI do something wrong ?