Skip to main content

Module error

Module error 

Source
Expand description

Codes for crate::Error, one per variant. See crate::Error::code.

Constants§

CONFIG
The caller asked for something that does not hold together: an unparseable --user, no output, an --install landing on a library the closure needs at that exact path, or a plan grown past crate::plan::PLAN_ENTRIES_MAX.
DISALLOWED_LIBRARY
The closure needs a library --allow-library does not name. The allow-list is a contract: a new native dependency fails the build instead of growing the image.
ELF
A file begins with the ELF magic but does not parse: truncated, or with a header whose offsets do not describe its own contents. Such a file is skipped while probing search directories, and reported only for a file elfpak was told to read.
INCOMPATIBLE_ARCHITECTURE
A candidate with the right name has the wrong machine, ELF class or endianness. It is reported in preference to plain absence, because it names what was found; the usual cause is a host library reached while packaging from a sysroot for another architecture.
IO
A read or write of a named path failed, carrying the OS error. Probing a directory that does not exist is not an error; a missing candidate is an ordinary answer during a lookup.
LIMIT_EXCEEDED
A named bound was reached: nodes or edges in the closure, or directories in one lookup. Every bound sits far above what a real program produces, so this means synthetic or malformed input rather than a large application.
MANIFEST
A manifest could not be read, or does not parse as one.
MISSING_RUNTIME_FILE
A runtime policy feature found nothing to contribute: --ca-certificates with no trust store in the source root, --tzdata with no zoneinfo. A bundle that silently shipped neither would fail at its first HTTPS request.
MISSING_SOURCE_PATH
An --include names a path the source root does not have. E2004 covers the same situation for runtime policy, which probes several candidate locations; an --include names exactly one.
NOT_ELF
The input does not start with \x7fELF: a shell script, a wrapper, or the wrong file.
PATH_ESCAPE
A path resolved outside the root it belongs to, or through a symlinked parent leading out of the output directory.
SOURCE_CHANGED
A source file’s digest or size no longer matched the plan when its bytes were copied. Something wrote to the source root during the run, and the output would no longer match its own manifest.
SYMLINK_LOOP
Resolving a logical path took more symlink hops than glibc’s SYMLOOP_MAX, so it is a path the loader would not resolve either.
UNRESOLVED_LIBRARY
A DT_NEEDED name or PT_INTERP matched nothing. The directories searched are listed in the order the loader would have tried them.
UNSUPPORTED_ARCHITECTURE
The executable targets a machine elfpak does not package for. The raw e_machine is named too, because the supported set is smaller than the set the parser can identify.
VERIFY_FAILED
elfpak verify found at least one problem. This carries the counts; the problems themselves are printed as they are found.