Hi Guix Maintainers,
The Guix package `rust-cargo-c` (version `0.10.5+cargo-0.83.0`) fails to build
during the `build` phase with a dependency resolution error for the `bstr`
crate.
**Error Message:**
```
starting phase `build'
warning:
`/tmp/guix-build-rust-cargo-c-0.10.5+cargo-0.83.0.drv-0/cargo-c-0.10.5+cargo-0.83.0/.cargo/config`
is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to
`config.toml`
warning:
`/tmp/guix-build-rust-cargo-c-0.10.5+cargo-0.83.0.drv-0/cargo-c-0.10.5+cargo-0.83.0/.cargo/config`
is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to
`config.toml`
error: failed to select a version for the requirement `bstr = "^1.12.0"`
candidate versions found which didn't match: 1.11.1
location searched: directory source
`/tmp/guix-build-rust-cargo-c-0.10.5+cargo-0.83.0.drv-0/cargo-c-0.10.5+cargo-0.83.0/guix-vendor`
(which is replacing registry `crates-io`)
required by package `gix-path v0.10.18`
... which satisfies dependency `gix-path = "^0.10.9"` of package `gix
v0.64.0`
... which satisfies dependency `gix = "^0.64.0"` of package `cargo v0.83.0`
... which satisfies dependency `cargo = "^0.83.0"` of package `cargo-c
v0.10.5+cargo-0.83.0
(/tmp/guix-build-rust-cargo-c-0.10.5+cargo-0.83.0.drv-0/cargo-c-0.10.5+cargo-0.83.0)`
perhaps a crate was updated and forgotten to be re-vendored?
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "cargo" arguments: ("build" "-j" "4"
"--release") exit-status: 101 term-signal: #f stop-signal: #f>
phase `build' failed after 0.9 seconds
command "cargo" "build" "-j" "4" "--release" failed with status 101
build process 6 exited with status 256
```
**Detailed Dependency Chain and Problem Analysis:**
The requirement for `bstr = "^1.12.0"` originates from the Rust crate `gix-path
v0.10.18`. The issue stems from the vendored dependencies provided by the chain
of Guix packages:
1. **`rust-cargo-c` (Guix Package)**: Version `0.10.5+cargo-0.83.0`.
* Depends on: `rust-cargo` (Guix Package).
2. **`rust-cargo` (Guix Package)**: Version `0.83.0` (defined in
`gnu/packages/rust-apps.scm`).
* Provides sources for Rust crate `cargo v0.83.0`.
* Its `#:cargo-inputs` list includes `("rust-gix" ,rust-gix-0.64)`.
3. **`rust-gix-0.64` (Guix Package)**: (Defined in
`gnu/packages/crates-vcs.scm`).
* Provides sources for Rust crate `gix v0.64.0`.
* Its `#:cargo-inputs` list includes `("rust-gix-path"
,rust-gix-path-0.10)`. This Scheme variable `,rust-gix-path-0.10` resolves to
the Guix package `rust-gix-path-0.10.18`.
4. **`rust-gix-path-0.10.18` (Guix Package)**: (Variable aliased as
`rust-gix-path-0.10`, defined in `gnu/packages/crates-vcs.scm` with `(version
"0.10.18")`).
* Provides sources for Rust crate `gix-path v0.10.18`.
* Its `#:cargo-inputs` list includes `("rust-bstr" ,rust-bstr-1)`.
5. **`rust-bstr-1` (Guix Package)**: (Defined in `gnu/packages/crates-io.scm`).
* This Guix package definition has `(version "1.11.1")`. This is also
consistent with the definition found in the Guix `master` branch (see
[https://codeberg.org/guix/guix/src/branch/master/gnu/packages/crates-io.scm#L9390](https://codeberg.org/guix/guix/src/branch/master/gnu/packages/crates-io.scm#L9390)
which defines `rust-bstr-1` as version `1.11.1`).
* Therefore, it provides `bstr v1.11.1` to the build environment.
**Conflict:**
The Rust crate `gix-path v0.10.18` (provided by the Guix package
`rust-gix-path-0.10.18`) requires `bstr = "^1.12.0"`.
However, the Guix package `rust-gix-path-0.10.18` is configured via its
`#:cargo-inputs` to use the Guix package `rust-bstr-1`, which provides `bstr
v1.11.1`.
`bstr v1.11.1` does not satisfy the `^1.12.0` requirement, leading to the build
failure.
**Suggested Action:**
The Guix package `rust-gix-path-0.10.18` needs to have its `#:cargo-inputs`
updated to use a version of `bstr` that satisfies `^1.12.0`. This will likely
involve:
1. Ensuring a Guix package for `bstr` version `1.12.x` (or the specific
version locked by `gix-path v0.10.18`'s `Cargo.lock`) is available. If not
already present in Guix, this new version of `rust-bstr` will need to be
packaged.
2. Re-running the crate vendoring process for the `rust-gix-path-0.10.18` Guix
package (or updating its `#:cargo-inputs` manually) to reference this newer
`bstr` Guix package.
This should resolve the dependency conflict and allow `rust-cargo-c` to build
successfully.
Please let me know if any further information or clarification is needed.