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

Cannot build the Hermit application #51

Closed
Ivan-Velickovic opened this issue Dec 18, 2023 · 2 comments · Fixed by #52
Closed

Cannot build the Hermit application #51

Ivan-Velickovic opened this issue Dec 18, 2023 · 2 comments · Fixed by #52

Comments

@Ivan-Velickovic
Copy link

Hello, I'd like to try out Hermit and thought this might be an appropriate place to start.

I followed the README instructions and downloaded the Rust Standard Library for Hermit for x86_64 and AArch64, I unpacked both of these and ran the respective ./install.sh script. Everything seemed to be fine, no errors reported.

I then ran the README command: cargo build --target x86_64-unknown-hermit but got the following error:

   Compiling hermit v0.7.2
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-unknown-hermit` target may not be installed
  = help: consider downloading the target with `rustup target add x86_64-unknown-hermit`

error: cannot find macro `include_str` in this scope
 --> /home/ivanv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hermit-0.7.2/src/lib.rs:1:10
  |
1 | #![doc = include_str!("../README.md")]
  |          ^^^^^^^^^^^

error: requires `sized` lang_item

For more information about this error, try `rustc --explain E0463`.
The following warnings were emitted during compilation:

warning: $ cd "/tmp/hermit-rs-template/target/x86_64-unknown-hermit/debug/build/hermit-152bff166c6f440c/out/kernel-0.6.6" && env -u CARGO -u CARGO_CFG_PANIC -u CARGO_CFG_TARGET_ARCH -u CARGO_CFG_TARGET_ENDIAN -u CARGO_CFG_TARGET_ENV -u CARGO_CFG_TARGET_FEATURE -u CARGO_CFG_TARGET_HAS_ATOMIC -u CARGO_CFG_TARGET_OS -u CARGO_CFG_TARGET_POINTER_WIDTH -u CARGO_CFG_TARGET_VENDOR -u CARGO_ENCODED_RUSTFLAGS -u CARGO_FEATURE_ACPI -u CARGO_FEATURE_DEFAULT -u CARGO_FEATURE_DHCPV4 -u CARGO_FEATURE_FS -u CARGO_FEATURE_FSGSBASE -u CARGO_FEATURE_PCI -u CARGO_FEATURE_PCI_IDS -u CARGO_FEATURE_SMP -u CARGO_FEATURE_TCP -u CARGO_FEATURE_UDP -u CARGO_HOME -u CARGO_MAKEFLAGS -u CARGO_MANIFEST_DIR -u CARGO_MANIFEST_LINKS -u CARGO_PKG_AUTHORS -u CARGO_PKG_DESCRIPTION -u CARGO_PKG_HOMEPAGE -u CARGO_PKG_LICENSE -u CARGO_PKG_LICENSE_FILE -u CARGO_PKG_NAME -u CARGO_PKG_README -u CARGO_PKG_REPOSITORY -u CARGO_PKG_RUST_VERSION -u CARGO_PKG_VERSION -u CARGO_PKG_VERSION_MAJOR -u CARGO_PKG_VERSION_MINOR -u CARGO_PKG_VERSION_PATCH -u CARGO_PKG_VERSION_PRE -u LD_LIBRARY_PATH -u RUSTC -u RUSTDOC -u RUSTUP_HOME -u RUSTUP_TOOLCHAIN -u RUST_RECURSION_COUNT "/home/ivanv/.cargo/bin/cargo" "run" "--package=xtask" "--target-dir" "/tmp/hermit-rs-template/target/x86_64-unknown-hermit/debug/build/hermit-152bff166c6f440c/out/target" "--" "build" "--arch" "x86_64" "--profile" "dev" "--target-dir" "/tmp/hermit-rs-template/target/x86_64-unknown-hermit/debug/build/hermit-152bff166c6f440c/out/target" "--no-default-features" "--features" "acpi dhcpv4 fsgsbase pci pci-ids smp tcp udp fs"

error: could not compile `hermit` (lib) due to 3 previous errors

Apologies if I'm missing anything simple, I am not super familiar with building Rust projects.

@mkroening
Copy link
Member

Thanks for the issue. I forgot to bump the toolchain here after releasing 1.74.1, which you have probably installed. That's why cargo was still looking for the 1.74.0 installation, which it could not find.

I opened #52 to fix this.

Let me know, if there are any problems after that. :)

@Ivan-Velickovic
Copy link
Author

Works now, thank you!

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

Successfully merging a pull request may close this issue.

2 participants