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

subtle-2.3.0 and clear_on_drop CANNOT compile. HELP #336

Open
kaidoxue opened this issue Nov 7, 2020 · 7 comments
Open

subtle-2.3.0 and clear_on_drop CANNOT compile. HELP #336

kaidoxue opened this issue Nov 7, 2020 · 7 comments

Comments

@kaidoxue
Copy link

kaidoxue commented Nov 7, 2020

I cann't compile some packge, please help , thank you.

Output of "cargo build"

error[E0210]: type parameter T must be used as the type parameter for some local type (e.g., MyStruct<T>)
--> C:\Users\KAIDO.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\subtle-2.3.0\src\lib.rs:510:1
|
510 | impl From<CtOption> for Option {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter T must be used as the type parameter for some local type
|
= note: only traits defined in the current crate can be implemented for a type parameter

error: aborting due to previous error

For more information about this error, try rustc --explain E0210.
error: Could not compile subtle.
warning: build failed, waiting for other jobs to finish...
error: cannot find macro llvm_asm! in this scope
--> C:\Users\KAIDO.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\clear_on_drop-0.2.4\src\hide.rs:38:17
|
38 | llvm_asm!("" : : "r" (ptr as *mut u8) : "memory");
| ^^^^^^^^

error: cannot find macro llvm_asm! in this scope
--> C:\Users\KAIDO.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\clear_on_drop-0.2.4\src\hide.rs:48:17
|
48 | llvm_asm!("" : "=*m" (ptr) : "*0" (ptr));
| ^^^^^^^^

error: aborting due to 2 previous errors

error: Could not compile clear_on_drop.
warning: build failed, waiting for other jobs to finish...
error: build failed

@hdevalence
Copy link
Contributor

Hi, this is caused by the Rust 1.41 MSRV requirement on subtle. Try updating your rust version to 1.41 or above.

@kaidoxue
Copy link
Author

D:\Projects\bulletproofs-main>rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: checking for self-updates

stable-x86_64-pc-windows-msvc unchanged - rustc 1.47.0 (18bf6b4f0 2020-10-07)
nightly-x86_64-pc-windows-msvc unchanged - rustc 1.49.0-nightly (25f6938da 2020-11-09)

info: cleaning up downloads & tmp directories

My rust version maybe 1.41 or above.....but still cannot comile subtle
Please Help, Thanks @hdevalence

@kaidoxue
Copy link
Author

error[E0432]: unresolved import crate::arch::x86_64::_mm_movemask_pi8
--> C:\Users\KAIDO.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\packed_simd-0.3.3\src\codegen\reductions\mask\x86\sse.rs:62:21
|
62 | use crate::arch::x86_64::_mm_movemask_pi8;
| ^^^^^^^^^^^^^^^^^^^^^----------------
| | |
| | help: a similar name exists in the module: _mm_movemask_epi8
| no _mm_movemask_pi8 in arch::x86_64
|
::: C:\Users\KAIDO.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\packed_simd-0.3.3\src\codegen\reductions\mask.rs:52:1
|
52 | impl_mask_reductions!(m32x2);
| ----------------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

When I edit environment variety, change to 1.49-nightly. Occur the new error.....

@hdevalence
Copy link
Contributor

Hmm, does that error occur on stable rust without using the simd_backend?

@jadeydi
Copy link

jadeydi commented Dec 23, 2020

rust-lang/packed_simd#288 (comment)

I use this, then cargo test works

@kernel1983
Copy link

build passed with recent nightly and several lines deleted

~/bulletproofs$ git diff
diff --git a/rust-toolchain b/rust-toolchain
index ed6f0c1..eb726a2 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1 +1 @@
-nightly-2019-07-31
+nightly-2021-11-03
diff --git a/src/lib.rs b/src/lib.rs
index 41b1edd..0fe8004 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,8 +1,5 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 #![feature(nll)]
-#![feature(external_doc)]
-#![feature(try_trait)]
-#![deny(missing_docs)]
 #![doc(include = "../README.md")]
 #![doc(html_logo_url = "https://doc.dalek.rs/assets/dalek-logo-clear.png")]
 #![doc(html_root_url = "https://docs.rs/bulletproofs/2.0.0")]

@hdevalence
Copy link
Contributor

Hi all, the upstream for this crate is now https://github.com/zkcrypto/bulletproofs and this issue should be already fixed there.

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

4 participants