Skip to content

Ensure build-essential is installed wherever make compiles source on Debian/Ubuntu#4380

Draft
Copilot wants to merge 1 commit intomainfrom
copilot/check-make-usage-build-essential
Draft

Ensure build-essential is installed wherever make compiles source on Debian/Ubuntu#4380
Copilot wants to merge 1 commit intomainfrom
copilot/check-make-usage-build-essential

Conversation

Copy link
Contributor

Copilot AI commented Mar 23, 2026

Ubuntu 25.10+ no longer ships build-essential by default (see PR #4368). Any test or tool that compiles source code via make on Debian/Ubuntu must now explicitly install it.

Changes

Audited all node.tools[Make] / make.make*() call sites and added build-essential to the Debian/Ubuntu dependency list in each:

  • lisa/tools/stress_ng, hibernation_setup, netperf, vdsotest, fio, iperf3, nvmecli, mdadm
  • lisa/microsoft/testsuites/ltp/ltp
  • lisa/microsoft/testsuites/xfstests/xfstests (debian_dep)
  • lisa/microsoft/testsuites/kvm/kvm_unit_tests_tool (deps)
  • lisa/microsoft/testsuites/libvirt/libvirt_tck_tool (deps)
  • lisa/microsoft/testsuites/osu/osusuite
  • lisa/microsoft/testsuites/dpdk/dpdkovs, rdmacore (source build deps), dpdknffgo
  • lisa/microsoft/testsuites/cvm/cvm_attestation_tool

For files with OS-specific package lists, build-essential is added directly to the Debian/Ubuntu branch. For generic deps lists that use is_package_in_repo (e.g. kvm_unit_tests_tool, libvirt_tck_tool), it is safe to add since non-Debian repos will filter it out.

# Pattern applied — OS-specific list
elif isinstance(self.node.os, Debian):
    self.node.os.install_packages(["build-essential"])

# Pattern applied — generic deps with is_package_in_repo guard
deps = [
    "gcc", "make", ...,
    "build-essential",  # filtered on non-Debian via is_package_in_repo
]

…n/Ubuntu

Following PR #4368, starting from Ubuntu 25.10 build-essential is no longer
pre-installed by default. Add explicit build-essential installation to all
places where make is used to compile source code on Debian/Ubuntu systems.

Co-authored-by: LiliDeng <10083705+LiliDeng@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/lisa/sessions/20ac2b2b-66ff-438b-9e01-b6339b861500
@mcgov
Copy link
Collaborator

mcgov commented Mar 24, 2026

We could start using the distro package managers built-in ability to install package dependencies for source builds: build-deps.

apt-get, dnf, and zypper all allow you to download and build source .deb/.srpm packages. They need to have a list of build dependencies in the package, naturally. You can just enable the distro source repositories and install the build dependencies for a package from there, instead of trying to track an ever-changing list of package names.

I started implementing this but got bogged down and ended up cutting it. I would fully start using the feature if it were available, though.

my reference branch:
#4024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants