Closed sainnhe closed 2 years ago
So you have compiled the Rust binary successfully before and somehow now it failed to compile? I don't use arch, https://github.com/ogham/exa/issues/985 and https://github.com/dandavison/delta/issues/732 might be helpful.
If you really can't fix it on your side, you can work around it by disabling the libgit2 dep:
diff --git a/Cargo.toml b/Cargo.toml
index f432545b..81d0bf05 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,7 +17,7 @@ tokio = { version = "1.17", features = ["rt"] }
maple_cli = { path = "crates/maple_cli" }
[build-dependencies]
-built = { package = "built", version = "0.5", features = ["git2"] }
+built = { package = "built", version = "0.5" }
diff --git a/src/main.rs b/src/main.rs
index ddcc76ea..4947a401 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -6,9 +6,8 @@ pub mod built_info {
fn version() {
println!(
- "version {}{}, built for {} by {}.",
+ "version {}, built for {} by {}.",
built_info::PKG_VERSION,
- built_info::GIT_VERSION.map_or_else(|| "".to_owned(), |v| format!(" (git {})", v)),
built_info::TARGET,
built_info::RUSTC_VERSION
);
@@ -21,11 +20,7 @@ async fn main() -> Result<()> {
match maple.command {
Cmd::Version => version(),
Cmd::Upgrade(upgrade) => {
- let local_git_tag = built_info::GIT_VERSION.context("Failed to get GIT_VERSION")?;
- if let Err(e) = upgrade.run(local_git_tag).await {
- eprintln!("failed to upgrade: {:?}", e);
- std::process::exit(1);
- }
+ unimplemented!("Upgrade unsupported");
}
_ => {
if let Err(e) = maple.run().await {
Only the version and upgrade command will be affected, which should be fine for the daily use.
Thanks for your information!
I managed to compile the binary by cleaning build cache. The old cache seems to be linked to libgit2.so.1.3
Environment (please complete the following information):
Describe the bug
I can't build maple binary on Arch Linux, it said:
On arch linux, libgit2 is 1.4.0
Clap debug
To Reproduce Steps to reproduce the behavior:
cargo build --release
Expected behavior
Compile successfully.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.