Log Locations
Build logs are organized by build phase:Common Error: Unresolvable Circular Dependencies
The most common build error is an unresolvable circular dependency in the dependency graph.Example Error
What This Means
This is a build-time circular dependency. The toolkit doesn’t allow circular build-time dependencies (circular run-time dependencies are allowed).Reading the Error
Errors are easier to understand when read backwards (from the end):Understanding the Node Format
Each node in the error uses this format:{package-name-version-NODE_TYPE<State>}
Node Types:
BUILD<Build>- Represents building the packageRUN<Meta>- Represents the runnable/installable package
{XXX-RUN} --> {YYY-BUILD}- YYY has a build-time dependency on XXX{XXX-RUN} --> {YYY-RUN}- YYY has a runtime dependency on XXX{XXX-BUILD} --> {XXX-RUN}- XXX must be built before it can be used
Complete Node Type Reference
Complete Node Type Reference
For full details on graph nodes, see the Package Building Process documentation.All Node Types:
- TypeLocalBuild - Local package that can be built
- TypeLocalRun - Local package that can be installed/used
- TypeRemoteRun - Package that must be downloaded from remote
- TypeGoal - Special node grouping packages together
- TypePureMeta - Organizational node for resolving cycles
- StateBuild - Should be built
- StateBuildError - Build failed despite dependencies being met
- StateUpToDate - Already available locally
- StateMeta - Organizational/ordering node
- StateUnresolved - No source found yet (for remote nodes)
- StateCached - Downloaded and cached locally (for remote nodes)
How to Fix Circular Dependencies
There are several strategies to break circular build dependencies:1. Review BuildRequires
1. Review BuildRequires
Most Common Fix - Remove unnecessary build dependenciesCheck each package’s
BuildRequires in the spec files. Often a build dependency is listed but not actually needed for compilation.2. Create Bootstrap Packages
2. Create Bootstrap Packages
For Complex Cycles - Split packages into bootstrap and regular versionsCreate a
-bootstrap variant that builds with minimal dependencies, then have other packages use the bootstrap version.Example: systemd-bootstrap- Builds without certain features
- Provides what other packages need to build
- Full
systemdthen builds usingsystemd-bootstrap
3. Move to Runtime Dependencies
3. Move to Runtime Dependencies
If a dependency is only needed at runtime (not for compilation), move it from This breaks the build-time cycle while maintaining the runtime dependency.
BuildRequires to Requires4. Use Conditional Dependencies
4. Use Conditional Dependencies
For optional features that create cycles, make them conditionalBuild without the feature initially, then rebuild with it enabled after dependencies are available.
Other Common Errors
Missing Source File (404 Error)
Missing Source File (404 Error)
Error:Causes:
- Source file not available locally
- Hash in
*.signatures.jsondoesn’t match any available source - Source server doesn’t have the file
- Check if source file exists in the spec directory
- Verify hash in
*.signatures.jsonis correct - Download correct source file manually to spec directory
- Use
SRPM_FILE_SIGNATURE_HANDLING=updateto update signature
Unresolved Package Dependency
Unresolved Package Dependency
Error:Causes:
- Required package not built locally
- Package not available in remote repositories
- Version constraint too strict
- Check if package spec exists in
SPECS/directory - Verify package is included in build list
- Check if package is available in remote repos
- Add package to
REPO_LISTif in a custom repository - Relax version constraints if too strict
Package Build Failure
Package Build Failure
Error:Causes:
- Compilation errors in source code
- Missing build dependencies
- Incorrect build flags or configuration
- Environment-specific issues
- Check the package-specific log file for detailed errors
- Verify all
BuildRequiresare correct - Test build manually in a chroot environment
- Check for patches that may need updating
- Review spec file for errors in build section
Dynamic Dependency Unsolvable
Dynamic Dependency Unsolvable
Error:Causes:
- No package actually provides the required implicit provide
- Package providing it failed to build
- Typo in the dependency name
- Find which package should provide it:
rpm -q --whatprovides 'pkgconfig(libfoo)' - Check if that package is in the build list
- Verify the providing package built successfully
- Check for typos in the
Requiresline
Chroot Mount Failure
Chroot Mount Failure
Error:Causes:
- Processes still running in chroot
- Mount points still active
- System resources not released
- Wait a few seconds and try again
- Check for hung processes:
lsof +D /path/to/chroot - Manually unmount:
sudo umount -l /path/to/chroot/{dev,proc,sys} - If persists, reboot the host machine
Disk Space Issues
Disk Space Issues
Error:Causes:
- Build directory out of space
- Output directory out of space
- Temporary space exhausted
- Check disk usage:
df -h - Clean old builds:
make clean - Clean package cache:
rm -rf ./../out/RPMS/cache - Increase disk space for build partition
- Change output location:
OUT_DIR=/path/with/more/space make image
Debugging Strategies
Useful Commands
Getting Help
If you’re stuck:- Check Documentation: Review the architecture overview and related pages
- Search Issues: Look for similar problems in the GitHub issues
- Ask the Community: Open a GitHub issue with:
- Error message
- Relevant log excerpts
- Steps to reproduce
- Build environment details
Azure Linux GitHub
Report issues and get help from the community
Next Steps
Build System Overview
Return to the architecture overview
Package Building
Deep dive into dependency graphs and build orchestration