Use it when building software from source or when a build fails.
Build Tools
Build tools compile and package software: compilers (gcc, clang), make and build systems (CMake, Meson, autotools), and language tools (pip, npm, cargo, go).
1. Toolchain installed: gcc --version, make --version.
2. Error "X.h: No such file" → install the -dev / -devel package.
3. Configure/CMake output — missing dependencies listed.
4. Language tools: use venv/npm ci, not sudo pip.
5. Rebuild cleanly (make clean).
toolchain + dependencies → configure → compile → link → install
For Software & Source → Build Tools, continue with the first unproven Topic check: Record exact target, variables/options, environment and build-tool version. If that boundary is healthy, advance to the adjacent check: Compare incremental output with a clean build when stale dependency state is plausible. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
build definition → selected target/options → environment/tool discovery → dependency graph → compile/link actions → outputs → install/package step → verification
Healthy evidence: the intended target, flags, dependency graph and toolchain run from a known state and produce identifiable outputs that pass clean-build and runtime checks
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Record exact target, variables/options, environment and build-tool version.
- Compare incremental output with a clean build when stale dependency state is plausible.
- Inspect the actual produced artifact, architecture and linked dependencies.
- Install/run in the intended environment and execute the original acceptance test.
Verification chain. build definition → selected target/options → environment/tool discovery → dependency graph → compile/link actions → outputs → install/package step → verification
Step 3 Commands Verify boundary
./configure --prefix=/usr/local
make -j$(nproc)
make install
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: incremental timestamps, cached/generated files, environment leakage, wrong target or parallel ordering make a green build non-reproducible or semantically wrong
It does not show unobserved data, metadata, revisions, dependencies, consumers or time periods. make returning zero shows the selected target completed under the current dependency graph, but it does not show stale outputs were impossible or that the artifact works.
Step 5 Common mistakes Narrow the fault
- Installing builds into
/usrand overwriting package files.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Install the distribution's development group first. Missing headers mean missing -dev/-devel packages. Use language-specific virtual environments (venv, node_modules) instead of installing into the system.
git status / git log --oneline -5— repository stateldd <binary>— shared librariesldconfig -p | grep <lib>— libraries in the linker cachemake --version; gcc --version— build tools
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
make returning zero shows the selected target completed under the current dependency graph, but it does not show stale outputs were impossible or that the artifact works.
In depth
Building software from source
Some software has to be built on the server: a newer version than the distribution offers, a module, or in-house code. The GNU make manual describes the rule format that most builds rest on:
- A rule names a target, its prerequisites, and a recipe.
- Every recipe line must begin with a tab, unless
.RECIPEPREFIXchanges it. - make runs the recipe when the target needs to be created or updated from its prerequisites.
- Targets can also name actions, such as
clean(phony targets).
Common build systems
| System | Typical sequence |
|---|---|
| Autotools | ./configure --prefix=/usr/local && make -j$(nproc) && sudo make install |
| CMake | cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr/local && cmake --build build -j && sudo cmake --install build |
| Meson | meson setup build --prefix=/usr/local && ninja -C build && sudo ninja -C build install |
| Go | go build -o bin/app ./cmd/app |
| Rust | cargo build --release |
Build dependencies
| Distribution | Install the toolchain | Install a package's build dependencies |
|---|---|---|
| Debian / Ubuntu | apt install build-essential | apt build-dep <package> (deb-src enabled) |
| RHEL family | dnf groupinstall "Development Tools" | dnf builddep <package> (CRB often needed) |
Installing builds cleanly
| Approach | Advantage |
|---|---|
--prefix=/usr/local or /opt/<name> | Never mixes with package-managed files |
make DESTDIR=/tmp/stage install, then package it | Exact list of installed files |
| Build a real package (fpm, rpmbuild, dpkg-buildpackage) | The package manager can upgrade and remove it |
| Build on a build host, not on production | No compilers on production servers |
host$ sudo apt install -y build-essential pkg-config libssl-dev
host$ tar xf tool-2.3.1.tar.gz && cd tool-2.3.1
host$ ./configure --prefix=/opt/tool-2.3.1 && make -j"$(nproc)"
host$ make check
host$ make DESTDIR=/tmp/stage install && find /tmp/stage -type f | head
host$ sudo make install && sudo ln -sfn /opt/tool-2.3.1 /opt/tool
host$ cat Makefile | sed -n '1,8p'
.PHONY: all clean
all: bin/report
bin/report: src/main.c src/util.c
$(CC) $(CFLAGS) -o $@ $^
clean:
rm -f bin/report
Versioned install directories
Installing into /opt/tool-2.3.1, with a /opt/tool symlink, makes upgrades and rollbacks a matter of switching the link. The DESTDIR step shows exactly which files make install would write, before anything touches the live system.
Documented example, not captured output.
How it works at runtime
Build Tools is part of Software & Source → Build Tools. Build Tools covers the Linux build orchestration layer such as make and project-specific generators, including dependency graphs, targets, environment, incremental state and clean/reproducible builds.
Topic-specific state model. Build Tools covers the Linux build orchestration layer such as make and project-specific generators, including dependency graphs, targets, environment, incremental state and clean/reproducible builds.
Interpretation rule. - make exit 0 ≠ reproducible clean build.
- Target built ≠ intended configuration selected.
- Incremental success ≠ dependency graph complete.
- Artifact produced ≠ runtime verified.
Quick reference
Build toolchain basics:
dnf groupinstall 'Development Tools' # gcc, make, autoconf …
apt install build-essential pkg-config
./configure --prefix=/usr/local && make -j"$(nproc)" && make install
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j && cmake --install build
pkg-config --cflags --libs openssl
Install build tools on build hosts or containers, not on production servers (smaller attack surface). checkinstall or fpm can turn make install into a removable package.
Limits and how it fails
Primary failure point. make returning zero shows the selected target completed under the current dependency graph, but it does not show stale outputs were impossible or that the artifact works.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Build Tools owns build orchestration and dependency execution; compiler internals belong to the compiler/toolchain and package installation belongs to Package Management.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Software & Source → Build Tools. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://git-scm.com/docs · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Build Tools operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Build Tools.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Build Tools covers the Linux build orchestration layer such as make and project-specific generators, including dependency graphs, targets, environment, incremental state and clean/reproducible builds. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin exact source/revision or recovery point → verify inputs/consistency → observe copy/build/link result → read back destination/artifact and metadata/dependencies → restore/run in intended environment → repeat original workload + regression check. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | build definition → selected target/options → environment/tool discovery → dependency graph → compile/link actions → outputs → install/package step → verification | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | make returning zero proves the selected target completed under the current dependency graph; it does not prove stale outputs were impossible or that the artifact works. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux backup/source evidence can establish this proof path: build definition → selected target/options → environment/tool discovery → dependency graph → compile/link actions → outputs → install/package step → verification | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove unobserved data, metadata, revisions, dependencies, consumers or time periods. make returning zero proves the selected target completed under the current dependency graph; it does not prove stale outputs were impossible or that the artifact works. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven backup/source/build boundary, capture adjacent identity/read-back/runtime evidence, make only the demonstrated persistent change, then repeat the original workload plus a regression check. | Continue to the next unresolved boundary while preserving the original test condition. |
Build Tools · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Build Tools |
|---|---|
| Topic path | Software & Source → Build Tools |
| Runtime state | Build Tools covers the Linux build orchestration layer such as make and project-specific generators, including dependency graphs, targets, environment, incremental state and clean/reproducible builds. |
| Fast checks | - Record exact target, variables/options, environment and build-tool version. - Compare incremental output with a clean build when stale dependency state is plausible. - Inspect the actual produced artifact, architecture and linked dependencies. - Install/run in the intended environment and execute the original acceptance test. |
| Verification chain | build definition → selected target/options → environment/tool discovery → dependency graph → compile/link actions → outputs → install/package step → verification Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | make returning zero proves the selected target completed under the current dependency graph; it does not prove stale outputs were impossible or that the artifact works. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |