Error: linking with `cc` failed: exit status: 1 while bootstrapping rustc compiler in poky

With python3 src/bootstrap/ test --target i686-poky-linux-gnu cmd, build testing fails as follows in rust 1.74.1 version-
Host machine is x86_64 linux

error: linking with `cc` failed: exit status: 1

build-st/tmp/hosttools/ld:  build-st/tmp/work/core2-32-poky-linux/rust/1.74.1/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage1-std/i686-poky-linux-gnu-synthetic-miropt-abort/release/deps/std-55f86614dec482ec.3j457j23godxdmvr.rcgu.o: file class ELFCLASS32 incompatible with ELFCLASS64
build-st/tmp/hosttools/ld: final link failed: file in wrong format

collect2: error: ld returned 1 exit status
error: could not compile `std` (lib) due to previous error

I have seen a few of similar issues raised already(87987, and many more...) and tried the mentioned solutions like re-installing rust or rustup, installing gcc-multilib which is already installed in the machine, but no success.

Any help would be much appreciated. Thanks.

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.