Skip to content

DLPX-93311 24.04 LTS upgrade: kernel builds continue to fail due to rustc conflict #23

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

Conversation

palash-gandhi
Copy link

@palash-gandhi palash-gandhi commented Feb 6, 2025

Problem

#21 failed to resolve a dependency conflict that was seen while building the kernel packages on 24.04. The latest build failures still show the same conflict:

19:58:06  Starting 2 pkgProblemResolver with broken count: 1
19:58:06  Investigating (0) delphix-rust:amd64 < 1.80.0-1delphix.2025.01.31.14.59 @ii K Ib >
19:58:06  Broken delphix-rust:amd64 Conflicts on rustc:amd64 < none -> 1.75.0+dfsg0ubuntu1-0ubuntu7.1 @un uN >
19:58:06    Considering rustc:amd64 -1 as a solution to delphix-rust:amd64 1
19:58:06    Added rustc:amd64 to the remove list
19:58:06    Conflicts//Breaks against version 1.75.0+dfsg0ubuntu1-0ubuntu7 for rustc but that is not InstVer, ignoring
19:58:06    Conflicts//Breaks against version 1.74.1+dfsg0ubuntu1-0ubuntu13 for rustc-1.74 but that is not InstVer, ignoring
19:58:06    Fixing delphix-rust:amd64 via keep of rustc:amd64
19:58:06  Investigating (0) bindgen-0.65:amd64 < none -> 0.65.1+dfsg0-0ubuntu1 @un uN Ib >
19:58:06  Broken bindgen-0.65:amd64 Depends on rustc:amd64 < none | 1.75.0+dfsg0ubuntu1-0ubuntu7.1 @un uH > (>= 1.72.0+dfsg)
19:58:06    Considering rustc:amd64 -1 as a solution to bindgen-0.65:amd64 0
19:58:06    Holding Back bindgen-0.65:amd64 rather than change rustc:amd64
19:58:06  Investigating (0) linux-build-deps:amd64 < 6.8.0-47.47 @iU K Nb Ib >
19:58:06  Broken linux-build-deps:amd64 Depends on bindgen-0.65:amd64 < none | 0.65.1+dfsg0-0ubuntu1 @un uH >
19:58:06    Considering bindgen-0.65:amd64 0 as a solution to linux-build-deps:amd64 -2
19:58:06    Removing linux-build-deps:amd64 rather than change bindgen-0.65:amd64
19:58:06  Done

I believe the problem here is that the version of the rustc package is not specified by our delphix-rust virtual package based on this line:

19:58:06  Investigating (0) delphix-rust:amd64 < 1.80.0-1delphix.2025.01.31.14.59 @ii K Ib >
19:58:06  Broken delphix-rust:amd64 Conflicts on rustc:amd64 < none -> 1.75.0+dfsg0ubuntu1-0ubuntu7.1 @un uN >

I believe the problem is:

  • bindgen-0.65 requires rustc (>= 1.72.0+dfsg)
  • Our delphix-rust's Provides: rustc doesn't specify a version
  • Without a version in the Provides: field, apt doesn't know if delphix-rust satisfies the version requirement (hence the none)
  • So apt tries to install a version of rustc to satisfy bindgen-0.65's requirement of rustc (>= 1.72.0+dfsg),. The Ubuntu repos host version 1.75
  • But that in turn conflicts with our delphix-rust.

Solution

To solve this, I would like to try and specify a version of the rustc and set it to be equal to the version of delphix-rust itself so that the dependency resolver can perform version comparisons and not install rustc from other sources.

Testing

https://ops-jenkins.eng-tools-prd.aws.delphixcloud.com/job/linux-pkg/job/os-upgrade/job/build-package/job/delphix-rust/job/pre-push/65/console

delphix@ip-10-110-197-95:~$ aws s3 cp s3://dev-de-images/builds/jenkins-ops/linux-pkg/os-upgrade/build-package/delphix-rust/pre-push/65/delphix-rust_1.80.0-1delphix.2025.02.06.19.05_amd64.deb .
download: s3://dev-de-images/builds/jenkins-ops/linux-pkg/os-upgrade/build-package/delphix-rust/pre-push/65/delphix-rust_1.80.0-1delphix.2025.02.06.19.05_amd64.deb to ./delphix-rust_1.80.0-1delphix.2025.02.06.19.05_amd64.deb

delphix@ip-10-110-197-95:~$ dpkg-deb -R delphix-rust_1.80.0-1delphix.2025.02.06.19.05_amd64.deb tmp

delphix@ip-10-110-197-95:~$ grep Provides tmp/DEBIAN/control
Provides: cargo, rust-gdb, rustc (= 1.80.0-1delphix.2025.02.06.19.05)

More testing can only be done after a buildserver with these changes is built & imported.

@palash-gandhi palash-gandhi force-pushed the dlpx/pr/palash-gandhi/24d59699-c0ff-4bfd-9e17-69de50419298 branch from 18c7ef3 to 266ac7c Compare February 6, 2025 18:57
Copy link
Contributor

@prakashsurya prakashsurya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super familiar with the debian format, but this seems reasonable.. should all the provides include the version? (assuming as-is is only for rustc)

@palash-gandhi palash-gandhi marked this pull request as ready for review February 6, 2025 21:28
@palash-gandhi palash-gandhi merged commit 336dc7a into os-upgrade Feb 6, 2025
4 of 5 checks passed
@palash-gandhi palash-gandhi deleted the dlpx/pr/palash-gandhi/24d59699-c0ff-4bfd-9e17-69de50419298 branch February 6, 2025 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants