Cannot compile libcore from 1.5 release - #[feature] may not be used in the stable release channel

Hello!

I'm just getting started with embedded rust, and following a tutorial for compiling libcore for my device.

I'm using commit 3d7cd77e442ce34eaac8a176ae8be17669498ebc for rustc and the github repo. I get many errors like:

$ rustc -C opt-level=2 -Z no-landing-pads --target firmware/main/cortexm3-none-eabi -g rust/src/libcore/lib.rs 
rust/src/libcore/lib.rs:69:1: 69:37 error: #[feature] may not be used on the stable release channel
rust/src/libcore/lib.rs:69 #![feature(allow_internal_unstable)]

Thanks for any help!

You'll need to use a nightly compiler rather than the stable 1.5.0 (or whatever version you have). The multirust tool makes it very easy to use different versions.

1 Like

You can only compile 1.5's libcore from a nightly compiler: it wasn't stabilized until 1.6.

1 Like

Thanks for the quick responses!

it wasn't stabilized until 1.6.

I just installed 1.6 (beta) but get the same. I guess you mean this will work once 1.6 is released as stable? I'll switch to the nightly build for now. Thanks :slightly_smiling:

Unfortunately no: core being stable means an already-built one can be used from a stable compiler, not that it can be compiled with one.