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

on linux vps,"cargo build --release" encounter errors #900

Closed
luckypoem opened this issue Oct 24, 2019 · 2 comments
Closed

on linux vps,"cargo build --release" encounter errors #900

luckypoem opened this issue Oct 24, 2019 · 2 comments

Comments

@luckypoem
Copy link

hi.

on linux vps.
git clone https://github.com/bluejekyll/trust-dns/ trust-dns-by-bluejekyll
cd trust-dns-by-bluejekyll
cargo build --release
it shows:
...
Compiling tokio-sync v0.2.0-alpha.6
error[E0658]: async fn is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/barrier.rs:80:5
|
80 | / pub async fn wait(&self) -> BarrierWaitResult {
81 | | // NOTE: we are taking a synchronous lock here.
82 | | // It is okay to do so because the critical section is fast and never yields, so it cannot
83 | | // deadlock even if another future is concurrently holding the lock.
... |
118 | | BarrierWaitResult(false)
119 | | }
| |_____^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async/await is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/barrier.rs:113:16
|
113 | if wait.recv().await.expect("sender hasn't been closed") >= generation {
| ^^^^^^^^^^^^^^^^^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async fn is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/mpsc/bounded.rs:164:5
|
164 | / pub async fn recv(&mut self) -> Option {
165 | | use futures_util::future::poll_fn;
166 | |
167 | | poll_fn(|cx| self.poll_recv(cx)).await
168 | | }
| |_____^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async/await is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/mpsc/bounded.rs:167:9
|
167 | poll_fn(|cx| self.poll_recv(cx)).await
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async fn is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/mpsc/bounded.rs:238:5
|
238 | / pub async fn send(&mut self, value: T) -> Result<(), SendError> {
239 | | use futures_util::future::poll_fn;
240 | |
241 | | poll_fn(|cx| self.poll_ready(cx)).await?;
242 | |
243 | | self.try_send(value).map_err(|_| SendError(()))
244 | | }
| |_____^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async/await is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/mpsc/bounded.rs:241:9
|
241 | poll_fn(|cx| self.poll_ready(cx)).await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async fn is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/mpsc/unbounded.rs:134:5
|
134 | / pub async fn recv(&mut self) -> Option {
135 | | use futures_util::future::poll_fn;
136 | |
137 | | poll_fn(|cx| self.poll_recv(cx)).await
138 | | }
| |_____^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async/await is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/mpsc/unbounded.rs:137:9
|
137 | poll_fn(|cx| self.poll_recv(cx)).await
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async fn is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/mutex.rs:87:5
|
87 | / pub async fn lock(&self) -> MutexGuard<'_, T> {
88 | | let mut permit = semaphore::Permit::new();
89 | | poll_fn(|cx| permit.poll_acquire(cx, &self.s))
90 | | .await
... |
97 | | MutexGuard { lock: self, permit }
98 | | }
| |_____^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async/await is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/mutex.rs:89:9
|
89 | / poll_fn(|cx| permit.poll_acquire(cx, &self.s))
90 | | .await
| |__________________^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async fn is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/oneshot.rs:223:5
|
223 | / pub async fn closed(&mut self) {
224 | | use futures_util::future::poll_fn;
225 | |
226 | | poll_fn(|cx| self.poll_closed(cx)).await
227 | | }
| |_____^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async/await is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/oneshot.rs:226:9
|
226 | poll_fn(|cx| self.poll_closed(cx)).await
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async fn is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/watch.rs:248:5
|
248 | / pub async fn recv_ref(&mut self) -> Option<Ref<'_, T>> {
249 | | let shared = &self.shared;
250 | | let inner = &self.inner;
251 | | let version = self.ver;
... |
259 | | }
260 | | }
| |_____^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async/await is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/watch.rs:253:15
|
253 | match poll_fn(|cx| poll_lock(cx, shared, inner, version)).await {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async fn is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/watch.rs:295:5
|
295 | / pub async fn recv(&mut self) -> Option {
296 | | self.recv_ref().await.map(|v_ref| v_ref.clone())
297 | | }
| |_____^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async/await is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/watch.rs:296:9
|
296 | self.recv_ref().await.map(|v_ref| v_ref.clone())
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async fn is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/watch.rs:386:5
|
386 | / pub async fn closed(&mut self) {
387 | | poll_fn(|cx| self.poll_close(cx)).await
388 | | }
| |_____^
|
= note: for more information, see rust-lang/rust#50547

error[E0658]: async/await is unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-sync-0.2.0-alpha.6/src/watch.rs:387:9
|
387 | poll_fn(|cx| self.poll_close(cx)).await
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see rust-lang/rust#50547

error: aborting due to 18 previous errors

For more information about this error, try rustc --explain E0658.
error: Could not compile tokio-sync.
warning: build failed, waiting for other jobs to finish...
error: build failed

how to fix it?

@bluejekyll
Copy link
Member

Which compiler version are you using? Master currently needs either 'beta' or 'nightly', until 1.39 is released to stable.

@luckypoem
Copy link
Author

i see.
rustup install nightly
rustup default nightly
rustup update

then:
cargo build --release

that's done.

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