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

cargo-c:Unable to pass compilation. #3658

Open
lhw828 opened this issue Feb 27, 2024 · 3 comments
Open

cargo-c:Unable to pass compilation. #3658

lhw828 opened this issue Feb 27, 2024 · 3 comments

Comments

@lhw828
Copy link
Contributor

lhw828 commented Feb 27, 2024

Compiling git2-curl v0.19.0
Compiling gix-protocol v0.42.0
Compiling gix v0.56.0
error[E0425]: cannot find function du in crate cargo_util
--> /root/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/cargo-0.77.0/src/cargo/core/global_cache_tracker.rs:1212:36
|
1212 | let size = cargo_util::du(&base.git_db.join(&info.3), &[])?;
| ^^ not found in cargo_util
|
help: consider importing this function
|
117 + use crate::core::global_cache_tracker::du;
|
help: if you import du, refer to it directly
|
1212 - let size = cargo_util::du(&base.git_db.join(&info.3), &[])?;
1212 + let size = du(&base.git_db.join(&info.3), &[])?;
|

error[E0425]: cannot find function du in crate cargo_util
--> /root/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/cargo-0.77.0/src/cargo/core/global_cache_tracker.rs:1818:17
|
1818 | cargo_util::du(&path, &["!.git"])
| ^^ not found in cargo_util

error[E0425]: cannot find function du in crate cargo_util
--> /root/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/cargo-0.77.0/src/cargo/core/global_cache_tracker.rs:1825:21
|
1825 | cargo_util::du(&path, &[])
| ^^ not found in cargo_util

For more information about this error, try rustc --explain E0425.
error: could not compile cargo (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile cargo-c v0.9.30+cargo-0.77.0 (/usr/src/cargo-c-0.9.30), intermediate artifacts can be found at /usr/src/cargo-c-0.9.30/target.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.

@stumbles
Copy link
Member

You might try compiling it again and/or moving to /root and;

rm -rf .cargo/registry

and give lin another go. It seems if a couple of days have passed after an initial compile of cargo-c , it will download new versions of its stuff. Here locally its been 4 days since I last compiled cargo-c and just to check all is fine, it downloaded ~100 new crate versions.

@lhw828
Copy link
Contributor Author

lhw828 commented Feb 27, 2024

ok,got it~Thanks!

@lhw828
Copy link
Contributor Author

lhw828 commented Feb 27, 2024

rust-lang/cargo#13493

It seems that this problem is widespread.

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

2 participants