Skip to content

stage-embedded-objects-object is not rebuilt when the .incbin'd bundles change: stale embedded bundles after an ABI change #1423

Closed

Description

@ehartford

Found while verifying #1394 in a worktree rebased across #1350 (which changed docs/with-abi.sha256).

out/stage/lib/embedded_objects.s embeds the runtime objects and the .wo bundles by .incbin of absolute paths (out/wo/pcre2.o, out/wo/tommyds.manifest, ...). The stage-embedded-objects-object target (build.w, target_new(.CompileAsmObject, ..., "out/stage/lib/embedded_objects.s")) has only the .s as input. After a rebuild in which the bundles changed but the .s text did not, embedded_objects.o keeps its old timestamp and contents:

out/stage/lib/embedded_objects.o   Sep 22 21:38   (first build)
out/stage/lib/embedded_objects.s   Sep 22 23:47
out/wo/tommyds.manifest            Sep 22 23:47   abi-sha b735dbd0...

so stage2 embeds the previous bundles. Every program that links an embedded bundle then fails:

error: embedded bundle 'tommyds' was built for ABI 787e9ad4... but this compiler is b735dbd0... (a .wo never links across ABI identities; rebuild the bundle)

(with build :drop-audit run against that stage2: 13 facade cells COMPILE-FAIL, reported as regressions.) The same holds for any content change of an incbin'd object whose path is unchanged. Expected: the object target's inputs include every incbin'd file (or the .s carries their content digests), so a changed bundle rebuilds it. Workaround: delete out/stage/lib/embedded_objects.o before building.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions