maxcurzi / tplay

A terminal ASCII media player. View images, gifs, videos, webcam, YouTube, etc.. directly in the terminal as ASCII art.
MIT License
208 stars 13 forks source link

[BUG] released version Cargo.lock is out of date #26

Closed colemickens closed 9 months ago

colemickens commented 9 months ago

Describe the bug

I'm picking up my effort to package this for nixpkgs, but:

       > Executing cargoSetupPostPatchHook
       > Validating consistency between /build/source/Cargo.lock and /build/tplay-0.4.5-vendor.tar.gz/Cargo.lock
       > Finished cargoSetupPostPatchHook
       > updateAutotoolsGnuConfigScriptsPhase
       > configuring
       > building
       > Executing cargoBuildHook
       > ++ env CC_x86_64-unknown-linux-gnu=/nix/store/75slks1wr3b3sxr5advswjzg9lvbv9jc-gcc-wrapper-12.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/75slks1wr3b3sxr5advswjzg9lvbv9jc-gcc-wrapper-12.3.0/bin/c++ CC_x86_64-unknown-linux-gnu=/nix/store/75slks1wr3b3sxr5advswjzg9lvbv9jc-gcc-wrapper-12.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/75slks1wr3b3sxr5advswjzg9lvbv9jc-gcc-wrapper-12.3.0/bin/c++ cargo build -j 16 --target x86_64-unknown-linux-gnu --frozen --release
       > error: the lock file /build/source/Cargo.lock needs to be updated but --frozen was passed to prevent this
       > If you want to try to generate the lock file without accessing the network, remove the --frozen flag and use --offline instead.

The key part: error: the lock file /build/source/Cargo.lock needs to be updated but --frozen was passed to prevent this

maxcurzi commented 9 months ago

@colemickens I'm not sure how I can fix this on my end.

I can see that the --frozen flag is passed to it in the command cargoBuildHook, is that part of the Nix package manager? If you can control that try to remove the --frozen flag and try again

   > ++ env CC_x86_64-unknown-linux-gnu=/nix/store/75slks1wr3b3sxr5advswjzg9lvbv9jc-gcc-wrapper-12.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/75slks1wr3b3sxr5advswjzg9lvbv9jc-gcc-wrapper-12.3.0/bin/c++ CC_x86_64-unknown-linux-gnu=/nix/store/75slks1wr3b3sxr5advswjzg9lvbv9jc-gcc-wrapper-12.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/75slks1wr3b3sxr5advswjzg9lvbv9jc-gcc-wrapper-12.3.0/bin/c++ cargo build -j 16 --target x86_64-unknown-linux-gnu --frozen --release
colemickens commented 9 months ago

Sorry, I should've been more explicit. Simply regenerating and checking in the Cargo.lock is sufficient to bypass this problem. However, I can't figure out how to get opencv+clang+rust to cooperate. (If you're curious: https://github.com/NixOS/nixpkgs/pull/229526, but it's almost certainly a Nix/my ignorance problem)

maxcurzi commented 9 months ago

ah I see, I may have forgotten to run cargo update after the latest changes, I'll refresh the cargo lock now

maxcurzi commented 9 months ago

@colemickens done. I'll close this issue for now, let me know if there are other problems :)

maxcurzi commented 9 months ago

ah wait, does it mean I need to re-publish the crate?

colemickens commented 9 months ago

We (nixpkgs) prefer to point to tagged versions, but since I'm blocked on the build issue I mentioned, there's no rush. And in the meantime I can simply pin to the latest git revision.

colemickens commented 9 months ago

I'd consider this closed, unless you want to dive into Nix and fix the hairy build issue :wink: . Either way, closing this. Thanks for the fast turn-around!

maxcurzi commented 9 months ago

Sorry, I should've been more explicit. Simply regenerating and checking in the Cargo.lock is sufficient to bypass this problem. However, I can't figure out how to get opencv+clang+rust to cooperate. (If you're curious: NixOS/nixpkgs#229526, but it's almost certainly a Nix/my ignorance problem)

OpenCV was a big headache for me too, if you don't get every duck in a row it's a path of pain! I'll look into it but I doubt I will be of help

maxcurzi commented 8 months ago

@colemickens did you try by any chance to install libstdc++-12-dev as part of the dependencies? It was reported (#27) to resolve installation errors related to OpenCV ( not the same as yours but you never know..)