Skip to content

Commit 4dbd074

Browse files
committed
fix: first-run default toolchain installs sysroot deps (glibc, linux-headers)
The glibc first-run default (R1) needs the sysroot payloads exactly like `mcpp toolchain install` provides; the old musl-static default was self-contained, which masked this. Fixes fresh-home e2e 29/31 in CI (std module precompile: stdlib.h not found).
1 parent 9c61fcc commit 4dbd074

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/cli.cppm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,6 +1457,14 @@ prepare_build(bool print_fingerprint,
14571457
mcpp::fetcher::Fetcher fetcher(**cfg);
14581458

14591459
CliInstallProgress progress;
1460+
// The glibc default toolchain needs the sysroot payloads (C library +
1461+
// kernel headers), exactly like `mcpp toolchain install` provides.
1462+
// The old musl-static default was self-contained, which masked this.
1463+
if constexpr (!mcpp::platform::is_macos && !mcpp::platform::is_windows) {
1464+
for (auto dep : {"xim:glibc", "xim:linux-headers"}) {
1465+
(void)fetcher.resolve_xpkg_path(dep, /*autoInstall=*/true, &progress);
1466+
}
1467+
}
14601468
auto payload = fetcher.resolve_xpkg_path(defaultPkg.target(),
14611469
/*autoInstall=*/true, &progress);
14621470
if (!payload) {

0 commit comments

Comments
 (0)