bltavares / colmeia

Attempt to make an interop layer to connect to dat on hyperswarm in Rust
24 stars 4 forks source link

async-std not found on compilation #13

Closed evaporei closed 4 years ago

evaporei commented 4 years ago

Hey! Nice project by the way 🙂

So I've being trying to compile it and having trouble on it.

I've tried just cloning and using cargo build but I get this output:

╭─otaviopace at mettaton in /Users/otaviopace/colmeia (master ✔)
╰─λ cargo build                                                                                                                cross-0 | 101 < 02:11:17
    Updating git repository `https://github.com/async-std/async-std`
error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to load source for dependency `async-std`

Caused by:
  Unable to update https://github.com/async-std/async-std?branch=fix-atomic-32#64844deb

Caused by:
  revspec '64844debcb15dc8e7fd2340577da24dbcaeb781a' not found; class=Reference (4); code=NotFound (-3)

After reading some of your README.md, I've seen that you use cross to compile for Android. So I've tried using it too to compile, and I had the same issue 🤔

╭─otaviopace at mettaton in /Users/otaviopace/colmeia (master ✔)
╰─λ cross build --target armv7-linux-androideabi                                                                                  fish-0 | 0 < 02:10:27
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2020-06-04, rust version 1.44.0 (49cae5576 2020-06-01)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
 60.2 MiB /  60.2 MiB (100 %)  50.6 MiB/s in  1s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 12.2 MiB /  12.2 MiB (100 %)   8.6 MiB/s in  1s ETA:  0s
info: installing component 'rust-std'
info: installing component 'rustc'
 60.2 MiB /  60.2 MiB (100 %)  15.0 MiB/s in  4s ETA:  0s
info: installing component 'rustfmt'

  stable-x86_64-unknown-linux-gnu installed - (error reading rustc version)

info: checking for self-updates
info: downloading component 'rust-std' for 'armv7-linux-androideabi'
info: installing component 'rust-std' for 'armv7-linux-androideabi'
Unable to find image 'rustembedded/cross:armv7-linux-androideabi-0.2.0' locally
armv7-linux-androideabi-0.2.0: Pulling from rustembedded/cross
fe703b657a32: Pull complete
f9df1fafd224: Pull complete
a645a4b887f9: Pull complete
57db7fe0b522: Pull complete
c3de58f51717: Pull complete
f8aac8546953: Pull complete
e0fe7a974cca: Pull complete
de899c6f7dca: Pull complete
abf70cb17661: Pull complete
f707b04b4965: Pull complete
3b162ba5b74b: Pull complete
67d0daeca688: Pull complete
c2de46407807: Pull complete
fa889352c751: Pull complete
c1779a84f287: Pull complete
72a6883f1f42: Pull complete
2d3e8798ffc5: Pull complete
Digest: sha256:853737710515f5de9a1442676c38065fc1f6dcd3f57904ee10f63814c70661a8
Status: Downloaded newer image for rustembedded/cross:armv7-linux-androideabi-0.2.0
    Updating git repository `https://github.com/async-std/async-std`
error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to load source for dependency `async-std`

Caused by:
  Unable to update https://github.com/async-std/async-std?branch=fix-atomic-32#64844deb

Caused by:
  revspec '64844debcb15dc8e7fd2340577da24dbcaeb781a' not found; class=Reference (4); code=NotFound (-3)

So I have two questions:

By the way I had the same issue on MacOS and Linux, but the logs are all on a Mac machine. Here is my installation info:

╭─otaviopace at mettaton in /Users/otaviopace/colmeia (master ✔)
╰─λ rustup update                                                                                                               fish-0 | 101 < 02:13:17
info: syncing channel updates for 'stable-i686-pc-windows-gnu'
info: syncing channel updates for 'stable-x86_64-apple-darwin'
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'nightly-x86_64-apple-darwin'
info: checking for self-updates

       stable-i686-pc-windows-gnu unchanged - (rustc does not exist)
       stable-x86_64-apple-darwin unchanged - rustc 1.44.0 (49cae5576 2020-06-01)
    stable-x86_64-pc-windows-msvc unchanged - (rustc does not exist)
  stable-x86_64-unknown-linux-gnu unchanged - (error reading rustc version)
      nightly-x86_64-apple-darwin unchanged - rustc 1.46.0-nightly (118b50524 2020-06-06)

info: cleaning up downloads & tmp directories
evaporei commented 4 years ago

I've also tried installing cargo-edit to run cargo add async-std so it did this:

╭─otaviopace at mettaton in /Users/otaviopace/colmeia (master ✔)
╰─λ cargo add async-std                                                                                                         fish-0 | 101 < 02:31:23
    Updating 'https://github.com/rust-lang/crates.io-index' index
      Adding async-std v1.6.0 to dependencies
╭─otaviopace at mettaton in /Users/otaviopace/colmeia (master ✚1)
╰─λ git diff                                                                                                                      fish-0 | 0 < 02:31:25
diff --git a/Cargo.toml b/Cargo.toml
index 5a8130a..68bf163 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -26,9 +26,9 @@ path = 'colmeia-dat1-mdns'
 path = 'colmeia-dat1-proto'

 [dependencies.async-std]
-git = 'https://github.com/async-std/async-std'
 branch = 'fix-atomic-32'
 features = ['unstable']
+version = "1.6.0"

 [dependencies.colmeia-dat1-core]
 path = 'colmeia-dat1-core'

But still with that update from looking directly into master branch to using the version 1.6.0, it didn't work 😕

bltavares commented 4 years ago

Could you try again?

When updating the code to work with openwrt, the dependency was pointing to a git branch, that has been since deleted.

Now pointing to async-std 1.6.0 without any patches it should work.

evaporei commented 4 years ago

I think what you've done fixed the issue for async-std 🎉 , however the same thing is happening for bitfield-rle now 😕

╭─otaviopace at mettaton in /Users/otaviopace/colmeia (master ✔)
╰─λ cargo build                                                                                                                   fish-0 | 0 < 10:52:36
    Updating git repository `https://github.com/bltavares/bitfield-rle`
error: failed to get `bitfield-rle` as a dependency of package `colmeia-dat1 v0.1.0 (/Users/otaviopace/colmeia/colmeia-dat1)`

Caused by:
  failed to load source for dependency `bitfield-rle`

Caused by:
  Unable to update https://github.com/bltavares/bitfield-rle?branch=failure-into-stderr#8d7c6148

Caused by:
  revspec '8d7c6148795513605445f096e24ac7e0c3af48ce' not found; class=Reference (4); code=NotFound (-3)
evaporei commented 4 years ago

I've fixed the issue by changing to comeia-dat1 directory and running cargo add bitfield-rle 😊