error: no matching package named `libc` found
location searched: directory source `/usr/share/cargo/registry` (which is replacing registry `crates-io`)
required by package `ddnet-base v0.0.1 (/builddir/build/BUILD/ddnet-19.9-build/ddnet-19.9/src/base)`
help: packages with similar names: cc
note: offline mode (via `--offline`) can sometimes cause surprising resolution failures
help: if this error is too confusing you may wish to retry without `--offline`
[[package]]
name = “libc”
version = “0.2.183”
source = “registry+https://github.com/rust-lang/crates.io-index”
checksum = “b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d”
I tried specifying BuildRequires rust-libc, BuildRequires rust-libc-devel, but it didn’t work to find libc dependency
I also tried using %cargo_generate_buildrequires macro in the %generate_buildrequires scriptlet as per Rust Packaging Guidelines and it stops showing libc as not found, but it still fails with:
error: cannot create the lock file /builddir/build/BUILD/ddnet-19.9-build/ddnet-19.9/Cargo.lock because --locked was passed to prevent this
help: to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.
$ dnf info rust-libc-devel
Updating and loading repositories:
Repositories loaded.
Available packages
Name : rust-libc-devel
Epoch : 0
Version : 0.2.186
...
I cannot recall how cargo.lock works.
Try changing the version to 0.2.186 and see if that works.
It still fails for me, now with the following error message:
build DDNET_TEST_NO_LINK=1 /usr/bin/cargo build --offline --manifest-path /builddir/build/BUILD/ddnet-19.9-build/ddnet-19.9/Cargo.toml --profile relwithdebinfo
error: failed to select a version for the requirement `cxx = "=1.0.194"`
candidate versions found which didn't match: 1.0.197
location searched: directory source `/usr/share/cargo/registry` (which is replacing registry `crates-io`)
required by package `ddnet-base v0.0.1 (/builddir/build/BUILD/ddnet-19.9-build/ddnet-19.9/src/base)`
note: perhaps a crate was updated and forgotten to be re-vendored?
note: offline mode (via `--offline`) can sometimes cause surprising resolution failures
help: if this error is too confusing you may wish to retry without `--offline`