Skip to content

build: cross-compiling the compiler fails to link — cross embedded sets lack the empty wo_<name>_wasm32 slots #2390

Closed

Description

@ehartford

Found cutting the D118 linux-aarch64 seed from e4861e1 on eric-5090. After a green native build and :cross-rt-arm, the cross-emit

out/release/bin/with build --target aarch64-unknown-linux-gnu out/gen/main.w -O1 -o with-linux-aarch64-cross

fails: ld.lld: error: undefined symbol: with_embedded_wo_zlib_wasm32_o_end (and every wo_<name>_wasm32_{o,wi,manifest}_{start,end}, plus the bundle module symbols they gate).

Root, verified with nm at e4861e1: out/lib/cross/linux_aarch64/embedded_objects.o defines NO wo_*_wasm32_* symbols, while the native out/lib/embedded_objects.o defines them (real blobs, #2131) and the generated compiler.EmbeddedBundlesData the cross compile reuses names them all. add_cross_rt_targets adds empty wasm32 RUNTIME blobs (build.w:344-346, 'A cross compiler carries no wasm32 runtime yet') but no empty wo-wasm32 BUNDLE slots — the same gap presumably affects the windows cross embedded sets. This blocks cross-building any compiler seed (D118 #2305 linux-aarch64/windows-aarch64) from every commit since the wasm32 bundle embedding landed.

Fix shape: mirror the empty-runtime-blob pattern for wo bundle slots in every cross embedded set (empty manifest = slot not present, per EmbeddedBundles.w), with a cross-emit link smoke in the gate so it cannot regress silently again.

Activity

  1. ehartford commented on Oct 13, 2026

    @ehartford
    ContributorAuthor

    Narrowed with the sanctioned target: out/release/bin/with build :cross-arm-compiler at e4861e1 fails ONLY on the wo_<name>_wasm32_* symbols (the __with_mod_* bundle-code symbols resolve via target_with_link_bundle). The generated EmbeddedBundlesData is shared by every compiler build and names the wasm32 slots; bootstrap already defines them empty (build.w:3450-3454 on main) — the three cross embedded sets (linux via add_cross_rt_targets, windows x86_64, windows aarch64) never got the same treatment. Windows run 38390412010 confirms the same failure on the windows-aarch64 cross. Fix: empty wo-wasm32 slots at all three sites via the existing add_empty_wo_blob_targets/target_with_empty_wo_blobs helpers.

  2. added a commit that references this issue on Oct 13, 2026
    433ad0b
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