[英]Cargo build failed: could not find macro `llvm_asm` in this scope
我正在嘗試構建rust-fractal-gui ,但構建總是失敗並出現以下錯誤:
$ cargo build --release
...
Compiling parking_lot v0.11.2
error: cannot find macro `llvm_asm` in this scope
--> /home/riley/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot-0.11.2/src/elision.rs:77:13
|
77 | llvm_asm!("xacquire; lock; cmpxchgq $2, $1"
| ^^^^^^^^
error: cannot find macro `llvm_asm` in this scope
--> /home/riley/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot-0.11.2/src/elision.rs:108:13
|
108 | llvm_asm!("xrelease; lock; xaddq $2, $1"
| ^^^^^^^^
error[E0635]: unknown feature `llvm_asm`
--> /home/riley/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot-0.11.2/src/lib.rs:14:42
|
14 | #![cfg_attr(feature = "nightly", feature(llvm_asm))]
| ^^^^^^^^
For more information about this error, try `rustc --explain E0635`.
error: could not compile `parking_lot` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
rustup show
的輸出:
rustup home: /home/riley/.rustup
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
1.48.0-x86_64-unknown-linux-gnu
active toolchain
----------------
nightly-x86_64-unknown-linux-gnu (directory override for '/home/riley/projects/rust-fractal-gui')
rustc 1.64.0-nightly (c2f428d2f 2022-07-14)
我已經使用rustup update nightly
將我的 nightly 工具鏈更新到最新版本,然后rustup override set nightly
看到這個問題,但它沒有解決這個問題。
從rustc-nightly-2022-01-17
,宏llvm_asm
被刪除,取而代之的是新的asm
宏。 rust-fractal-gui
使用了一個過時的parking_lot
版本,它仍然使用llvm_asm
宏,導致了這個錯誤。 此后合並了一個PR以解決該問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.