Skip to content

Rust toolchain can't figure out what version of rustc to run #1092

@amanuel2

Description

@amanuel2

I'm getting the error below while trying to build an out of tree rust-module:

~/Documents/rust-out-of-tree-module λ sudo make -C /lib/modules/$(uname -r)/build M=$PWD                                                                                      
make: Entering directory '/usr/lib/modules/6.10.1-zen1-1-zen/build'
  RUSTC [M] /home/aman/Documents/rust-out-of-tree-module/rust_out_of_tree.o
error: rustup could not choose a version of rustc to run, because one wasn't specified explicitly, and no default is configured.
help: run 'rustup default stable' to download the latest stable release of Rust and set it as your default toolchain.
make[2]: *** [scripts/Makefile.build:294: /home/aman/Documents/rust-out-of-tree-module/rust_out_of_tree.o] Error 1
make[1]: *** [/usr/lib/modules/6.10.1-zen1-1-zen/build/Makefile:1932: /home/aman/Documents/rust-out-of-tree-module] Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: Leaving directory '/usr/lib/modules/6.10.1-zen1-1-zen/build'

~/Documents/rust-out-of-tree-module λ    

I have already tried rustup default stable, reinstalled rust with rustup as well as all the components and followed the entire guide labeled here: https://docs.kernel.org/rust/quick-start.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions