Skip to content

subtle-2.3.0 and clear_on_drop CANNOT compile. HELP #336

Description

@kaidoxue

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

Activity

  1. hdevalence commented on Nov 9, 2020

    @hdevalence
    Contributor

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

  2. kaidoxue commented on Nov 10, 2020

    @kaidoxue
    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

  3. kaidoxue commented on Nov 10, 2020

    @kaidoxue
    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.....

  4. hdevalence commented on Nov 10, 2020

    @hdevalence
    Contributor

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

  5. jadeydi commented on Dec 23, 2020

    @jadeydi

    rust-lang/packed_simd#288 (comment)

    I use this, then cargo test works

  6. kernel1983 commented on Nov 3, 2021

    @kernel1983

    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")]
    
  7. hdevalence commented on Nov 9, 2021

    @hdevalence
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions