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

build error #5

Open
RCasatta opened this issue Apr 16, 2018 · 6 comments
Open

build error #5

RCasatta opened this issue Apr 16, 2018 · 6 comments

Comments

@RCasatta
Copy link

Hello, I am trying to follow your guide but I got a build error:

$ make
make[1]: Entering directory '/home/casatta/rustl8710'
cd src/rust && rustup override set nightly
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: override toolchain for '/home/casatta/rustl8710/src/rust' set to 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.27.0-nightly (7360d6dd6 2018-04-15)

cd src/rust && xargo build --target thumbv7m-none-eabi
warning: unused manifest key: dependencies.alloc.alloc
warning: unused manifest key: dependencies.collections.collections
error: failed to load source for a dependency on `collections`

Caused by:
  Unable to update file:///home/casatta/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcollections

Caused by:
  failed to read `/home/casatta/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcollections/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
error: `"cargo" "build" "--release" "--manifest-path" "/tmp/xargo.8eHaBskflBDV/Cargo.toml" "--target" "thumbv7m-none-eabi" "-p" "alloc"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
rust.mk:8: recipe for target 'application' failed
make[1]: *** [application] Error 1
make[1]: Leaving directory '/home/casatta/rustl8710'
Makefile:8: recipe for target 'ram_all' failed
make: *** [ram_all] Error 2

I tried removing the collection import in Xargo.toml as suggested here japaric/steed#159 but then I got an error later in the build process:

Compiling freertos_rs v0.1.0
error[E0463]: can't find crate for `collections`
  --> /home/casatta/.cargo/registry/src/github.com-1ecc6299db9ec823/freertos_rs-0.1.0/src/lib.rs:61:1
   |
61 | extern crate collections;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: Could not compile `freertos_rs`.

To learn more, run the command again with --verbose.
rust.mk:8: recipe for target 'application' failed
make[1]: *** [application] Error 101
make[1]: Leaving directory '/home/casatta/rustl8710'
Makefile:8: recipe for target 'ram_all' failed
make: *** [ram_all] Error 2

@vijfhoek
Copy link

To fix this build error, you need to edit src/rust/Cargo.toml and change the freertos_rs version from 0.1 to 0.2.

RCasatta added a commit to RCasatta/rustl8710 that referenced this issue Jun 19, 2018
untested, derived from this answer
polyfractal#5 (comment)
@kissste
Copy link

kissste commented Oct 2, 2018

Unfortunately, "0.2" did not help.

[dependencies]
freertos_rs = "0.2"

`steve@AcerGX:~/rustl8710$ make
make[1]: Entering directory '/home/steve/rustl8710'
cd src/rust && rustup override set nightly
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: override toolchain for '/home/steve/rustl8710/src/rust' set to 'nightly-x86_64-unknown-linux-gnu'

nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.31.0-nightly (de3d640f5 2018-10-01)

cd src/rust && xargo build --target thumbv7m-none-eabi
warning: unused manifest key: dependencies.alloc.alloc
warning: unused manifest key: dependencies.collections.collections
error: failed to load source for a dependency on collections

Caused by:
Unable to update /home/steve/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcollections

Caused by:
failed to read /home/steve/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcollections/Cargo.toml

Caused by:
No such file or directory (os error 2)
error: "cargo" "build" "--release" "--manifest-path" "/tmp/xargo.XwkmPoYZg4KS/Cargo.toml" "--target" "thumbv7m-none-eabi" "-p" "alloc" failed with exit code: Some(101)
note: run with RUST_BACKTRACE=1 for a backtrace
rust.mk:8: recipe for target 'application' failed
make[1]: *** [application] Error 1
make[1]: Leaving directory '/home/steve/rustl8710'
Makefile:8: recipe for target 'ram_all' failed
make: *** [ram_all] Error 2
steve@AcerGX:~/rustl8710$
`

@chevdor
Copy link

chevdor commented May 28, 2019

Yep, getting the same issue. @kissste were you able to build?

@kissste
Copy link

kissste commented May 31, 2019

Yep, getting the same issue. @kissste were you able to build?

No

@benhadad
Copy link

benhadad commented Feb 7, 2021

It has been recommended to remove the #[lang = "eh_unwind_resume"] extern fn eh_unwind_resume() {}
from \src\rust\src\lib.rs
and change to GDB = gdb-multiarch in application.mk
add typedef unsigned long long __uint64_t; to support_os.h
also handle __int64_t;

Lup Yuen: Added core dependency

core = {}

Lup Yuen: Collections module no longer exists.

collections = {}

add freertos_rs = "0.3" to Cargo.toml

@benhadad
Copy link

benhadad commented Feb 7, 2021

https://users.rust-lang.org/t/psa-you-no-longer-need-xargo-to-do-arm-cortex-m-development/16703

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

5 participants