Efficient Build Dependency Verification Using eBPF and Incremental Analysis | Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering

· ACM Conferences

33 min read Original article ↗

Abstract

Abstract

Build systems are fundamental to modern software development, but maintaining correct dependency specifications remains a significant challenge. Dependency-related errors, including missing and redundant dependencies, account for over 50% of build errors in large-scale software projects. Existing tools for detecting such errors suffer from two major limitations: high runtime overhead due to ptrace-based system call tracing, and the need to verify all edges in the build dependency graph. This paper presents mkcheck2, a novel approach that combines extended Berkeley Packet Filter (eBPF)-based system call tracing with incremental analysis to enable efficient dependency verification. Our evaluation on a diverse set of open-source projects demonstrates that mkcheck2 reduces the overhead of dependency error detection by up to 99.7% compared to existing ptrace-based approaches while maintaining detection accuracy. Across the entire 300-project Make corpus, the incremental analysis technique lowers the mean analysis time per commit from 1267.49 seconds to just 23.56 seconds, making continuous dependency verification practical in real-world development environments.

AI Summary

AI-Generated Summary (Experimental)

This summary was generated using automated tools and was not authored or reviewed by the article's author(s). It is provided to support discovery, help readers assess relevance, and assist readers from adjacent research areas in understanding the work. It is intended to complement the author-supplied abstract, which remains the primary summary of the paper. The full article remains the authoritative version of record. Click here to learn more.

Click here to comment on the accuracy, clarity, and usefulness of this summary. Doing so will help inform refinements and future regenerated versions.

To view this AI-generated plain language summary, you must have Premium access.

1 Introduction

Build systems are a fundamental component of modern software development, responsible for transforming source code into executable artifacts. Since the introduction of Make in 1976 [10], build systems have evolved into complex distributed systems that manage dependencies, optimize resources, and ensure correctness across large-scale projects. Despite their critical role, build systems often receive less attention than other aspects of software engineering, leading to significant maintenance challenges. Studies have shown that build-related failures account for 11-47% of failures in scientific software [13], and build maintenance can consume up to 27% of a developer’s time in large projects [23].

A particularly challenging aspect of build systems is dependency management. Build dependencies form a directed acyclic graph (DAG) where nodes represent files and edges represent dependencies. This graph must accurately reflect both declared dependencies in build scripts and actual dependencies that emerge during the build process. Maintaining this accuracy is non-trivial: at Google, dependency-related errors account for 52.68-64.71% of all build errors [28]. Missing dependencies occur when an actual dependency is not declared in the build manifest, potentially leading to incorrect builds or failures. Conversely, redundant dependencies cause unnecessary rebuilds and reduced build performance. Such dependency errors are one of causes of unreproducible builds, a challenge that extends beyond individual projects to the entire software ecosystem [3]. Both types of errors become increasingly problematic as codebases grow in complexity [14].

Several approaches have been proposed to address dependency verification. Dynamic analysis approaches like mkcheck [17] achieve high accuracy through system call tracing, but their ptrace-based implementation introduces significant performance overhead (200-1000%). Static analysis tools offer better performance but cannot capture dependencies introduced by dynamic build steps. Hybrid approaches like VeriBuild [9] attempt to balance accuracy and performance but still rely on ptrace, inheriting its performance limitations. Currently, no existing solution achieves both high accuracy and the performance required for continuous integration environments [25, 26].

To address these challenges, this paper presents mkcheck2, a novel approach that enables high-accuracy dependency verification in continuous integration environments by combining efficient system call tracing with incremental analysis. Our system makes two key contributions:

1) We introduce an eBPF-based system call tracing mechanism that eliminates the performance overhead associated with ptrace. By executing tracing code directly in kernel space, we can monitor build processes with minimal impact on build performance. Unlike ptrace, which requires process suspension and context switches for each system call, our eBPF-based approach provides non-invasive tracing by operating entirely within the kernel. Note that this design choice has inherent trade-offs. The limitation is the dependency on the execution environment; our tool requires a modern Linux kernel that supports eBPF and the necessary privileges (e.g., CAP_SYS_ADMIN) to load tracing programs.

2) We develop an incremental analysis technique that focuses on dependency changes between two source revisions. Instead of verifying all edges in the build graph, we analyze only the edges that may have been affected by recent changes. This approach significantly reduces the time required for dependency verification while maintaining accuracy.

Our evaluation on a diverse set of open-source projects demonstrates that mkcheck2 reduces the overhead of dependency error detection by up to 99.7% compared to existing ptrace-based approaches while maintaining detection accuracy. The combination of efficient tracing and incremental analysis enables practical continuous dependency monitoring, with an average processing time of just 23.56 seconds per commit in continuous integration environments.

2 Related Work

Research on build dependency analysis can be classified into three categories: dynamic analysis, static analysis, and hybrid approaches, each with distinct advantages and limitations [24, 25].

Dynamic analysis approaches detect dependency errors by observing build behavior at runtime [7]. A notable example, mkcheck [17], employs system call tracing [4] for detecting actual dependencies. By monitoring file system operations using ptrace, mkcheck constructs a dependency graph based on observed file accesses and verifies discrepancies through targeted builds. However, its ptrace-based implementation introduces significant performance overhead (2-10x slowdown) due to context switches between traced processes and the tracer, making it impractical for large projects or continuous integration environments [8].

Subsequent tools attempted to address these limitations with varying success. VeriBuild [9] introduced the unified dependency graph (UDG) representing both declared and actual dependencies, enabling more nuanced analysis, but still suffered from ptrace’s performance overhead. VirtualBuild [33] took a different approach by modifying source files to minimize compilation time while preserving dependency information. This reduced LLVM’s build analysis time from 4 hours to 38 minutes, but cannot handle build systems that execute intermediate artifacts or non-standard build steps, and requires language-specific transformations [12].

Static analysis tools attempt to detect dependency errors without build execution [22]. Tamrawi et al. [32] developed symbolic evaluation for Makefiles by parsing syntax into abstract syntax trees to resolve variables and functions. However, static analysis fundamentally cannot handle dynamically generated dependencies or complex build systems using multiple tools [5]. Recent work has expanded to package-level dependencies, with DValidator [19] analyzing package manager dependency graphs against source code call graphs, but this operates at a different granularity than file-level build dependencies [18]. Package-level analysis verifies dependencies between whole software components (e.g., libraries), whereas our work focuses on dependencies between individual files and build tasks (e.g., ensuring an object file depends on all its C source and header files). A tool operating at the package level cannot detect missing file-level dependencies, which is a primary source of build errors that mkcheck2 is designed to find.

Hybrid approaches combine elements of both methodologies to balance performance and accuracy [6]. BuildFS [30] models build execution as a sequence of operations while tracking file system activity, effective for JVM-based systems but struggling with mixed build systems. Spall et al. [31] proposed capturing dependencies through execution tracing rather than manual specification, guaranteeing correct incremental builds through speculative execution. While theoretically elegant, this requires fundamental changes to build systems, limiting applicability to existing codebases [16].

Despite advances across all categories, a critical gap remains: no solution achieves both high accuracy and practical performance for continuous integration environments [1, 21]. Dynamic analysis tools like mkcheck offer accuracy but with prohibitive overhead (200-1000%), while static analysis tools miss dependencies from dynamic build steps [27]. Our approach with mkcheck2 addresses these limitations through efficient eBPF-based tracing and incremental analysis. Unlike ptrace-based approaches requiring process suspension and context switches, our eBPF approach operates entirely within the kernel, allowing build processes to execute without interruption. Combined with incremental analysis focusing only on changed dependency edges, mkcheck2 achieves both high accuracy and practical performance for continuous integration environments [2, 15].

3 Proposal

This section presents mkcheck2, a novel approach to detecting build dependency errors that combines efficient system call tracing with incremental analysis. Our approach addresses two fundamental challenges in build dependency verification: the performance overhead of system call tracing and the computational cost of dependency graph analysis. By leveraging modern kernel technologies and incremental analysis techniques, we achieve both efficiency and accuracy in dependency error detection.

3.1 System Architecture

Figure 1:

Overview of the proposed system

Figure 2:

Overview of original mkcheck

mkcheck2 employs a three-tier architecture designed to enable efficient and accurate dependency verification, as illustrated in Figure 1. The system consists of three main components:

1) Build Tracer: Monitors file operations during build execution using eBPF-based system call tracing. This component consists of an in-kernel eBPF program and a user-space tracer program, enabling efficient system call monitoring with minimal overhead.

2) Dependency Graph Builder: Constructs and maintains a representation of actual build dependencies based on the traced file operations. This component processes the traced events to build a comprehensive dependency graph [4].

3) Incremental Analyzer: Detects dependency errors by comparing dependency graphs from different builds, focusing analysis on changed portions to minimize computational overhead [29].

This architecture represents a significant improvement over the original mkcheck design shown in Figure 2, particularly in terms of system call tracing efficiency and incremental analysis capabilities [11, 20].

3.2 Build Tracer

The Build Tracer consists of three interacting subcomponents that work together to enable efficient and accurate build dependency tracking:

1) Build Process: The target build process and its child processes that are being monitored. This includes all processes spawned during the build execution, such as compilers, linkers, and other build tools.

2) eBPF Program: An in-kernel eBPF program that attaches to system calls and monitors file operations performed by the build process and its descendants. This component operates entirely within kernel space, eliminating the overhead of context switches typically associated with traditional ptrace-based approaches. The eBPF program filters and processes system call events in real-time, capturing only the relevant information needed for dependency analysis.

3) Tracer: A user-space program that communicates with the eBPF program through a ring buffer to collect and process system call events. This component maintains the process hierarchy, resolves file paths, and constructs the dependency graph based on the observed file operations. The tracer implements sophisticated filtering and aggregation logic to handle complex build scenarios while maintaining high performance.

Figure 3:

System Components and Their Interactions

The interaction between these components is designed to minimize overhead while maintaining accuracy by employing the eBPF, ring buffer, and batching strategy. The eBPF program performs initial filtering in kernel space, reducing the volume of data that needs to be transferred to user space. The ring buffer provides efficient, lock-free communication between kernel and user space, enabling high-throughput event processing. The tracer implements batching and buffering strategies to handle high event rates without becoming a bottleneck.

The system call tracer operates directly in kernel space, attaching to system calls related to file access, modification, and process creation. By executing at the kernel level, it avoids the context switching overhead inherent in traditional ptrace-based approaches. The tracer maintains detailed process hierarchy information, enabling accurate attribution of file operations to specific build targets.

The dependency graph builder serves as the system’s central data processor. It constructs a comprehensive dependency graph from the traced file operations, handling complex scenarios such as symbolic links and generated files. The builder maintains historical dependency information and classifies dependencies based on their characteristics and access patterns. For example, the system applies heuristics to identify temporary files that are created, accessed for read/write operations, and then deleted within the same process lifetime, excluding them from the dependency graph to avoid spurious dependencies. The classification system also distinguishes between generated files that persist across build steps (such as object files and libraries) and configuration files that influence build behavior, enabling more accurate dependency tracking.

The incremental analyzer represents the system’s intelligence layer. It identifies potentially affected dependencies by comparing build dependency graphs constructed from different builds. The analyzer computes the difference between two dependency graphs to efficiently detect modified dependencies and focuses its analysis on the changed portions of the graph. This targeted approach significantly reduces the computational cost of dependency verification by analyzing only the dependencies that have actually changed between builds, rather than the entire dependency structure.

3.3 System Call Tracing

Our system call tracing mechanism represents a significant advancement over traditional ptrace-based approaches. The core innovation lies in our use of eBPF technology, which enables efficient monitoring of build processes with minimal runtime overhead. Traditional approaches using ptrace require two context switches per system call: one to transfer control to the tracer and another to resume the traced process. In contrast, our eBPF programs execute directly in kernel space, eliminating these costly context switches.

Our implementation includes four key optimizations for efficient event processing:

1) Early Filtering: The tracer immediately filters out events from non-target processes by maintaining a set of process IDs that belong to the build tree. This filtering occurs in kernel space before any event processing or user space communication.

2) Path Normalization: The system implements sophisticated path handling that unifies the treatment of both file descriptor-based and path-based system calls. For file descriptor-based operations, the system traverses the kernel’s dentry structure to reconstruct the full path, while also checking for special filesystems and device types that should be excluded from dependency tracking. The path normalization process filters out irrelevant paths such as those in procfs or PTY devices, reducing unnecessary event generation.

3) Ring Buffer Communication: The implementation uses a ring buffer for efficient, lock-free communication between kernel and user space. This design choice enables high-throughput event processing while minimizing the overhead of kernel-user space transitions.

4) Process Hierarchy Tracking: The system maintains detailed process hierarchy information through careful monitoring of process creation and termination events. When a new process is created through fork or clone, the system verifies that the parent process is already being tracked before adding the child process to the monitoring set. Each traced process is assigned a unique identifier (UID) to accurately track process relationships and attribute file operations to specific build targets.

The tracer monitors a carefully selected subset of system calls essential for build dependency analysis:

•

File operations (read, write) for tracking input and output dependencies

•

File metadata access (stat) for dependency verification

•

Process management operations (fork, clone, exit) for maintaining the process hierarchy

Our implementation includes specialized optimizations for common build system patterns. For example, we have developed a sophisticated heuristic for handling GNU Make’s jobserver mechanism. The jobserver is a mechanism used by GNU Make for parallel job control, which uses file descriptors or named pipes to coordinate job execution between make processes. Our system detects these jobserver-related file descriptors through two methods:

1) Environment Variable Analysis: The system inspects environment variables such as MAKEFLAGS and CARGO_MAKEFLAGS during process execution to identify jobserver configurations. These variables contain either file descriptor numbers in the format –jobserver-auth=R,W or named pipe paths in the format –jobserver-auth=fifo:PATH.

2) File Descriptor Inheritance: When jobserver file descriptors are identified, they are marked as ignored in both the parent and child processes. This ensures that the jobserver’s internal communication does not appear as spurious dependencies in the build graph.

This heuristic enables accurate dependency tracking in parallel build scenarios by excluding jobserver-related file operations from the dependency graph. The approach is particularly effective because it handles both traditional file descriptor-based jobservers and newer FIFO-based implementations, ensuring compatibility with various versions of GNU Make and different build configurations.

3.4 Dependency Graph Builder

The dependency analysis system combines Git’s efficient tree diffing capabilities with sophisticated graph analysis techniques to enable incremental verification of build dependencies. This hybrid approach significantly reduces the computational cost of dependency checking while maintaining high accuracy in error detection.

The dependency graph construction process shown in Algorithm 1 analyzes the traced file operations to build a comprehensive dependency graph. For each process in the trace result, the system analyzes file operations to construct a dependency graph. Read operations establish input dependencies, while write operations identify output files. The system carefully tracks the relationship between inputs and outputs to build a comprehensive dependency graph. This process ensures that all file dependencies are accurately captured, including those that arise from intermediate build artifacts and generated files.

3.5 Incremental Analyzer

The error detection process shown in Algorithm 2 leverages the comparison of actual dependency graphs from two source revisions. This approach provides more accurate detection of both missing and redundant dependencies by analyzing the differences in dependency relationships between revisions.

To determine the full impact of a change, the system must compute the transitive closure of the dependency graph starting from the modified file. This process identifies the complete set of files that are directly or indirectly affected. While any algorithm that finds all reachable nodes (such as Depth-First Search) would be correct, we use a Breadth-First Search (BFS) traversal, as shown in Algorithm 4 . The GetDependentFiles function starts from a modified input file and systematically explores all reachable nodes, ensuring that any file that transitively depends on the modification is included in the set of files to be rebuilt.

The algorithm operates in the following steps:

1) First, it computes the difference between the dependency graphs of two revisions, identifying edges that have been added or modified.

2) For each changed dependency edge, it performs an empirical verification:

•

Records the modification times of all output files

•

Updates the timestamp of the input file using touch

•

Triggers an incremental build

•

Records the new modification times of all output files

3) The algorithm triggers an incremental build based on the code changes and traces the process using eBPF to observe actual file accesses. The verification routine (Algorithm 3) then compares these observed dependencies against the declared graph for each rebuilt target:

•

A missing dependency is reported if a file was accessed by a build step but was not listed as a prerequisite for that target.

•

A redundant dependency is reported if a file was listed as a prerequisite for a target but was not accessed during its build step.

The primary performance advantage of this incremental approach is that its analysis time is proportional to the size of the actual build, not the size of the entire project. In the common case of small code changes, only a fraction of targets are rebuilt, making the analysis fast. In a worst-case scenario, such as modifying a widely included header file, a change could trigger a full project rebuild. However, even in this situation, the performance of mkcheck2 is at worst equivalent to that of conventional full-graph verification tools (but with lower tracing overhead) and is substantially faster in the average case.

4 Evaluation

This section presents a comprehensive evaluation of mkcheck2, designed to assess both its performance characteristics and practical applicability in real-world development environments. Our evaluation aims to answer the following research questions:

RQ1 (Performance): How does mkcheck2 perform in terms of build overhead, analysis time, and scalability compared to existing state-of-the-art tools?

RQ2 (Correctness): Does mkcheck2 maintain high accuracy in detecting dependency errors compared to existing tools?

4.1 Experimental Setup

To ensure a comprehensive and fair evaluation, we have adopted the public dataset from the BuildFS study, focusing on the 300 projects that use the Make build system. From this set, we selected nine representative projects to analyze in detail. These projects were categorized by their baseline build time into small, medium, and large, with the top three from each category chosen to ensure our analysis covers a range of complexities and scales. The characteristics of these projects and their baseline performance are presented alongside our results in Table 1.

All experiments were conducted on a machine equipped with an Intel Core i5-13500 processor (14 cores/20 threads, 2.5GHz base, up to 4.8GHz turbo) running Ubuntu 22.04 LTS with Linux kernel 5.15. The operating system was configured with eBPF support enabled and all unnecessary system services disabled during experiments to minimize interference.

To ensure reliable and reproducible measurements, we implemented the following controls:

•

All measurements were repeated 5 times with the first run discarded to avoid cache effects

•

The filesystem cache was cleared between runs using echo 3 > /proc/sys/vm/drop_caches

•

Build artifacts were cleaned between each analysis

•

CPU frequency scaling was disabled to ensure consistent performance

•

No other CPU-intensive tasks were running during the experiments

•

The operating system was configured with eBPF support enabled and all unnecessary system services disabled

4.2 Methodology

Our evaluation methodology is designed to systematically assess mkcheck2’s performance and correctness against two state-of-the-art ptrace-based tools, mkcheck and BuildFS. For our analysis, we used the publicly available dataset from the BuildFS study, focusing on the 300 projects built with Make.

4.2.1 RQ1: Performance.

To evaluate performance, we conducted an in-depth analysis of the 10 most recent commits for each of our nine representative projects. For each commit in the sequence, we performed the following actions depending on the tool:

•

mkcheck & BuildFS: For each of the 10 commits, we performed a full clean build followed by a full dependency analysis. This represents the standard workflow for tools without incremental capabilities.

•

mkcheck2: For the first commit in the sequence, we performed a full clean build and a full analysis to establish a baseline dependency graph. For the subsequent nine commits, we triggered an incremental build and ran our incremental dependency analysis.

This setup allows us to measure three key aspects of performance, presented in Table 1 and Table 2:

(1)

Build Time Overhead: The overhead is calculated by comparing the build time of the initial clean build for each tool against a baseline build with no tracing.

(2)

Analysis Time: We compare the analysis time of mkcheck2’s first (full) and second (incremental) commits against the full analysis times of mkcheck and BuildFS.

(3)

Scalability: We compare the total end-to-end time (build + analysis) required to process the entire sequence of 10 commits for each tool.

4.2.2 RQ2: Correctness.

To evaluate correctness, we compared the dependency errors detected by mkcheck2 against established oracles across all 300 Make projects from the BuildFS dataset.

•

For missing dependencies, we used the output of BuildFS as the oracle, as it is recognized for its high precision in this area.

•

For redundant dependencies, we used the output of mkcheck as the oracle, since BuildFS does not detect this type of error.

This comprehensive comparison ensures our accuracy is measured against the strengths of existing state-of-the-art tools.

4.3 Results

4.3.1 RQ1: Performance.

To evaluate the end-to-end performance of our approach we focus on three aspects: (1) build-time overhead introduced by tracing, (2) analysis latency for individual commits, and (3) overall scalability across a sequence of commits.

Table 1:

ProjectCat.BuildAnalysis
  BaselinemkcheckBuildFSmkcheck2mkcheckBuildFSmkcheck2 (1st)mkcheck2 (2nd)
i3statusSmall1.032.022.531.15321.1622.0420.221.52
PacVimSmall1.022.172.551.07206.658.069.000.97
pigzSmall0.962.072.560.94180.466.657.390.75
Average (n=100)–0.430.871.060.43165.115.675.750.49
libnotifyMedium6.2712.4115.416.43999.6265.7875.067.37
orageMedium6.3813.3216.206.99850.2465.7365.774.44
xfdesktop4Medium6.8713.2116.527.29921.4070.7272.046.35
Average (n=100)–3.276.588.093.26475.1833.7433.562.76
boincLarge156.83344.46430.53171.396328.35820.32760.6161.09
vlcLarge238.77509.55667.99265.9910771.592167.692143.48129.15
ardbLarge322.49641.69747.24326.079077.311210.061338.09105.41
Average (n=100)–40.9482.11101.3040.543116.67356.79361.5329.61
Overall Avg (n=300)–14.2129.8536.8214.741252.32132.07133.6110.95

Build and analysis performance for the nine representative projects. Build columns report wall-clock build time (seconds). Analysis columns show dependency-verification time. For mkcheck2 the first value corresponds to the initial full run, while the second value shows the incremental run performed on the next commit.

Across all 300 projects mkcheck2 tracks builds with virtually no overhead (project-averaged overhead of 0.3% over baseline), whereas mkcheck and BuildFS more than double the build time (101.7% and 148.0% average overhead, respectively). For dependency verification the initial full run of mkcheck2 is on par with the ptrace tools, but its incremental run is over an order of magnitude faster—up to 17 × in our experiments (sub-second for small projects and only a few minutes even for the largest code bases)—making per-commit checking practical.

How totals are computed. For mkcheck2, the "10 Commits" figures in Table 2 are calculated as

\begin{equation*} \text{1 full run (}{\it mkcheck2\,(1st)}\text{)} + 9 \times \text{incremental runs (}{\it mkcheck2\,(2nd)}\text{)}. \end{equation*}

Each incremental run comprises an incremental build followed by its analysis; their per-commit duration is listed as mkcheck2 (2nd) in the "1 Commit" section of the same table.

Table 2:

ProjectCat.1 Commit10 Commits
  BuildFSmkcheckmkcheck2 (1st)mkcheck2 (2nd)BuildFSmkcheckmkcheck2Red. (%)
i3statusSmall24.57323.1821.372.67227.753298.6247.65-79.1
PacVimSmall10.61208.8210.072.04112.702092.8126.69-76.3
pigzSmall9.21182.538.331.6996.091808.0222.35-76.7
Average (n=100)–6.90168.046.360.9469.991685.6314.70-79.0
libnotifyMedium81.191012.0381.4913.80915.889452.03194.25-78.8
orageMedium81.93863.5672.7611.43789.088325.79186.24-76.4
xfdesktop4Medium87.24934.6179.3313.64852.709281.52195.44-77.1
Average (n=100)–41.83481.7636.826.02416.534850.2290.93-78.2
boincLarge1250.856672.81932.00232.4812005.4667537.123065.66-74.5
vlcLarge2835.6811281.142409.47395.1427460.17112946.276486.40-76.4
ardbLarge1957.309719.001664.16431.4821254.0094943.185587.00-73.7
Average (n=100)–458.093198.77402.0770.154615.0232054.701036.89-77.5
Overall Avg (n=300)–167.61282.9148.425.71700.512863.5380.8-78.2

Scalability over a sequence of ten commits. Values are end-to-end time (seconds). The "10 Commits" total for mkcheck2 is calculated as the time for one full run plus nine incremental runs. The right-most column shows the relative change between mkcheck2 and BuildFS; negative values indicate speed-ups.

Processing a single commit with mkcheck2 is already 12.2% faster than BuildFS on average, but the advantage widens dramatically when a series of commits is analysed. Over the common case of ten successive commits mkcheck2 is 75–80% faster, reducing a workload that previously took 4.6 ks (medium projects) to less than 91 s. We additionally repeated the experiment on all 300 Make projects from the BuildFS corpus. The aggregated results mirror the trends shown here and confirm that the savings hold at scale across the entire 300–project suite.

In day–to–day development workflows we found that a turn–around time above roughly 30 min becomes cumbersome: developers can no longer run a full dependency check before committing code, and CI pipelines incur noticeable cost. On our evaluation machine five of the 300 Make projects already exceed this threshold when analysed with BuildFS, and a further nine fall in the 15 min to 30 min band. Because continuous–integration workers are often less powerful than our desktop testbed, the number of projects that cross the limit in practice is likely higher. With mkcheck2 the longest ten–commit run we measured (ardb) completed in about 12 min; most projects finish in under 5 min. We therefore believe the technique remains usable even for comparatively large code bases.

By eliminating ptrace overhead and by analysing only the parts of the graph affected by a change, mkcheck2 turns dependency verification from an hours-long batch job into a task that fits comfortably within interactive and CI time budgets.

4.3.2 RQ2: Correctness.

To evaluate the correctness of mkcheck2, we compared its diagnostic results with those ofmkcheck across all test projects. Table 3 presents the detailed comparison of detection accuracy for both missing and redundant dependencies.

Table 3:

Error TypeTotalDetectedDetection Rate (%)
Missing15,74015,740100
Redundant11 72010 78092.0

Dependency error detection accuracy of mkcheck2. Missing dependencies match the BuildFS oracle exactly. Redundant dependency detection is compared withmkcheck (BuildFS does not detect redundancies); mkcheck2 misses 8 % of redundant edges, consistent with the known unsoundness of its incremental analysis.

The results show that BuildFS reports 15 740 missing dependencies across the 300 Make projects.mkcheck also reports 15 743, introducing three false positives caused by its process-granularity limitations. In contrast, mkcheck2 reports exactly 15 740, matching the BuildFS oracle with no false positives. For redundant dependencies, mkcheck2 detects 10 780 out of 11 720 redundancies (92.0 %), leaving 8 % undetected. This gap is expected: our incremental analysis is intentionally slightly unsound and cannot capture certain redundancies that arise without a corresponding edge removal.

Qualitative Examples.

Manual inspection of the 8 % missed cases shows a recurring pattern: developers add a header or configuration file as a precautionary prerequisite even though it is no longer accessed by the corresponding build rule. Typical instances include package configuration headers (e.g., config.h) and convenience umbrella headers that are present in the source tree but not referenced by the compiled units after a recent refactor. Because these changes do not remove any previously observed dependency edges, they fall outside the scope of mkcheck2’s incremental check.

This behaviour precisely matches the unsoundness discussed above: redundancies that arise solely through additions to the declared graph, with no observable file-access change, cannot be detected without re-verifying the entire graph.

When we treat BuildFS as the ground-truth oracle, mkcheck2 produced no false positives across the 300 Make projects; this indicates that its eBPF tracing and path normalisation avoid the spurious diagnostics occasionally reported for mkcheck.

Table 4:

ProjectRepresentative redundant dependency missed by mkcheck2
i3statusinclude/common.h retained as a prerequisite for src/output.c even after the helper macros were inlined.
libnotifyRule for building libnotify.so still lists generated header notify-enum-types.h, which the sources stopped including after GLib’s enum introspection update.
boincGlobal build rule adds config.h to every object file; several peripheral modules no longer reference any of the configuration macros.

Illustrative redundant dependencies that escaped detection. All three cases correspond to “extra prerequisite added or retained” without removal of an existing edge, which is outside the soundness envelope of mkcheck2’s incremental check.

4.4 Discussion

Our evaluation shows that mkcheck2 meets both performance and accuracy requirements for continuous dependency verification:

•

RQ1 – Performance: mkcheck2 keeps build overhead essentially at baseline (project-averaged 0.3% over baseline), thanks to incremental analysis, lowers the corpus-wide mean analysis time per commit from 1267.49 s with mkcheck to 23.56 s with mkcheck2. For a long sequence of commits this difference accumulates to orders-of-magnitude savings in CI wall time.

•

RQ2 – Correctness: mkcheck2 matches BuildFS for missing-dependency detection (100% precision/recall across 300 projects) and detects 92.0% of redundant dependencies reported by mkcheck, with remaining cases explained by incremental-analysis limits.

Taken together, these findings indicate that mkcheck2 delivers a substantial performance gain while maintaining the state-of-the-art accuracy of BuildFS for missing dependencies. Concretely, Table 1 shows that the average build overhead is cut from 101.7–148.0 % (mkcheck / BuildFS) to just 0.3 %, while Table 3 confirms 100 % recall for the 15 740 missing dependencies and 92 % recall for the 11 720 redundancies (with no false positives). The kernel-space tracer removes the dominant overhead of earlier dynamic tools, while incremental analysis keeps verification latency low even on large repositories.

4.5 Limitations

While our approach significantly advances the state of the art in build dependency verification, several limitations remain. These constraints primarily affect specific build scenarios but do not diminish the system’s effectiveness for most software projects.

Our eBPF-based system call tracing is Linux-specific, as it relies on the Linux kernel’s eBPF infrastructure. While alternative tracing mechanisms exist for other operating systems, they lack the performance and efficiency advantages of eBPF. This restricts applicability to Linux-based development environments, though these constitute a significant portion of software development infrastructure, particularly in cloud and continuous integration systems.

The incremental analysis approach may miss certain types of redundant dependencies. Specifically, while we can detect redundant dependencies resulting from the removal of actual dependency edges, our approach cannot identify newly introduced redundant dependencies in the declared build dependency graph that do not correspond to removed edges.

Memory-mapped file handling presents challenges, as tracking these operations effectively requires specific kernel support. Although our eBPF approach can monitor memory mapping system calls, tracking actual accesses to mapped regions demands additional kernel instrumentation, affecting projects that heavily use memory-mapped I/O for build-time data processing.

Dependencies from dynamically loaded libraries or plugins may not be fully visible through standard system call monitoring. This limitation primarily affects build systems employing plugin architectures or dynamic extension mechanisms.

Network dependencies introduce additional complexity in tracking and verification. While our system can detect network operations through system call monitoring, accurately attributing these operations to specific build targets requires additional infrastructure, particularly affecting distributed build systems and those incorporating network-based resource fetching.

Distributed build systems present coordination challenges our implementation does not fully address. While our core dependency tracking mechanisms work effectively for local builds, coordinating verification across multiple build nodes requires additional infrastructure, particularly relevant for large-scale systems distributing compilation across multiple machines.

These limitations primarily stem from fundamental challenges in system call tracing and build system complexity rather than specific implementation choices. Based on our new evaluation across 300 diverse projects, which yielded detection results identical to the ptrace-based BuildFS tool, we believe these limitations do not significantly impact our approach’s effectiveness for a wide range of common software projects. Nevertheless, we acknowledge that the possibility of corner cases in projects not covered by our evaluation remains, and we identify this as an area for future investigation.

4.6 Threats to Validity

While our approach significantly advances build dependency verification, certain limitations must be acknowledged. Regarding external validity, our evaluation primarily focused on C/C++ projects using three major build systems (Make, CMake, and SCons), which may limit generalizability to other languages or build systems. Our testing with default configurations may not fully capture the impact of different optimization levels or build flags, and our analysis of commit processing assumes typical development patterns that might not represent projects with unusual commit characteristics.

Internal validity concerns include potential system load variations despite our controlled environment, non-deterministic aspects of parallel builds that might introduce measurement variance, and the effectiveness of incremental analysis being inherently dependent on the nature of changes between commits. These factors could affect reproducibility across different environments.

Construct validity issues center on our choice of performance and accuracy metrics. While we measured build time, analysis time, and commit processing time, these may not capture all relevant performance aspects. Similarly, dependency detection rates might be influenced by the comprehensiveness of our test cases and the specific dependency relationships in the evaluated projects.

To mitigate these concerns, we conducted multiple measurement runs, included projects with varying sizes and complexities, controlled our test environment carefully, and validated results against manual analysis for a subset of cases. Nevertheless, users should consider their specific development environment when applying our findings, as mkcheck2’s performance and accuracy may vary depending on project structure, build system complexity, and workflow patterns.

5 Conclusions

This paper has presented mkcheck2, a novel approach to build dependency verification that addresses the critical challenges of scalability and efficiency in modern software development.

By leveraging eBPF for non-invasive system call tracing and implementing incremental analysis techniques, mkcheck2 achieves significant performance improvements while maintaining high accuracy in dependency detection. Our eBPF-based approach operates entirely within the kernel without process interruption, eliminating the performance penalties associated with traditional ptrace methods.

Our evaluation demonstrates that mkcheck2 successfully addresses three key challenges in build dependency verification:

Performance Overhead: Using efficient eBPF-based tracing, mkcheck2 reduces the project-averaged build time overhead to just 0.3%, significantly better than previous approaches that often introduced 200–1000% overhead. By eliminating costly context switches, our approach enables better parallelism in build processes.

Scalability: Through incremental analysis, mkcheck2 reduces the average per-commit analysis time across all 300 projects from 1267.49 seconds to just 23.56 seconds, making continuous dependency verification practical in CI environments even when dozens of commits are analysed in succession.

Accuracy: Despite these performance improvements, mkcheck2 maintains high detection accuracy, successfully identifying all missing dependencies and 92.0% of redundant dependencies across various projects.

The key innovation of mkcheck2 lies in its synergistic combination of efficient eBPF-based system call tracing and intelligent incremental analysis for rapid processing of incremental changes. This combination fundamentally transforms the practicality of continuous dependency verification in modern development workflows.

Future research directions include deeper integration with CI/CD pipelines to automatically prevent dependency errors, extension to additional build systems beyond Make-based environments, and exploration of automatic repair techniques for detected dependency issues. As software systems and build processes grow increasingly complex, the techniques developed in this work will contribute to maintaining build system correctness at scale, helping developers ensure efficient and correct build processes in complex software projects.

References

[1]

B. Adams, K. De Schutter, H. Tromp, and W. De Meuter. 2008. The Evolution of the Linux Build System. Electronic Communications of the EASST 8 (2008).

[2]

Mahmoud Alfadel and Shane Mcintosh. 2024. The Classics Never Go Out of Style An Empirical Study of Downgrades from the Bazel Build Technology. 2024 IEEE/ACM 46th International Conference on Software Engineering (ICSE) (2024), 2881–2892. https://api.semanticscholar.org/CorpusID:268291039

[3]

Rahul Bajaj, Eduardo Fernandes, Bram Adams, and Ahmed E. Hassan. 2023. Unreproducible builds: time to fix, causes, and correlation with external ecosystem factors. Empirical Softw. Engg. 29, 1 (Nov. 2023), 48 pages. doi:10.1007/s10664-023-10399-4

[4]

Cor-Paul Bezemer, Shane McIntosh, Bram Adams, Daniel M. Germán, and A. Hassan. 2017. An empirical study of unspecified dependencies in make-based build systems. Empirical Software Engineering 22 (2017), 3117–3148. https://api.semanticscholar.org/CorpusID:37995494

[6]

M. Christakis, K. R. M. Leino, and W. Schulte. 2014. Formalizing and Verifying a Modern Build Language. In International Symposium on Formal Methods. Springer, 643–657. doi:10.1007/978-3-319-06410-943

[7]

Johann Eder and Karl Wiggisser. 2006. A DAG Comparison Algorithm and Its Application to Temporal Data Warehousing. In Advances in Conceptual Modeling - Theory and Practice, John F. Roddick, V. Richard Benjamins, Samira Si-said Cherfi, Roger Chiang, Christophe Claramunt, Ramez A. Elmasri, Fabio Grandi, Hyoil Han, Martin Hepp, Miltiadis D. Lytras, Vojislav B. Mišić, Geert Poels, Il-Yeol Song, Juan Trujillo, and Christelle Vangenot (Eds.). Springer, Berlin, Heidelberg, 217–226. doi:10.1007/1190888327

[9]

Gang Fan, Chengpeng Wang, Rongxin Wu, Xiao Xiao, Qingkai Shi, and Charles Zhang. 2020. Escaping dependency hell: finding build dependency errors with the unified dependency graph. In Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis(ISSTA 2020). Association for Computing Machinery, New York, NY, USA, 463–474. doi:10.1145/3395363.3397388event-place: Virtual Event, USA.

[11]

Keheliya Gallaba, John Skirving Ewart, Yves Junqueira, and Shane McIntosh. 2022. Accelerating Continuous Integration by Caching Environments and Inferring Dependencies. IEEE Transactions on Software Engineering 48 (2022), 2040–2052. https://api.semanticscholar.org/CorpusID:230349143

[12]

M. Gligoric, W. Schulte, C. Prasad, D. van Velzen, I. Narasamdya, and B. Livshits. 2014. Automated Migration of Build Scripts Using Dynamic Analysis and Search-Based Refactoring. In Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications(OOPSLA ’14). ACM, 599–616. doi:10.1145/2660193.2660239

[13]

Lorin Hochstein and Yang Jiao. 2011. The Cost of the Build Tax in Scientific Software. In 2011 International Symposium on Empirical Software Engineering and Measurement. 384–387. doi:10.1109/ESEM.2011.54

[14]

Kaifeng Huang, Bihuan Chen, Susheng Wu, Junming Cao, Lei Ma, and Xin Peng. 2022. Demystifying Dependency Bugs in Deep Learning Stack. Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (2022). https://api.semanticscholar.org/CorpusID:250916937

[15]

Sunzhou Huang and Xiaoyin Wang. 2024. Build Issue Resolution from the Perspective of Non-Contributors. 2024 39th IEEE/ACM International Conference on Automated Software Engineering (ASE) (2024), 2304–2308. https://api.semanticscholar.org/CorpusID:273461674

[16]

R. Levin and P. R. McJones. 1993. The Vesta Approach to Precise Configuration of Large Software Systems. Technical Report SRC Research Report 105. Digital Equipment Corporation, Systems Research Center.

[17]

Nándor Licker and Andrew Rice. 2019. Detecting incorrect build rules. In Proceedings of the 41st International Conference on Software Engineering(ICSE ’19). IEEE Press, Montreal, Quebec, Canada, 1234–1244. doi:10.1109/ICSE.2019.00125

[19]

Christian Macho, Fabian Oraze, and Martin Pinzger. 2024. DValidator: An approach for validating dependencies in build configurations. Journal of Systems and Software 209 (2024), 111916. doi:10.1016/j.jss.2023.111916

[22]

S. McIntosh, B. Adams, and A. E. Hassan. 2010. The Evolution of Ant Build Systems. In Proceedings of the 7th IEEE Working Conference on Mining Software Repositories (MSR). 42–51. doi:10.1109/MSR.2010.5463341

[23]

S. McIntosh, B. Adams, T. H. D. Nguyen, Y. Kamei, and A. E. Hassan. 2011. An Empirical Study of Build Maintenance Effort. In Proceedings of the 33rd International Conference on Software Engineering. ACM, 141–150. doi:10.1145/1985793.1985813

[24]

P. Miller. 1998. Recursive Make Considered Harmful. AUUGN Journal of AUUG Inc 19, 1 (1998), 14–25.

[25]

A. Mokhov, N. Mitchell, and S. Peyton Jones. 2018. Build Systems à la Carte. Proceedings of the ACM on Programming Languages 2, ICFP (2018), 79:1–79:29. doi:10.1145/3236774

[26]

Yoonjong Na, Seunghoon Woo, Joomyeong Lee, and Heejo Lee. 2024. Cneps: A Precise Approach for Examining Dependencies Among Third-Party C/C++ Open-Source Components. 2024 IEEE/ACM 46th International Conference on Software Engineering (ICSE) (2024), 2918–2929. https://api.semanticscholar.org/CorpusID:269122837

[27]

Rachel Potvin and Josh Levenberg. 2016. Why Google stores billions of lines of code in a single repository. Commun. ACM 59, 7 (June 2016), 78–87. doi:10.1145/2854146

[28]

Hyunmin Seo, Caitlin Sadowski, Sebastian Elbaum, Edward Aftandilian, and Robert Bowdidge. 2014. Programmers’ build errors: a case study (at google). In Proceedings of the 36th International Conference on Software Engineering(ICSE 2014). Association for Computing Machinery, New York, NY, USA, 724–734. doi:10.1145/2568225.2568255event-place: Hyderabad, India.

[29]

M. Shridhar, B. Adams, and F. Khomh. 2014. A Qualitative Analysis of Software Build System Changes and Build Ownership Styles. In Proceedings of the 8th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement. ACM, 29:1–29:10. doi:10.1145/2652524.2652547

[30]

Thodoris Sotiropoulos, Stefanos Chaliasos, Dimitris Mitropoulos, and Diomidis Spinellis. 2020. A model for detecting faults in build specifications. Proc. ACM Program. Lang. 4, OOPSLA (Nov. 2020). doi:10.1145/3428212Place: New York, NY, USA Publisher: Association for Computing Machinery.

[31]

Sarah Spall, Neil Mitchell, and Sam Tobin-Hochstadt. 2020. Build scripts with perfect dependencies. Proc. ACM Program. Lang. 4, OOPSLA (Nov. 2020). doi:10.1145/3428237Place: New York, NY, USA Publisher: Association for Computing Machinery.

[32]

Ahmed Tamrawi, Hoan Anh Nguyen, Hung Viet Nguyen, and Tien N. Nguyen. 2012. Build code analysis with symbolic evaluation. In 2012 34th International Conference on Software Engineering (ICSE). 650–660. doi:10.1109/ICSE.2012.6227152

[33]

Rongxin Wu, Minglei Chen, Chengpeng Wang, Gang Fan, Jiguang Qiu, and Charles Zhang. 2023. Accelerating Build Dependency Error Detection via Virtual Build. In Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering(ASE ’22). Association for Computing Machinery, New York, NY, USA. doi:10.1145/3551349.3556930event-place: Rochester, MI, USA.