Skip to content

bug: trios-hdc + trios-sacred linker errors — missing Zig FFI symbols on arm64 #114

Description

@gHashTag

Problem

cargo test --workspace fails with linker errors:

trios-hdc

Undefined symbols for architecture arm64:
  "_hdc_bind"
  "_hdc_random_vector"
  "_hdc_similarity"
  "_hdc_space_create"
  "_hdc_space_destroy"

trios-sacred

Undefined symbols for architecture arm64:
  "_sacred_golden_sequence"
  "_sacred_phi_bottleneck"

Root Cause

These crates link against Zig vendor libraries (zig-hdc, zig-physics) via FFI. The compiled .dylib/.a files are not present because:

  1. Zig vendor submodules are not initialized
  2. The build.rs scripts warn but don't error: "zig-golden-float vendor not found, skipping Zig build"

Impact

  • cargo test --workspace fails at link time for these 2 crates
  • All other tests pass individually

Possible Fixes

  1. Initialize Zig submodules: git submodule update --init --recursive
  2. Build Zig vendors: cd external/zig-hdc && zig build
  3. Or gate the test linking behind a feature flag (like trios-training-ffi does)

Diagnosed by trios-doctor (leukocyte agent)

Activity

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions