Back to Kindler Main Page

Kindler Diagnostic Manual

Kindler Logo

This manual provides detailed information about Kindler error and warning codes.


Table of Contents


Diagnostic Format

Kindler diagnostics follow this format:

E301: No cache found
Bootstrap required before generating build files
Run: kindler.lua bootstrap

Components:

Severity Levels

Prefix Severity Description
E Error Fatal error that prevents build file generation
W Warning Potential issue but generation continues

Category Ranges

Range Category
E1XX / W1XX Project file issues
E2XX / W2XX Module issues
E3XX / W3XX Host/compiler issues
E4XX / W4XX Project integrity and generic issues
E5XX-E9XX / W5XX-W9XX Reserved for future use

E1XX: Project File Parsing Errors

Errors related to reading and parsing .kindler project files.

E101: Project file not found

Cause: Kindler could not locate a .kindler file in the current directory.

Solution:

E102: Project file parse error

Cause: The .kindler file contains invalid UCL syntax.

Common causes:

Solution: Check the line and column number in the error message. Verify syntax matches UCL format.

Error: line 15 col 10: expected '}' in object
Check line 15 for unclosed braces

E103: Multiple .kindler files found

Cause: More than one .kindler file exists in the directory.

Solution: Specify which file to use:

kindler.lua generate --file=myproject.kindler

E105: Missing required section: project

Cause: The .kindler file is missing the project section.

Solution: Add a project section:

project {
    name = "myapp";
    lang = "c99";
}

E106: Missing required section: build

Cause: The .kindler file is missing the build section.

Solution: Add a build section:

build {
    sources = ["main.c"];
}

E107: Missing required field: project.name

Cause: The project section lacks a name field.

Solution: Add name to project:

project {
    name = "myapp";  # REQUIRED
    lang = "c99";
}

E108: Missing required field: project.lang

Cause: The project section lacks a lang field.

Solution: Specify language standard:

project {
    name = "myapp";
    lang = "c99";  # REQUIRED
}

Valid languages: c89, ansi-c, c99, c11, c17, c++98, c++03, c++11, c++14, c++17, c++20

E109: Missing required field: build.sources

Cause: The build section lacks a sources list.

Solution: List source files:

build {
    sources = ["main.c", "util.c"];  # REQUIRED
}

E110: Invalid language specification

Cause: The lang value is not recognized.

Solution: Use a supported language standard (see E108).

E111: Invalid export-default value

Cause: The export-default is not make, gmake, ninja, or any.

Solution: Use valid value:

project {
    export-default = "make";  # or gmake, ninja, any
}

E115: install.prefix required when install section present

Cause: Install section exists but lacks prefix.

Solution: Add prefix:

install {
    prefix = "/usr/local";  # REQUIRED
}

E116: install.libdir cannot be manually specified

Cause: Attempted to set install.libdir directly.

Why: Library directory is platform-specific (lib, lib32, lib64, lib/x86_64-linux-gnu).

Solution: Remove libdir field. Kindler determines this from OS hints and ABI.


E2XX: Module Errors

Errors related to loading and executing modules.

E201: Module not found

Cause: A module listed in modules.load could not be found.

Search paths:

  1. ./modules/<name>.lua (project-local)
  2. ~/.config/kindler/modules/<name>.lua (user)
  3. /path/to/kindler/modules/<name>.lua (built-in)

Solution:

E202: Module failed to load

Cause: The module file contains Lua syntax errors.

Solution: Check the module file for Lua syntax errors. The error message will include line number.

E203: Module missing required field: name

Cause: Module table lacks name field.

Solution: Ensure module returns proper table:

return {
    name = "mymodule",  -- REQUIRED
    hooks = {"post-parse"},
    ["post-parse"] = function(ctx) ... end
}

E205: Module hook function failed

Cause: A module's hook function raised an error during execution.

Solution: Check the module code. The error message will include the specific Lua error.


E3XX: Host/Compiler Problems

Errors related to the build environment and tools.

E301: No cache found

Cause: Kindler has not been bootstrapped on this system.

Solution: Run bootstrap:

kindler.lua bootstrap

This creates a cache at ~/.config/kindler/cache/<hostname>.lua

E302: Cache corrupted or invalid

Cause: The cache file is malformed or damaged.

Solution: Re-run bootstrap:

kindler.lua bootstrap --force

E303: Specified compiler not found in cache

Cause: Project specifies a compiler that was not detected during bootstrap.

Example:

project {
    compiler = "clang";  # But only gcc was found
}

Solution:

E304: No compilers available on system

Cause: Bootstrap could not find any supported compilers.

Solution: Install a compiler:

Then re-run bootstrap.

E305: Compiler does not support requested language

Cause: The selected compiler doesn't support the requested language standard.

Example: Requesting c++20 with GCC 7.x

Solution:

E307: Build tool not available

Cause: The requested build system (make/ninja) is not installed.

Solution: Install the build tool or change export-default:

# Install make
sudo apt install make  # Debian/Ubuntu
pkg install gmake    # BSD

E4XX: Project Integrity Problems

Errors related to project files and dependencies.

E401: Source file not found

Cause: A file listed in build.sources does not exist.

Solution:

E402: Include directory not found

Cause: A directory in build.includes does not exist.

Solution: Create the directory or remove from includes list.

E404: Dependency not found

Cause: A required library could not be found by any method (pkgconf, OS hints, generic search).

Example:

dependencies {
    requires = ["zlib"];  # But zlib is not installed
}

Solution:

E405: Dependency version mismatch

Cause: Found library but version doesn't meet constraint.

Example:

requires = ["zlib >= 1.2.11"];  # But found 1.2.8

Solution:

E407: Clock skew detected

Cause: A file has a timestamp in the future.

Why this matters: Make uses timestamps to determine what to rebuild. Future timestamps break incremental builds.

Solution:


W1XX: Project File Warnings

Non-fatal issues with project file content.

W101: Deprecated field used

Cause: Project uses a field that will be removed in a future version.

Action: Update project file to use new syntax. Check CHANGELOG for migration guide.

W102: Unknown field in project section

Cause: Project section contains an unrecognized field.

Effect: Field is ignored.

Action: Check for typos. Remove if not needed.

W105: Nonsensical configuration

Examples:

Action: Review configuration for consistency.

W107: ABI specified on non-multi-ABI platform

Cause: Project specifies build.abi but OS doesn't support multiple ABIs.

Example: Setting abi = "n32" on Linux (IRIX-specific)

Effect: ABI setting is ignored.

Action: Remove ABI specification or make it conditional.

W111: Duplicate source file in list

Cause: Same file appears multiple times in build.sources.

Effect: File will only be compiled once.

Action: Remove duplicate.


W2XX: Module Warnings

W201: Module loaded but unused

Cause: Module was loaded but none of its hooks were triggered.

Possible reasons:

Action: Remove unused module from load list.

W204: Module execution took unusually long

Cause: A module hook took more than expected time to execute.

Action: Review module code for inefficiency. Consider optimizing or making it optional.


W3XX: Host/Compiler Warnings

W301: Compiler version unknown

Cause: Could not determine compiler version (version detection failed).

Effect: Version-specific checks cannot be performed.

Action: Usually safe to ignore. If issues arise, check compiler manually.

W302: Compiler may not support requested language standard

Cause: Compiler version is old and may not support the requested language.

Example: GCC 4.8 with c++17

Action:

W303: Cache is old

Cause: Bootstrap cache is more than 30 days old.

Recommendation: Re-run bootstrap if toolchain has changed:

kindler.lua bootstrap --force

W305: Requested build tool not available (falling back)

Cause: Project requests ninja but only make is installed.

Effect: Will use available tool instead.

Action: Install preferred tool or update export-default.

W306: pkgconf not found

Cause: pkgconf is not installed on system.

Effect: Dependency resolution limited to OS hints and generic search.

Action: Install pkgconf for better dependency detection:

sudo apt install pkgconf  # Debian/Ubuntu
pkg install pkgconf      # BSD

W307: Unsupported compiler (proceeding anyway)

Cause: Detected compiler is not in Kindler's hint database.

Effect: Using generic flags. May not work optimally.

Action:

W308: OS lacks POSIX.2008 support

Cause: Operating system does not fully support POSIX.2008 standard.

Effect: Some features may not be available.

Action: Use config.h to detect missing features and provide alternatives.


W4XX: Generic Warnings

W401: Source file has future timestamp

Cause: File modification time is in the future.

Effect: May cause unnecessary rebuilds.

Solution: Touch the file: touch filename.c

W402: Dependency found but version cannot be determined

Cause: Found library but pkgconf couldn't determine version.

Effect: Version constraints cannot be verified.

Action: Build will proceed. Test thoroughly if version matters.

W404: Using generic library search

Cause: Library not found via pkgconf or OS hints, using fallback search.

Effect: May find wrong library or wrong version.

Action: Verify library is correct. Consider adding to OS hints.

W406: Generated file will overwrite existing file

Cause: Output file (Makefile, config.h) already exists.

Effect: Existing file will be replaced.

Action: Backup important files before generating.

W408: PKG_CONFIG environment variable set to pkg-config

Cause: PKG_CONFIG=pkg-config in environment.

Issue: pkg-config is in maintenance mode. Kindler requires pkgconf 0.9.6+

Solution:

unset PKG_CONFIG
# or
export PKG_CONFIG=pkgconf

Suppressing Warnings

Currently there is no way to suppress specific warnings. This may be added in a future version.

Rationale: Warnings indicate potential issues. Kindler aims to be informative without being intrusive.


Reporting Issues

If you encounter an error or warning that:

Please report it:


Copyright 2026 Setsuna Software L.C. and Kazuo Kuroi

Back to Kindler Main Page | Back to Setsuna Software