Not sure where is the correct place to post this, so hoping that it will save others' time.
Working on DIY project using RPi4, I found that VScode can run remote sessions using SSH.
So I opted-in, and opened a workspace on my RPi, with the goal of learning Rust.
Installed the Rust plugin pack and started seeing plugin errors like missing h files, etc...
I found that gcc-multilib/g++-multilib are not available for aarch64 (ARMv7) on Raspbian (no desktop environment, just terminal/ssh.)
Tried playing with it a little, build from source, compile, hack, gave up.
As a last resort, I saw somewhere the idea of just installing certain/peer packages and link the required files.
So here are my steps:
1. sudo apt install libc6-dev-arm64-cross/stable 2. sudo ln -s /usr/include/aarch64-linux-gnu/bits /usr/include/bits 3. sudo ln -s /usr/include/aarch64-linux-gnu/sys/cdefs.h /usr/include/sys/cdefs.h 4. sudo ln -s /usr/include/aarch64-linux-gnu/gnu/stubs.h /usr/include/gnu/ 5. sudo ln -s /usr/include/aarch64-linux-gnu/gnu/stubs-lp64.h /usr/include/gnu/
After issuing the above commands, restarted VScode, and rust-analyzer plugin errors were gone.
If anyone encountered that, feel free to share your solution