Skip to content

The durable tests and preflight fail to link on Apple silicon #616

Open

Description

@Mathih13

Expected. On an Apple silicon Mac, a Module durable test and ./lyracore preflight link with no extra flags, as they do on Linux.

Actual (at 87109e3c). The Module builds as both cdylib and rlib (module/Cargo.toml#L12-L13). On a host build the cdylib leaves the SpacetimeDB host imports undefined. The Linux linker accepts that in a shared library; the macOS linker refuses it. .cargo/config.toml sets flags only for wasm32-unknown-unknown. The workaround agents used on #612 and #614 is not written down:

--config 'target.aarch64-apple-darwin.rustflags=["-C","link-arg=-undefined","-C","link-arg=dynamic_lookup"]'

How it shows. A contributor on a Mac gets a link error on a clean checkout and cannot run the durable suite or preflight. Linux and CI are not affected.

Fix direction. Emit cargo:rustc-cdylib-link-arg=-undefined and dynamic_lookup from the Module build script when the target is macOS. That flag reaches only the cdylib, so the Gateway keeps its normal link errors. If that fails, document the workaround where the durable tests are described.

Activity

  1. added
    bugSomething isn't working
    P2normal
    ready-for-agentComplete enough to build from the issue alone, by a person or their agent
    on Oct 7, 2026
  2. changed the title [-]build(macos): durable tests and preflight fail to link on Apple silicon[/-] [+]The durable tests and preflight fail to link on Apple silicon[/+] on Oct 8, 2026
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

    P2normalbugSomething isn't workingready-for-agentComplete enough to build from the issue alone, by a person or their agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions