Code Monkey home page Code Monkey logo

Comments (5)

tan-wei avatar tan-wei commented on June 9, 2024 1

Sorry for not giving the compile environment. For me, I use:

  • Ubuntu 22.40
  • rust version 1.71.0-nightly (74c482104 2023-05-04)

Both cargo install select and cargo install --git https://github.com/jhspetersson/fselect.git will cause the same error. And i can confirm that mp4parse 0.12.0 could not be compiled, but not 0.17.0.

from fselect.

tan-wei avatar tan-wei commented on June 9, 2024 1

OK, it is the reason indeed. Thanks, I've successfully built. Thus the issue should be closed.

from fselect.

jhspetersson avatar jhspetersson commented on June 9, 2024

Hi, just checked that fselect compiles successfully on Ubuntu 22 LTS and Win11. What's your OS/compiler/Rust version?

Please make sure that you use the latest version of Rust:

rustup update

As for mp4parse, there are no plans to vendor the latest 0.17.0 version, I guess fselect will stick to the latest release version of that.

from fselect.

tan-wei avatar tan-wei commented on June 9, 2024

The error message would be:

   ...
   Compiling chrono-english v0.1.7
   Compiling mp4parse v0.12.0
error[E0277]: cannot multiply `u64` by `NonZeroU8`
    --> /home/winterreise/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mp4parse-0.12.0/src/lib.rs:2547:62
     |
2547 |                 static_assertions::const_assert!(<$lhs>::MAX * <$rhs>::MAX <= <$output>::MAX);
     |                                                              ^ no implementation for `u64 * NonZeroU8`
...
2557 | impl_mul!((U8, std::num::NonZeroU8) => (U16, u16));
     | -------------------------------------------------- in this macro invocation
     |
     = help: the trait `Mul<NonZeroU8>` is not implemented for `u64`
     = help: the following other types implement trait `Mul<Rhs>`:
               <&'a u64 as Mul<u64>>
               <&u64 as Mul<&u64>>
               <u64 as Mul<&u64>>
               <u64 as Mul>
     = note: this error originates in the macro `impl_mul` (in Nightly builds, run with -Z macro-backtrace for more info)

   Compiling csv v1.2.1
note: erroneous constant used
    --> /home/winterreise/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mp4parse-0.12.0/src/lib.rs:2557:1
     |
2557 | impl_mul!((U8, std::num::NonZeroU8) => (U16, u16));
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: this note originates in the macro `static_assertions::const_assert` which comes from the expansion of the macro `impl_mul` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: cannot multiply `u64` by `NonZeroU8`
    --> /home/winterreise/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mp4parse-0.12.0/src/lib.rs:2547:62
     |
2547 |                 static_assertions::const_assert!(<$lhs>::MAX * <$rhs>::MAX <= <$output>::MAX);
     |                                                              ^ no implementation for `u64 * NonZeroU8`
...
2558 | impl_mul!((U32, std::num::NonZeroU8) => (U32MulU8, u64));
     | -------------------------------------------------------- in this macro invocation
     |
     = help: the trait `Mul<NonZeroU8>` is not implemented for `u64`
     = help: the following other types implement trait `Mul<Rhs>`:
               <&'a u64 as Mul<u64>>
               <&u64 as Mul<&u64>>
               <u64 as Mul<&u64>>
               <u64 as Mul>
     = note: this error originates in the macro `impl_mul` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant used
    --> /home/winterreise/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mp4parse-0.12.0/src/lib.rs:2558:1
     |
2558 | impl_mul!((U32, std::num::NonZeroU8) => (U32MulU8, u64));
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: this note originates in the macro `static_assertions::const_assert` which comes from the expansion of the macro `impl_mul` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.
error: could not compile `mp4parse` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `fselect v0.8.2 (https://github.com/jhspetersson/fselect.git#0ed03864)`, intermediate artifacts can be found at `/tmp/cargo-installRwSv9L`

from fselect.

jhspetersson avatar jhspetersson commented on June 9, 2024

Oh, I see, indeed, fselect fails to compile on Rust nightly. And not only that crate has this problem. So for now I can suggest switch to stabe:

rustup default stable

and build the project that way.

Thank you very much for the issue! It actually is a warning :) I might have to exclude mp4parse and other crates if they keep breaking with the future versions of Rust...

from fselect.

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.