[GH-ISSUE #900] on linux vps,"cargo build --release" encounter errors #559

Closed
opened 2026-03-15 23:08:30 +03:00 by kerem · 2 comments
Owner

Originally created by @luckypoem on GitHub (Oct 24, 2019).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/900

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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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?

Originally created by @luckypoem on GitHub (Oct 24, 2019). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/900 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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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<T> { 165 | | use futures_util::future::poll_fn; 166 | | 167 | | poll_fn(|cx| self.poll_recv(cx)).await 168 | | } | |_____^ | = note: for more information, see https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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<T> { 135 | | use futures_util::future::poll_fn; 136 | | 137 | | poll_fn(|cx| self.poll_recv(cx)).await 138 | | } | |_____^ | = note: for more information, see https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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<T> { 296 | | self.recv_ref().await.map(|v_ref| v_ref.clone()) 297 | | } | |_____^ | = note: for more information, see https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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?
kerem closed this issue 2026-03-15 23:08:35 +03:00
Author
Owner

@bluejekyll commented on GitHub (Oct 24, 2019):

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

<!-- gh-comment-id:545982742 --> @bluejekyll commented on GitHub (Oct 24, 2019): Which compiler version are you using? Master currently needs either 'beta' or 'nightly', until 1.39 is released to stable.
Author
Owner

@luckypoem commented on GitHub (Oct 24, 2019):

i see.
rustup install nightly
rustup default nightly
rustup update

then:
cargo build --release

that's done.

<!-- gh-comment-id:546017633 --> @luckypoem commented on GitHub (Oct 24, 2019): i see. rustup install nightly rustup default nightly rustup update then: cargo build --release that's done.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#559
No description provided.