I have this build.zig
(created with zig init
)
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const mod = b.addModule("afac", .{
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});
const lib = b.addLibrary(.{
.name = "root",
.linkage = .dynamic,
.root_module = mod,
});
// this doesn't do anything
// lib.root_module.link_libc = true;
b.installArtifact(lib);
}
This builds fine (I get a working library for Android):
zig version # 0.15.0-dev.1408+9b509dad3
zig build -Dtarget=aarch64-linux-android
However, from zig 0.15.0-dev.1427+3de8bbd3d
onwards, I get this error:
install
└─ install root
└─ compile lib root Debug aarch64-linux-android failure
error: error: unable to find or provide libc for target 'aarch64-linux.5.10...6.16-android.24'
info: zig can provide libc for related target aarch64-linux.3.7.0-gnu.2.17
info: zig can provide libc for related target aarch64-linux.3.7.0-musl
error: the following command exited with error code 1:
/usr/lib/zig/zig build-lib -ODebug -target aarch64-linux-android -mcpu baseline -Mroot=/tmp/afac/src/root.zig --cache-dir .zig-cache --global-cache-dir /home/adria/.cache/zig --name root -dynamic --zig-lib-dir /usr/lib/zig/lib/ --listen=-
Build Summary: 0/3 steps succeeded; 1 failed
install transitive failure
└─ install root transitive failure
└─ compile lib root Debug aarch64-linux-android failure
error: the following build command failed with exit code 1:
.zig-cache/o/3fe6be82f61c12241edbe536d62ba78b/build /usr/lib/zig/zig /usr/lib/zig/lib /tmp/afac .zig-cache /home/adria/.cache/zig --seed 0x5b9b4642 -Z9538a903bb6a75ff -Dtarget=aarch64-linux-android
Should I specify a libc manually now?