Open
Description
Problem
Cargo can't clone/update a git submodule of dependency, for example redbpf
crate, which contains submodule libbpf
.
Steps
cargo new cargo_issue_git_submodule
cd cargo_issue_git_submodule
echo 'redbpf = { git = "https://github.com/foniod/redbpf" }' >> Cargo.toml
cargo check
And we will get an error:
error: failed to get `redbpf` as a dependency of package `cargo_issue_git_submodule v0.1.0 (/home/user/cargo_issue_git_submodule)`
Caused by:
failed to load source for dependency `redbpf`
Caused by:
Unable to update https://github.com/foniod/redbpf
Caused by:
failed to update submodule `bpf-sys/libbpf`
Caused by:
object not found - no match for id (5a10cd2060c19959e2c55ee33421baa358c09c0b); class=Odb (9); code=NotFound (-3)
Possible Solution(s)
Update submodule manually in ~/.cargo/git/checkouts/redbpf-HASH/b81f069/bpf-sys/libbpf
.
Notes
cargo version
: cargo 1.55.0
commit of cargo
: 4c27c96