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

🐛 Can’t install version v0.18.1 due to log crate build error #1836

Closed
hood opened this issue Aug 31, 2024 · 2 comments
Closed

🐛 Can’t install version v0.18.1 due to log crate build error #1836

hood opened this issue Aug 31, 2024 · 2 comments

Comments

@hood
Copy link

hood commented Aug 31, 2024

Getting this error when trying to update running cargo install git-delta to update to v0.18.1 from v0.17.0 on OSX:

   Compiling log v0.4.22
   Compiling serde_json v1.0.127
error: couldn't read /Users/me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/log-0.4.22/src/serde.rs: Operation not permitted (os error 1)
   --> /Users/me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/log-0.4.22/src/lib.rs:395:1
    |
395 | mod serde;
    | ^^^^^^^^^^

error: could not compile `log` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `git-delta v0.18.1`, intermediate artifacts can be found at `/var/folders/f1/gs08vvcn5k5_jcjkr3f19f5w0000gp/T/cargo-installYPYI1p`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

System info:

cargo 1.80.1 (376290515 2024-07-16)
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000
@th1000s
Copy link
Collaborator

th1000s commented Sep 2, 2024

FTR, usually these weird build errors on install can be fixed by using cargo install --locked git-delta. This makes cargo use the exact version numbers of the used libraries, and not use semver to find more-or-less compatible versions.

But this looks like a local problem: serde.rs: Operation not permitted (os error 1). Try deleting log-0.4.22 or even the entire registry folder in .cargo. Or see why you don't have permission to read files in your own home folder.

@dandavison
Copy link
Owner

Closing since probably no delta development needed, but let us know if you still have problems @hood.

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

3 participants