Closed
Description
Problem
When attempting to install Rust in a 32-bit environment with a 64 kernel the wrong version is installed. This is due to rustup determining 64/32 bit from what is available, not what is being used
Steps
- Install fresh 32-bit Raspberry Pi OS image
- Enable the 64-bit kernel (set
arm_64bit=1
in /boot/config.txt) - Restart
- Follow rust installation instructions
- Rust installed is 64-bit despite user running in a 32-bit environment (rust wont run)
Possible Solution(s)
getconf LONG_BIT
is a better solution than uname -m
for determining whether the user is operating in 64 bit or 32 bit (which is more in line with user specific installation)
Notes
Execution of rustc after running rustup:
robtom@robtom-pi:~ $ rustc --version
error: command failed: 'rustc': No such file or directory (os error 2)
Rustup version
rustup 1.25.2 (17db695f1 2023-02-01)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `(error reading rustc version)`
Installed toolchains
Default host: aarch64-unknown-linux-gnu
rustup home: /home/control/.rustup
stable-aarch64-unknown-linux-gnu (default)
(error reading rustc version)