Source build and module ABI
Read a build manifest before choosing a module
A module extends Nginx with directives, protocol handling or request processing. Some are linked into the executable; others are shared objects loaded when a configuration is read. Start with the installed executable, not an online list of features: nginx -V reports its version, compiler and configure arguments. A flag ending in =dynamic indicates a build choice, not proof that the corresponding shared object is installed or loaded. Check the package inventory and exact configuration separately. Our local 1.26.3 binary has the stub status module built in. Treat this old pinned version as a learning baseline, not a recommendation for production.
nginx -V 2>&1# Inspect --with-http_stub_status_module and --with-compat.# A dynamic build flag does not prove a module file is present.Build a reproducible candidate away from the host
The configure script selects source files, optional libraries and compile settings; make produces artifacts. Pin the source release or commit, verify its provenance and digest, record the compiler, architecture, dependency versions and all configure arguments. Use an unprivileged disposable build environment with only reviewed inputs. The following is a manual candidate workflow inside an already verified 1.26.3 source directory, with a reviewed addon at the indicated path. The path is illustrative and must be replaced with a real reviewed source directory. Build only, not installation. Run the tests on the candidate executable rather than replacing the host binary.
./configure --with-compat --add-dynamic-module=/reviewed/addonmake modules# Inspect artifacts under objs/; do not install or load unknown files.Separate source compatibility and binary compatibility
Source compatibility means code can be rebuilt with a target release; ABI compatibility concerns compiled structures, calling conventions and symbol expectations. The 1.26.3 loader checks module version and build signature separately. --with-compat relaxes some build-option differences; it cannot guarantee arbitrary version, dependency, platform or private API compatibility. Match the target package build and verify both provenance and compatibility. Even nginx -t loads native code, so never use it to inspect untrusted shared objects. This main-context example is intentionally not executed: the module path denotes a reviewed artifact that does not exist in this lab.
# Illustrative only, before events{} and http{}load_module /reviewed/modules/ngx_http_example_module.so;Navigate the pinned source read-only
Use the development guide as a map and the target release as the implementation. In a verified local source tree, locate configure/build wiring, the module declaration and loader checks. Read the loader function before deciding which build metadata to retain. The commands below are read-only; the current lab has no source checkout. Record paths and findings without copying upstream source into the lesson. Compilation, upstream regression tests, configuration acceptance and HTTP execution are different evidence gates.
git rev-parse HEADgit grep -n "ngx_add_module" -- src/coregit grep -n "ngx_http_stub_status_module" -- auto src/http# Read the matching files; do not modify the source.Apply what you learned
Practice: Read nginx -V and distinguish built-in, dynamic-build, installed and loaded evidence. Explain why --with-compat does not settle version mismatch. Draft a source and dependency manifest without installing anything. The manual exercise and quiz are staged separately. Related references and the next lesson are listed in the chapter authored map.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Source build and module ABI
Assess module architecture, build compatibility and runtime reasoning.
Which command reports compiled configure arguments?
What does a dynamic build flag establish?
What does the pinned loader check?
What does --with-compat guarantee?
What should precede even a syntax test of a shared object?