worik wrote: ↑
Sat May 25, 2019 7:20 am
Paeryn wrote: ↑
Sat May 25, 2019 2:40 am
Yes, your target is wrong for an RPi0, programs compiled for armv7 won't run on the Zero's armv6 (it will use instructions that the RPi0's cpu doesn't have).
As to the GLIBC_2.28 error, that is because your cross-compiler linked it against a newer version of GLIBC than what is installed on the RPi. Raspbian has version 2.24 whereas your program is requiring version 2.28.
The correct target might be:arm-unknown-linux-gnueabi. https://forge.rust-lang.org/platform-support.html
suggests it is for: ARMv6 Linux.
How do I get it to use a different glibc?
You want the hf one else the loader will complain about incompatible floats: arm-unknown-linux-gnueabihf
You need to make sure the cross-compiler links with the same version glibc that the RPi uses. When I've done cross-compilers before I've copied the RPi libs over so I know the correct versions are being used, though I've not cross-compiled with rust, I just let rustup do its thing on the RPi.
I found these instructions for building for the RPi, they give it as a docker file but you can easily run the commands yourself.