compiler_builtins build failure

164 views
Skip to first unread message

Shane Leonard

unread,
Nov 11, 2017, 4:28:20 PM11/11/17
to Tock Embedded OS Development Discussion
Hi all,

I have run into this issue multiple times in the past, and it still stumps me. I'm sure other people have experienced it, so I thought this would be a good place to discuss it.

Whenever we bump the rust toolchain, the build system tries to update my toolchain automatically when I run 'make'. However, it often catastrophically fails when trying to build the compiler_builtins crate, complaining that associated consts are experimental.

How do I deal with this issue? I've encountered it before and it seems like I've only been able to solve it by flailing around for awhile on my rust version.

Thanks,
Shane

Amit Levy

unread,
Nov 11, 2017, 4:39:49 PM11/11/17
to tock...@googlegroups.com
Do you have an error trace? Is this happening to you on the Teensy repo? I think in the main repo all the versioning stuff is handled by the Makefiles.
--
You received this message because you are subscribed to the Google Groups "Tock Embedded OS Development Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tock-dev+u...@googlegroups.com.
To post to this group, send email to tock...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tock-dev/3ccfd3a1-878f-40ef-a893-3317ca47de60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Shane Leonard

unread,
Nov 11, 2017, 4:47:20 PM11/11/17
to Tock Embedded OS Development Discussion
Currently it's happening on the Teensy repo. Here's the error trace:

/Applications/Xcode.app/Contents/Developer/usr/bin/make -C boards/teensy/
   Compiling core v0.0.0 (file:///Users/shaneleonard/.rustup/toolchains/nightly-2017-06-20-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore)
    Finished release [optimized] target(s) in 14.18 secs

error: associated constants are experimental (see issue #29646)
  --> /Users/shaneleonard/.cargo/git/checkouts/compiler-builtins-ec094dc45a0179c8/1be2858/src/int/mod.rs:46:5
   |
46 |     const BITS: u32;
   |     ^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(associated_consts)] to the crate attributes to enable

... (same error repeated many times at various locations) ...

error: aborting due to previous error(s)

error: Could not compile `compiler_builtins`.

To learn more, run the command again with --verbose.
error: `"cargo" "build" "--release" "--manifest-path" "/var/folders/1f/qr7_cp3j2zdbz_3nh5q_y_840000gn/T/xargo.ggPBhS1As5gw/Cargo.toml" "--target" "thumbv7em-none-eabi" "-p" "compiler_builtins"` failed with exit code: Some(101)

What's missing from the Makefiles?

Shane

Amit Levy

unread,
Nov 11, 2017, 5:00:48 PM11/11/17
to tock...@googlegroups.com
Strange. I'm not sure! It looks like you're including the `Makefile.common` from the tock subrepo that includes all that logic. It also looks like you're using a version of Rust from June, while the main repo has been on a version from September. You also have a an `Xargo.toml` file that doesn't specify the particular version of `compiler-builtins` to use. Can you try just copying the Xargo.toml file from, e.g., imix or hail?

Shane Leonard

unread,
Nov 11, 2017, 5:00:51 PM11/11/17
to Tock Embedded OS Development Discussion
Here's the first part of the output from make V=1:

*************************************************
TOCK KERNEL BUILD SYSTEM -- VERBOSE BUILD
**************************************************
Config:
MAKEFLAGS= -r -R
OBJCOPY=arm-none-eabi-objcopy
PLATFORM=teensy
RUSTUP_TOOLCHAIN=nightly-2017-06-20
XARGO_VERSION=0.3.8
TARGET=thumbv7em-none-eabi
TOCK_KERNEL_VERSION=95c6a64
TOOLCHAIN=arm-none-eabi

arm-none-eabi-objcopy --version = GNU objcopy (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 2.28.0.20170620 Copyright (C) 2017 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty.
rustc --version = rustc 1.12.1 (d4f39402a 2016-10-19)
**************************************************

RUSTFLAGS="-C link-arg=-nostartfiles -C link-arg=-Tlayout.ld" xargo build --target=thumbv7em-none-eabi --verbose --release
+ "rustc" "--print" "sysroot"
+ "rustc" "--print" "target-list"
+ "cargo" "build" "--release" "--manifest-path" "/var/folders/1f/qr7_cp3j2zdbz_3nh5q_y_840000gn/T/xargo.zRhrMLrKqpq4/Cargo.toml" "--target" "thumbv7em-none-eabi" "-v" "-p" "core"

Shane Leonard

unread,
Nov 11, 2017, 5:03:34 PM11/11/17
to Tock Embedded OS Development Discussion
The Xargo.toml file in boards/teensy is already identical to the ones in boards/imix and boards/hail...

Shane Leonard

unread,
Nov 11, 2017, 5:05:08 PM11/11/17
to Tock Embedded OS Development Discussion
My version of tock is frozen at the June version though, I can try updating it and seeing if I get a different result.

Shane Leonard

unread,
Nov 11, 2017, 5:13:26 PM11/11/17
to Tock Embedded OS Development Discussion
Updating my tock to the current revision and copying the Xargo.toml file from hail fixed the issue. The version of tock I was using originally hadn't specified the revision of compiler_builtins that was needed, so that made its way into the Teensy Xargo file. Thanks for the help!
Reply all
Reply to author
Forward
0 new messages