template-bin icon indicating copy to clipboard operation
template-bin copied to clipboard

Build failed

Open MarkuBu opened this issue 4 years ago • 4 comments

Hi, I tried to compile the template, but it failed. I tried it on Lubuntu 20.04 64 bit and on Ubuntu Mate 18.04 on a Odroid N2. I also tried the blink example with the same result. I followed the instructions in the Rust Avr book

odroid@odroid:~/dev/rustavr$ git clone https://github.com/avr-rust/template-bin.git
Klone nach 'template-bin' ...
remote: Enumerating objects: 68, done.
remote: Counting objects: 100% (68/68), done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 68 (delta 27), reused 61 (delta 20), pack-reused 0
Entpacke Objekte: 100% (68/68), Fertig.
odroid@odroid:~/dev/rustavr$ cd template-bin/
odroid@odroid:~/dev/rustavr/template-bin$ rustup override set nightly
info: using existing install for 'nightly-aarch64-unknown-linux-gnu'
info: override toolchain for '/home/odroid/dev/rustavr/template-bin' set to 'nightly-aarch64-unknown-linux-gnu'

  nightly-aarch64-unknown-linux-gnu unchanged - rustc 1.48.0-nightly (8876ffc92 2020-10-02)

odroid@odroid:~/dev/rustavr/template-bin$ cargo build --target avr-atmega328p.json -Z build-std=core --release
    Updating crates.io index
  Downloaded avr-std-stub v1.0.2
  Downloaded 1 crate (2.7 KB) in 1.18s
   Compiling core v0.0.0 (/home/odroid/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
   Compiling compiler_builtins v0.1.35
   Compiling rustc-std-workspace-core v1.99.0 (/home/odroid/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
error: could not compile `core`

Caused by:
  process didn't exit successfully: `rustc --crate-name core --edition=2018 /home/odroid/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=df014d755aa4223c -C extra-filename=-df014d755aa4223c --out-dir /home/odroid/dev/rustavr/template-bin/target/avr-atmega328p/release/deps --target /home/odroid/dev/rustavr/template-bin/avr-atmega328p.json -Z force-unstable-if-unmarked -L dependency=/home/odroid/dev/rustavr/template-bin/target/avr-atmega328p/release/deps -L dependency=/home/odroid/dev/rustavr/template-bin/target/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: build failed

Any suggestions?

MarkuBu avatar Oct 03 '20 13:10 MarkuBu

I just wanted to echo that I have the same problem with rustc 1.49.0-nightly (e3051d8c2 2020-10-16)

teknoman117 avatar Oct 18 '20 22:10 teknoman117

same problem with 1.49.0-nightly (31ee872db 2020-10-28)

continuous integration started failing starting with test suite #36. last successful was test suite #35 which was built using nightly-2020-08-28. the following workaround helped:

$ rustup toolchain install nightly-2020-08-28
$ rustup override set nightly-2020-08-28
$ rustup component add rust-src
$ cargo build -Z build-std=core --target avr-atmega328p.json --release

i'm a bit new to this arena, but wonder if an upstream bug against libcore is warranted.

khimaros avatar Oct 29 '20 02:10 khimaros

see also: https://github.com/avr-rust/blink/issues/25 and https://github.com/rust-lang/rust/issues/76930

khimaros avatar Oct 29 '20 02:10 khimaros

That was helpful, thanks

MarkuBu avatar Oct 29 '20 05:10 MarkuBu