Coder Social home page Coder Social logo

Comments (6)

rubdos avatar rubdos commented on August 16, 2024

Nightly Rust is usually pinned to a version. rust-toolchain currently lists nightly-2019-07-31 for this crate.

from bulletproofs.

ercembu avatar ercembu commented on August 16, 2024

After moving to the pinned version, now i'm getting errors about the dependencies.

$ cargo check
    Updating crates.io index
    Checking subtle v2.4.1
   Compiling proc-macro2 v1.0.49
    Checking packed_simd_2 v0.3.8
    Checking clear_on_drop v0.2.5
    Checking sha3 v0.8.2
    Checking rand v0.7.3
error[E0658]: use of unstable library feature 'asm': inline assembly is not stable enough for use and is subject to change
  --> /home/bulut/.cargo/registry/src/github.com-1ecc6299db9ec823/clear_on_drop-0.2.5/src/hide.rs:41:17
   |
41 |                 asm!("/* {0} */", in(reg) (ptr as *mut u8), options(nostack));
   |                 ^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/29722
   = help: add `#![feature(asm)]` to the crate attributes to enable

error[E0660]: malformed inline assembly
  --> /home/bulut/.cargo/registry/src/github.com-1ecc6299db9ec823/clear_on_drop-0.2.5/src/hide.rs:41:17
   |
41 |                 asm!("/* {0} */", in(reg) (ptr as *mut u8), options(nostack));
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0658]: use of unstable library feature 'asm': inline assembly is not stable enough for use and is subject to change
  --> /home/bulut/.cargo/registry/src/github.com-1ecc6299db9ec823/clear_on_drop-0.2.5/src/hide.rs:51:17
   |
51 |                 asm!("/* {0} */", in(reg) ptr, options(nostack));
   |                 ^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/29722
   = help: add `#![feature(asm)]` to the crate attributes to enable

error[E0660]: malformed inline assembly
  --> /home/bulut/.cargo/registry/src/github.com-1ecc6299db9ec823/clear_on_drop-0.2.5/src/hide.rs:51:17
   |
51 |                 asm!("/* {0} */", in(reg) ptr, options(nostack));
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0432]: unresolved import `core::arch::asm`
  --> /home/bulut/.cargo/registry/src/github.com-1ecc6299db9ec823/clear_on_drop-0.2.5/src/hide.rs:30:9
   |
30 |     use core::arch::asm;
   |         ^^^^^^^^^^^^^^^ no `asm` in `arch`

error[E0658]: specialization is unstable
  --> /home/bulut/.cargo/registry/src/github.com-1ecc6299db9ec823/clear_on_drop-0.2.5/src/hide.rs:38:9
   |
38 | /         default fn hide_mem_impl(ptr: *mut Self) {
39 | |             unsafe {
40 | |                 //llvm_asm!("" : : "r" (ptr as *mut u8) : "memory");
41 | |                 asm!("/* {0} */", in(reg) (ptr as *mut u8), options(nostack));
42 | |             }
43 | |         }
   | |_________^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/31844
   = help: add `#![feature(specialization)]` to the crate attributes to enable

error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
   --> /home/bulut/.cargo/registry/src/github.com-1ecc6299db9ec823/subtle-2.4.1/src/lib.rs:575:1
    |
575 | impl<T> From<CtOption<T>> for Option<T> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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[E0119]: conflicting implementations of trait `hide::impls::HideMemImpl`:
  --> /home/bulut/.cargo/registry/src/github.com-1ecc6299db9ec823/clear_on_drop-0.2.5/src/hide.rs:46:5
   |
36 |     impl<T: ?Sized> HideMemImpl for T {
   |     --------------------------------- first implementation here
...
46 |     impl<T: Sized> HideMemImpl for T {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation

error: aborting due to 7 previous errors

Some errors have detailed explanations: E0119, E0432, E0658.
For more information about an error, try `rustc --explain E0119`.
error: Could not compile `clear_on_drop`.
warning: build failed, waiting for other jobs to finish...
error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /home/bulut/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.49/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0635`.
error: Could not compile `proc-macro2`.
warning: build failed, waiting for other jobs to finish...
error: type parameters must be declared prior to const parameters
  --> /home/bulut/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.8/src/codegen/llvm.rs:20:54
   |
20 | pub unsafe fn __shuffle_vector2<const IDX: [u32; 2], T, U>(x: T, y: T) -> U
   |                                ----------------------^--^- help: reorder the parameters: lifetimes, then types: `<T, U, const IDX: [u32; 2]>`

error: aborting due to previous error

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

Since there is no other dependency added to cargo but bulletproof, im guessing it's still a crate issue

from bulletproofs.

rubdos avatar rubdos commented on August 16, 2024

You'll have to find out what version of packed_simd_2 you need, which was compatible with that Rust nightly version. A good first guess is by looking at crates.io at the release time of the nightly version, and try some around that time. cargo update -p [lib name] --precise [version number] is your friend from there.

from bulletproofs.

ercembu avatar ercembu commented on August 16, 2024

It doesn't seem to be only for packed_simd_2,
Isn't this a bug then?
A crate published publicly shouldn't be this much of a hassle to actually get up and running.
It actually means in every new environment for an experiment that uses this library is going to need special package updates.
Why not actually put them in a script yourselves?

from bulletproofs.

ercembu avatar ercembu commented on August 16, 2024

And downgrading to old packages from the time of nightly just produces more dependency issues, and in the end returns to proc-macro2 not being compiled. Maybe a lock system?

from bulletproofs.

ercembu avatar ercembu commented on August 16, 2024

rustup default nightly-2022-07-24 && rustup target add wasm32-unknown-unknown
actually fixes everything

from bulletproofs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.