Can't cross compile to armv7 - incompatible libc.so

After adding the armv7-unknown-linux-gnueabihf target, and installing the gcc compiler, I created a new cargo workspace to test out the toolchain. Executing cargo build --target armv7-unknown-linux-gnueabihf leads to this error.

The content of /usr/arm-linux-gnueabihf/lib/libc.so:

/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-little)
GROUP ( /lib/libc.so.6 /lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) )

I have tried making the shown file paths relative, but that didn't at all change the error. What am I doing wrong? Have I missed installing something?

cargo version: cargo 1.57.0-nightly (9a28ac83c 2021-09-18)
rustc version: rustc 1.57.0-nightly (5ecc8ad84 2021-09-19)
arm-linux-gnueabihf-ld version: 2.37

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.