Skip to content

Instantly share code, notes, and snippets.

@anxiousmodernman
Last active January 16, 2018 04:14
Show Gist options
  • Save anxiousmodernman/71796e816b942bfdc817d05561e4e630 to your computer and use it in GitHub Desktop.
Save anxiousmodernman/71796e816b942bfdc817d05561e4e630 to your computer and use it in GitHub Desktop.
Trying to build steed

I just ran into this issue trying to build in Arch using the lld strategy (e.g. not Docker/cross). I'm trying to compile steed itself, not a dependent crate.

Note: The redox issue linked seems to be closed. So I'm assuming we still need to use naive_ralloc.

I edited Xargo.toml per this discussion, but it didn't quite work.

[dependencies]
collections = {}
rand = {}

[dependencies.std]
default-features = false
features = ["naive_ralloc"]

[dependencies.compiler_builtins]
features = ["mem"]
stage = 1

That config still yielded a similar error

error: Package `ralloc v1.0.0 (https://github.com/redox-os/ralloc#
b521bac2)` does not have these features: `allocator`

Instead I fiddled with Cargo.toml, to try building with naive_alloc.

[package]
# This is NOT an official Rust project but since most code will come from
# the rust-lang/rust repo it makes sense to use this author.
authors = ["The Rust Project Developers"]
name = "std"
version = "0.1.0"

[dependencies]
sc = "0.2.1"

[dependencies.ralloc]
default-features = false
features = ["allocator"]
optional = true
git = "https://github.com/redox-os/ralloc"

[dependencies.naive_ralloc]
optional = true
path = "naive_ralloc"

[features]
default = ["naive_ralloc"]

[profile.release]
lto = true

Then I tried building with

xargo build 

The output

error: failed to load source for a dependency on `collections`

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

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

Caused by:
  No such file or directory (os error 2)
error: `"cargo" "build" "--release" "--manifest-path" "/tmp/xargo.
KcG2oOf3bp5o/Cargo.toml" "--target" "x86_64-unknown-linux-gnu" "-p
" "collections"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace

I'm not quite sure how to get past this compiler error.

@anxiousmodernman
Copy link
Author

I opened the following issue related to this error japaric/steed#159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment