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

Could not compile futures-core-preview #1462

Closed
weiby3 opened this issue Feb 23, 2019 · 4 comments
Closed

Could not compile futures-core-preview #1462

weiby3 opened this issue Feb 23, 2019 · 4 comments

Comments

@weiby3
Copy link

weiby3 commented Feb 23, 2019

Codes are from Applied: HTTP Server.
OS: centos7

[weiby@login async_server]$ cargo --version
cargo 1.34.0-nightly (b33ce7fc9 2019-02-19)
[weiby@login async_server]$ rustc --version
rustc 1.34.0-nightly (e1c6d0057 2019-02-22)

cargo check output:

[weiby@login async_server]$ cargo run
    Updating `git://mirrors.ustc.edu.cn/crates.io-index` index
   Compiling semver-parser v0.7.0
   Compiling autocfg v0.1.2
   Compiling libc v0.2.49
   Compiling rand_core v0.4.0
   Compiling arrayvec v0.4.10
   Compiling proc-macro2 v0.4.27
   Compiling unicode-xid v0.1.0
   Compiling lazy_static v1.2.0
   Compiling byteorder v1.3.1
   Compiling stable_deref_trait v1.1.1
   Compiling cfg-if v0.1.6
   Compiling nodrop v0.1.13
   Compiling smallvec v0.6.9
   Compiling memoffset v0.2.1
   Compiling scopeguard v0.3.3
   Compiling either v1.5.1
   Compiling slab v0.4.2
   Compiling futures v0.1.25
   Compiling lazycell v1.2.1
   Compiling proc-macro-nested v0.1.2
   Compiling httparse v1.3.3
   Compiling pin-utils v0.1.0-alpha.4
   Compiling itoa v0.4.3
   Compiling fnv v1.0.6
   Compiling string v0.1.3
   Compiling indexmap v1.0.2
   Compiling try-lock v0.2.2
   Compiling log v0.4.6
   Compiling owning_ref v0.4.0
   Compiling crossbeam-utils v0.6.5
   Compiling futures-core-preview v0.3.0-alpha.12
   Compiling lock_api v0.1.5
error[E0432]: unresolved import `core::task::LocalWaker`
 --> /share/home/weiby/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/futures-core-preview-0.3.0-alpha.12/src/future/future_obj.rs:6:12
  |
6 |     task::{LocalWaker, Poll},
  |            ^^^^^^^^^^ no `LocalWaker` in `task`

error[E0432]: unresolved imports `core::task::LocalWaker`, `core::task::UnsafeWake`
 --> /share/home/weiby/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/futures-core-preview-0.3.0-alpha.12/src/task/mod.rs:8:35
  |
8 | pub use core::task::{Poll, Waker, LocalWaker, UnsafeWake};
  |                                   ^^^^^^^^^^  ^^^^^^^^^^ no `UnsafeWake` in `task`
  |                                   |
  |                                   no `LocalWaker` in `task`

error[E0432]: unresolved imports `std::task::Wake`, `std::task::local_waker`, `std::task::local_waker_from_nonlocal`
  --> /share/home/weiby/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/futures-core-preview-0.3.0-alpha.12/src/task/mod.rs:10:21
   |
10 | pub use std::task::{Wake, local_waker, local_waker_from_nonlocal};
   |                     ^^^^  ^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^ no `local_waker_from_nonlocal` in `task`
   |                     |     |
   |                     |     no `local_waker` in `task`
   |                     no `Wake` in `task`. Did you mean to use `Waker`?

   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.3
   Compiling rand_xorshift v0.1.1
   Compiling rand_isaac v0.1.1
   Compiling rand_hc v0.1.0
error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0432`.
error: Could not compile `futures-core-preview`.
warning: build failed, waiting for other jobs to finish...
error: build failed

Related issue: https://github.com/rust-lang/async-book/issues/5

@taiki-e
Copy link
Member

taiki-e commented Feb 23, 2019

Please update the version of futures-core-preview to 0.3.0-alpha.13.

Related: #1453

@weiby3
Copy link
Author

weiby3 commented Feb 23, 2019

Updated. Also not works.

[weiby@login async_server]$ cargo check
    Updating `git://mirrors.ustc.edu.cn/crates.io-index` index
error: failed to select a version for `futures-preview`.
    ... required by package `async_server v0.1.0 (/share/home/weiby/code/rust/async_server)`
versions that meet the requirements `^0.3.0-alpha.13` are: 0.3.0-alpha.13

the package `async_server` depends on `futures-preview`, with features: `tokio-compat` but `futures-preview` does not have these features.


failed to select a version for `futures-preview` which could resolve this conflict

@taiki-e
Copy link
Member

taiki-e commented Feb 23, 2019

It seems that crate is using "tokio-compat" feature which has already been deleted (see: #1433).

I think that it will work if you remove dependence on "tokio-compat" feature.

@weiby3
Copy link
Author

weiby3 commented Feb 23, 2019

OK, it seems that the async book should be updated.
Thanks!

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

No branches or pull requests

2 participants