无法使用YAML功能来制作锈拍

发布于 2025-01-23 14:27:32 字数 1958 浏览 4 评论 0原文

我正在尝试使用拍手的YAML功能构建,但在这里错误。

   Compiling clap v3.1.12
    Building [========================>  ] 44/47: clap, yaml-rust     
error: could not compile `clap`

Caused by:
  process didn't exit successfully: `rustc --crate-name clap --edition=2018 /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.1.12/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="atty"' --cfg 'feature="color"' --cfg 'feature="default"' --cfg 'feature="std"' --cfg 'feature="strsim"' --cfg 'feature="suggestions"' --cfg 'feature="termcolor"' --cfg 'feature="yaml"' --cfg 'feature="yaml-rust"' -C metadata=c304c427904608a0 -C extra-filename=-c304c427904608a0 --out-dir /home/ubuntu/Fuzzer/fuzzer/target/release/deps -L dependency=/home/ubuntu/Fuzzer/fuzzer/target/release/deps --extern atty=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libatty-a738dbd9b3c63306.rmeta --extern bitflags=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libbitflags-32a2c4a16da85e35.rmeta --extern clap_lex=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libclap_lex-9fd816bdd1aa0a27.rmeta --extern indexmap=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libindexmap-2a2b92386f84cd5f.rmeta --extern strsim=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libstrsim-aa9e0b1c28b1955e.rmeta --extern termcolor=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libtermcolor-d93b521b81ab3f3d.rmeta --extern textwrap=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libtextwrap-455b4f0f719538f2.rmeta --extern yaml_rust=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libyaml_rust-176b9c782134aa71.rmeta --cap-lints allow` (signal: 9, SIGKILL: kill)

请建议

这是我在货物中的依赖性。

[dependencies]
rand = "0.8.4"
libc = "0.2.122"
rand_chacha = "0.3.1"
rand_pcg = "0.3.1"
rayon = "1.5.2" 
clap = { version = "3.1.12", features = ["yaml"] }

I am trying to build with the Clap Yaml feature, but it errors out here.

   Compiling clap v3.1.12
    Building [========================>  ] 44/47: clap, yaml-rust     
error: could not compile `clap`

Caused by:
  process didn't exit successfully: `rustc --crate-name clap --edition=2018 /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.1.12/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="atty"' --cfg 'feature="color"' --cfg 'feature="default"' --cfg 'feature="std"' --cfg 'feature="strsim"' --cfg 'feature="suggestions"' --cfg 'feature="termcolor"' --cfg 'feature="yaml"' --cfg 'feature="yaml-rust"' -C metadata=c304c427904608a0 -C extra-filename=-c304c427904608a0 --out-dir /home/ubuntu/Fuzzer/fuzzer/target/release/deps -L dependency=/home/ubuntu/Fuzzer/fuzzer/target/release/deps --extern atty=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libatty-a738dbd9b3c63306.rmeta --extern bitflags=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libbitflags-32a2c4a16da85e35.rmeta --extern clap_lex=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libclap_lex-9fd816bdd1aa0a27.rmeta --extern indexmap=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libindexmap-2a2b92386f84cd5f.rmeta --extern strsim=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libstrsim-aa9e0b1c28b1955e.rmeta --extern termcolor=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libtermcolor-d93b521b81ab3f3d.rmeta --extern textwrap=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libtextwrap-455b4f0f719538f2.rmeta --extern yaml_rust=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libyaml_rust-176b9c782134aa71.rmeta --cap-lints allow` (signal: 9, SIGKILL: kill)

Please advise

Here is what my dependencies in the Cargo.toml file look like:

[dependencies]
rand = "0.8.4"
libc = "0.2.122"
rand_chacha = "0.3.1"
rand_pcg = "0.3.1"
rayon = "1.5.2" 
clap = { version = "3.1.12", features = ["yaml"] }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

弱骨蛰伏 2025-01-30 14:27:33

您显示的内容没有错,但是有些东西正在杀死生锈的编译器。

您是在Raspberry Pi或类似计算机上运行,​​内存非常有限?如果是这样,则可能在编译期间用完了内存,而Linux“ OOM杀手”决定编译器是要停止的失控过程。

您可以通过创建a nofollow noreferrer“> cargo configuration file )这是不是 cargo.toml)和设置

[build]
jobs = 1 

以避免尝试一次编译多个板条箱。如果您还没有设置交换分区,则可能还需要(警告:这可能会迅速磨损SD卡;如果可能的话,请插入SSD或硬盘驱动器)。

There is nothing wrong with what you've shown, but something is killing the Rust compiler.

Are you running on a Raspberry Pi or similar computer with very limited memory? If so, likely you are running out of memory during the compilation, and the Linux “OOM killer” is deciding that the compiler is a runaway process to be stopped.

You can reduce the maximum memory required by creating a Cargo configuration file (this is not Cargo.toml) and setting

[build]
jobs = 1 

to avoid trying to compile multiple crates at once. Setting up a swap partition, if you do not already have one, may also be necessary (warning: this can wear out SD cards quickly; plug in a SSD or hard drive if possible).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文