rustl8710
rustl8710 copied to clipboard
build error
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 https://github.com/japaric/steed/issues/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
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
.
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$
`
Yep, getting the same issue. @kissste were you able to build?
Yep, getting the same issue. @kissste were you able to build?
No
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
https://users.rust-lang.org/t/psa-you-no-longer-need-xargo-to-do-arm-cortex-m-development/16703