Comments (4)
I cannot reproduce this
git[dirbaio@mercury ~]$ git clone https://github.com/rust-embedded/embedded-hal
Cloning into 'embedded-hal'...
remote: Enumerating objects: 4476, done.
remote: Counting objects: 100% (946/946), done.
remote: Compressing objects: 100% (221/221), done.
remote: Total 4476 (delta 781), reused 781 (delta 725), pack-reused 3530
Receiving objects: 100% (4476/4476), 1.49 MiB | 6.91 MiB/s, done.
Resolving deltas: 100% (2898/2898), done.
[dirbaio@mercury ~]$ cd embedded-hal
[dirbaio@mercury embedded-hal]$ cargo build --features defmt-03
(...)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.05s
[dirbaio@mercury embedded-hal]$ cd embedded-hal
[dirbaio@mercury embedded-hal]$ cargo build --features defmt-03
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
[dirbaio@mercury embedded-hal]$
[dirbaio@mercury embedded-hal]$ cargo --version -v
cargo 1.79.0 (ffa9cf99a 2024-06-03)
release: 1.79.0
commit-hash: ffa9cf99a594e59032757403d4c780b46dc2c43a
commit-date: 2024-06-03
host: x86_64-unknown-linux-gnu
libgit2: 1.7.2 (sys:0.18.3 vendored)
libcurl: 8.6.0-DEV (sys:0.4.72+curl-8.6.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Arch Linux [64-bit]
[dirbaio@mercury embedded-hal]$ rustc --version -v
rustc 1.79.0 (129f3b996 2024-06-10)
binary: rustc
commit-hash: 129f3b9964af4d4a709d1383930ade12dfe7c081
commit-date: 2024-06-10
host: x86_64-unknown-linux-gnu
release: 1.79.0
LLVM version: 18.1.7
Perhaps you have an old Cargo.lock
file somewhere, perhaps there's something wrong with your Rust installation so it's actually using an older rustc or something.
from embedded-hal.
Indeed, after whipping and reinstalling the Rustup installation and Cargo.lock
and target/
, the embedded-hal
and embedded-io
packages now compiles with the defmt-03
feature.
However, I used the x86_64-unknown-linux-gnu
because the problem also happened with it ; what we are actually compiling for is an ESP32-S3 Xtensa platform. I created a MRE in this repository (here) to showcase the same problem while compiling for the device.
In the root Cargo.toml
, it successfully compiles only if I do not comment out the patch.crates-io
section.
--> /home/ferris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/embedded-hal-1.0.0/src/lib.rs:21:5
|
21 | use defmt as defmt;
| ^^^^^^^^^^^^^^ no external crate `defmt`
For more information about this error, try `rustc --explain E0432`.
error: could not compile `embedded-hal` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Xtensa Rust version:
$ rustup run esp cargo -Vv
cargo 1.77.0-nightly (3fe68eabf 2024-02-29)
release: 1.77.0-nightly
commit-hash: 3fe68eabf93cbf3772bbcad09a9206c783e2de3f
commit-date: 2024-02-29
host: x86_64-unknown-linux-gnu
libgit2: 1.7.2 (sys:0.18.2 vendored)
libcurl: 8.5.0-DEV (sys:0.4.70+curl-8.5.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Arch Linux [64-bit]
$ rustup run esp rustc -Vv
rustc 1.77.0-nightly (424037dcb 2024-03-18) (1.77.0.0)
binary: rustc
commit-hash: 424037dcb6937656992747c4bbff310c40061498
commit-date: 2024-03-18
host: x86_64-unknown-linux-gnu
release: 1.77.0-nightly
LLVM version: 17.0.1
Could you try if the error happens on your side ? The required compiler and installation steps are documented in the README.md
.
from embedded-hal.
Same, it build fine for me. Both with and without the [patch.crates-io]
.
from embedded-hal.
Ok, then I will create a clean Docker container and try reproducing it there. Thanks for your time.
from embedded-hal.
Related Issues (20)
- i2c: Merging of consecutive operations in transaction contract
- SpiDevice's interface can't be used for streaming transactions HOT 6
- SpiDevice implementations in embedded-hal-bus don't provide a way to use active-high chip select HOT 3
- Create an I3C Trait
- Read not implemented for &mut [u8] HOT 1
- README: Links to LICENSE-APACHE and LICENSE-MIT are not found
- How do I share an I2c bus between tasks? HOT 1
- Implment `Clone` for async DelayNs HOT 2
- Multipin serial spi interface trait
- embedded-hal-bus no longer builds with target thumbv6m-none-eabi HOT 5
- Split embedded-can? HOT 3
- feature request: embedded_io_async::try_read HOT 2
- Upstreaming some concepts built up in `embedded-time` HOT 1
- Why was ADC removed? HOT 2
- [Discussion] Should sensor driver developers target `embedded-hal-async` only?
- Shared SPI bus between devices with different SPI modes HOT 2
- honor `ErrorKind::Interrupted` in `write_all()`? HOT 4
- Revisiting the possibility of including generic sensor traits
- Generic bus traits HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from embedded-hal.