Open psiphi75 opened 3 years ago
Could you please give us the output from readelf --all ./test | grep interpreter
(from https://stackoverflow.com/questions/35071872/bash-no-such-file-or-directory). It looks like there is a problem with your linker :thinking:
Yes, that's it thank you. But only the first part of my problem. The command readelf --all ./test | grep interpreter
gave:
[Requesting program interpreter: /usr/lib/ld.so.1]
So I changed my target to armv7-unknown-linux-gnuabihf
and this resulted in:
[Requesting program interpreter: /lib/ld-linux-armhf.so.3]
Now I'm stuck with the following message on my BeagleBone:
./test: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.32' not found (required by ./test)
I'm going remain with version 0.2.2 for now. Thanks.
in your initial .cargo/config
it appears you're trying to build a rust musl
target using a gnu
linker, you need to use one or the other which should look like:
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
[target.armv7-unknown-linux-musleabihf]
linker = "arm-linux-musleabihf-gcc"
to get the musl cross tooling you can either compile it yourself, find a pre-compiled package, or use cross which provides docker containers with the required tooling pre-installed.
./test: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.32' not found (required by ./test)
gnu
targets require libc
for dynamic linking at runtime, it looks like you don't have this installed on your beaglebone?
When I use the below configuration and cross compile to ARMv7 I get the following error message on the BeagleBone:
When I use v0.2.2 of linux-embedded-hal or earlier I do not get this error. If I remove
extern crate linux_embedded_hal as hal;
from the code I do not get the error.Any ideas?
The code
src/main.rs
.cargo/config
Cargo.toml
To compile I use: