TL;DR
This paper introduces BUILD-BENCH, a more realistic benchmark for automatically compiling open-source software (OSS) that better reflects the challenges faced in the real world. They also present OSS-BUILD-AGENT, an LLM-based agent that achieves state-of-the-art performance on this benchmark by intelligently retrieving build instructions and iteratively resolving errors.
What Problem Does This Paper Address?
Compiling open-source software (OSS) is a notoriously difficult and time-consuming task for human developers. It often involves dealing with missing dependencies, undocumented configurations, and even the need to patch source code. Existing automated compilation methods, whether rule-based or early LLM approaches, often fall short because they rely on simplified datasets or predefined workflows that can't adapt to the sheer diversity and messiness of real-world OSS. This lack of robust automated compilation hinders software integration, program analysis, and vulnerability discovery. The authors aim to bridge this gap by creating a more challenging benchmark and a more capable LLM agent to tackle this complex software engineering problem.
Methods
The core of the paper lies in two main contributions:
- BUILD-BENCH: This is a new benchmark designed to be more representative of real-world OSS compilation challenges. Instead of focusing only on highly popular projects, it includes a diverse set of C/C++ repositories, many of which are less well-documented and maintained, mirroring the "long-tail" distribution of OSS. The benchmark was carefully curated through manual inspection and labeling.
- OSS-BUILD-AGENT: This is an LLM-based agent designed for automated compilation. It features two key components:
- LLM-Assisted Retrieval: This module intelligently searches for and synthesizes build instructions from various sources (READMEs, wikis, etc.) by mimicking a human engineer's approach to documentation.
- Multi-Agent Compilation System: This system uses two cooperating agents: a Bash Command Generator that proposes compilation commands based on retrieved instructions and execution feedback, and an Executor Agent that runs these commands in a containerized environment. This iterative process allows the agent to learn from execution results and resolve errors like missing dependencies or incorrect flags.
Datasets
The paper introduces BUILD-BENCH, a new benchmark consisting of 148 manually verified compilable open-source software (OSS) repositories. This dataset was derived from a larger corpus of 2.77M C and 4.23M C++ repositories, filtered to exclude low-quality projects and forks. BUILD-BENCH is designed to be statistically representative of real-world OSS, with a focus on less popular, more challenging projects, unlike previous benchmarks that often focused on highly curated, popular repositories. A validation set of 70 popular repositories was also used for developing their agentic baseline.
Key Insights and Ideas
- Real-world OSS is messy: The paper strongly emphasizes that popular OSS projects are not representative of the vast majority of challenges encountered when compiling OSS. BUILD-BENCH's focus on less popular projects highlights this.
- LLM agents excel at iterative problem-solving: The success of OSS-BUILD-AGENT demonstrates that LLM agents, when designed for iterative reasoning and feedback loops, can effectively tackle complex, multi-step tasks like compilation, outperforming static rule-based approaches.
- Intelligent retrieval is crucial: The LLM-Assisted Retrieval module's ability to find and synthesize scattered build instructions significantly boosts the agent's performance, showing that simply looking at the README isn't enough.
- Model intelligence matters: While the agent framework is model-agnostic, stronger LLMs (like Claude 3.7-Sonnet) consistently achieve better performance, indicating that advanced reasoning capabilities are key to handling complex compilation failures.
- Coding specialization can be a double-edged sword: Interestingly, a model specialized in coding (Qwen3 Coder) underperformed, suggesting that general reasoning and natural language understanding might be more critical for the retrieval and error resolution aspects of compilation.
Key Results
- OSS-BUILD-AGENT achieves state-of-the-art performance: The best configuration of OSS-BUILD-AGENT (using Claude 3.7-Sonnet with LLM-Assisted Retrieval) reached 66.4% strict validated success on BUILD-BENCH, significantly outperforming rule-based methods (around 10-30% success) and even other agentic methods like CompileAgent (49.7% strict success).
- BUILD-BENCH is challenging: The performance drop of CompileAgent from its original benchmark (89% success) to BUILD-BENCH (49.7% success) highlights the increased difficulty and realism of the new benchmark.
- LLM-Assisted Retrieval is effective: This module achieved 73.8% retrieval accuracy, significantly outperforming CompileAgent's retrieval module (46.2%).
- Iterative error resolution is key: The agent's ability to perform multiple attempts at fixing errors (pass@k) substantially improves success rates, demonstrating the value of its iterative, feedback-driven approach.
Limitations and Future Work
- Benchmark size: The authors acknowledge that the number of compilable repositories in BUILD-BENCH (148) is relatively small, though they compensate with intensive manual verification.
- Agent instability: The agentic framework, while powerful, exhibits some instability, leading to performance fluctuations across runs. This is attributed to LLM non-determinism and varied retrieval trajectories.
- Future work: The authors suggest further enhancing agent retrieval capabilities with advancements in AI agent research. They also invite researchers to explore different agent design philosophies and validate them on BUILD-BENCH to benefit both developers and the research community. They hope BUILD-BENCH will inspire further innovation in LLM agents for software engineering tasks.
Summary updated