Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly Rust features fails with BUILD_IN_DOCKER #20759

Open
WataNekko opened this issue Jun 23, 2024 · 2 comments
Open

Nightly Rust features fails with BUILD_IN_DOCKER #20759

WataNekko opened this issue Jun 23, 2024 · 2 comments

Comments

@WataNekko
Copy link

Description

Building Rust examples on native with docker (BUILD_IN_DOCKER=1) without [profile.release] panic = "abort" fails with

   Compiling riot-wrappers v0.8.4
error[E0554]: `#![feature]` may not be used on the stable release channel
  --> /data/riotbuild/.cargo/registry/src/index.crates.io-6f17d22bba15001f/riot-wrappers-0.8.4/src/lib.rs:19:5
   |
19 |     feature(lang_items)
   |     ^^^^^^^^^^^^^^^^^^^

Seems like the riot/riotbuild docker image is not using nightly toolchain. Forcing nightly with rust-toolchain.toml

[toolchain]
channel = "nightly"

Gives

info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
error: could not create temp file /opt/rustup/.rustup/tmp/9rdon3zhu42fd5p8_file: Permission denied (os error 13)
Error: No Rust libraries are installed for the board's CPU. Run
    $ rustup target add i686-unknown-linux-gnu
or set `CARGO_OPTIONS=-Zbuild-std=core`.

Is nightly not supported in docker and I have to add panic = "abort" as a workaround?
(Rust examples here works fine. I was trying to run https://gitlab.com/etonomy/riot-module-examples cc @chrysn)

@chrysn
Copy link
Member

chrysn commented Jun 23, 2024 via email

@WataNekko
Copy link
Author

Thanks for your response. Okay, I’m now clear about setting panic is recommended. But if I were to use some nightly features and build with docker, how should I go about setting the toolchain for the docker image? I assume it would be best to configure this somewhere in the riot/riotbuild image upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants