Skip to content

Commit 95f3f1a

Browse files
t3dotggclaude
andcommitted
fix(cli): smoke check compares resolved libatomic paths
glibc 2.39 prints the ldd path as given, so a symlinked TMPDIR failed the check. Also report a missing lib/ as a layout error. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent ae0755c commit 95f3f1a

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

‎scripts/smoke-cli-archive.ts‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ const smokeCliArchive = Effect.fn("smokeCliArchive")(function* (input: {
9797
}
9898
const contentDir = path.join(scratch, root);
9999
const executable = path.join(contentDir, platform === "win32" ? "t3.exe" : "t3");
100-
for (const required of [executable, path.join(contentDir, "client/index.html")]) {
100+
const bundledLibatomic = path.join(contentDir, "lib/libatomic.so.1");
101+
for (const required of [
102+
executable,
103+
path.join(contentDir, "client/index.html"),
104+
...(platform === "linux" ? [bundledLibatomic] : []),
105+
]) {
101106
if (!(yield* fs.exists(required))) {
102107
return yield* new CliArchiveSmokeError({
103108
step: "checking the archive layout",
@@ -109,8 +114,12 @@ const smokeCliArchive = Effect.fn("smokeCliArchive")(function* (input: {
109114
// The runner has libatomic installed; fresh Ubuntu servers do not.
110115
if (platform === "linux") {
111116
const ldd = yield* spawner.string(ChildProcess.make("ldd", [executable]));
112-
const bundled = path.join(yield* fs.realPath(contentDir), "lib/libatomic.so.1");
113-
if (!ldd.includes(`libatomic.so.1 => ${bundled} `)) {
117+
// Older glibc prints the path as given, newer prints it resolved; compare both resolved.
118+
const loaded = /libatomic\.so\.1 => (\/\S+)/.exec(ldd)?.[1];
119+
if (
120+
loaded === undefined ||
121+
(yield* fs.realPath(loaded)) !== (yield* fs.realPath(bundledLibatomic))
122+
) {
114123
return yield* new CliArchiveSmokeError({
115124
step: "checking that t3 loads the bundled libatomic",
116125
detail: ldd,

0 commit comments

Comments
 (0)