LYR-BLD0001
the C compiler or the linker failed
Reported by build, run, test and bench when compiling the generated C, a package's native C or a build script's C, archiving the runtime, or linking the binary fails, or does not finish within five minutes and is stopped. The message carries the command and what the C compiler wrote, or the limit; the exit code is 2. A link whose failure the build can read is said as its findings instead (LYR-LNK0001–LYR-LNK0003); this error stands for what is left. A header no directory holds adds the directories that were searched.
Explanation
lyric5 translates the program to C and hands it to a C compiler (zig cc, clang or gcc) together with the runtime and the C sources the packages name in [native] or through their build scripts. When that step fails, the build stops with this error and the compiler's own output.
The Lyric program itself was accepted; what failed is C. Look at the quoted output: most often a package's own C source does not compile, a header it includes lies in no directory the package names in include, or the profile needs clang (asan, tsan) and another compiler was found. A failure in C the toolchain generated is a defect of the toolchain and worth a report.
A step that does not finish within five minutes is stopped and said with the limit: a machine under heavy load, or a unit too large for the C compiler. Building again on a quieter machine, or splitting a very large native source, gets past it.
Example
$ cat lyric.toml
[package]
name = "app"
version = "0.1.0"
[native]
sources = ["native/*.c"]
$ cat native/twice.c
#include <stdint.h>
int64_t twice_of(int64_t n) { return n * 2 }
$ lyric5 build
error[LYR-BLD0001]: compiling /home/ada/app/native/twice.c for x86_64-linux-gnu (debug) failed:
zig cc -std=c11 … -c /home/ada/app/native/twice.c -o …
/home/ada/app/native/twice.c:2:43: error: expected ';' after return statement
2 | int64_t twice_of(int64_t n) { return n * 2 }
| ^
| ;
1 error generated.