Cannot compile the ring crate: file not found for module `montgomery`

99封情书 提交于 2019-12-24 00:43:23

问题


Cargo is not compiling with the following error:

$ cargo build
Compiling ring v0.12.1
error[E0583]: file not found for module `montgomery`
    --> 
 C:\Users\jmccrae\.cargo\registry\src\github.com1ecc6299db9ec823\ring-0.12.1\src\arithmetic/arithmetic.rs:15:9
   |
15 | pub mod montgomery;
   |         ^^^^^^^^^^
   |
   = help: name the file either arithmetic\montgomery.rs or arithmetic\montgomery\mod.rs inside the directory 
"C:\\Users\\jmccrae\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\ring-0.12.1\\src\\arithmetic"

The project was a new project with Cargo.toml modified to include a dependency to the most recent version (0.12.1) of the ring crate. The Cargo.toml is as follows:

[package]
name = "testring"
version = "0.1.0"
authors = ["John McCrae <john@mccr.ae>"]

[dependencies]
ring = "0.12.1"

The required file seems to actually exist:

$ ls  C:\\Users\\jmccrae\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\ring-0.12.1\\src\\arithmetic
arithmetic.rs  montgomery.rs

The cargo version is cargo 0.25.0-nightly (930f9d949 2017-12-05) and it is running on MINGW.

Is there anything wrong with the compiler set-up?


回答1:


This is an issue with Ring and Rust 1.24.0-nightly (2017-12-21). It also has an associated issue in the Rust repository.

To work around it, use an older version of Rust nightly (or avoid nightly if you can).



来源:https://stackoverflow.com/questions/47941738/cannot-compile-the-ring-crate-file-not-found-for-module-montgomery

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!