Skip to content

macOS aarch64 PyInstaller binaries missing libseekdb_python C extension #1088

Description

@lightzt99

Summary

Release binary powermem-1.1.5-macos-aarch64-binaries.tar.gz built from PR #1060 (scripts/build_binary_package.sh, PyInstaller --onefile). Tested on macOS 15.5 (Apple Silicon, arm64). All three binaries (powermem, powermem-server, powermem-mcp) fail to initialize at runtime because the libseekdb_python C extension is not included in the PyInstaller bundle.

Error chain on startup:

Warning: Failed to import seekdb module: Failed to import libseekdb_python module: No module named 'libseekdb_python'
ERROR: Failed to initialize service singletons: module 'pylibseekdb' has no attribute 'open'

The PyInstaller invocation at scripts/build_binary_package.sh:88 collects pyobvector (--collect-all pyobvector) but does not explicitly collect libseekdb_python or pylibseekdb. On macOS aarch64, PyInstaller's import analysis misses these transitive native-module dependencies, leaving the .dylib file out of the single-file binary.

Additionally, powermem-server --version and powermem-server --help are killed by SIGKILL (exit code 137) with zero stdout/stderr output — the PyInstaller bootloader and macOS 15.5 may have a compatibility issue in argument-parsing mode.

Reproduction

  1. Download powermem-1.1.5-macos-aarch64-binaries.tar.gz (~370 MB).
  2. Unpack, remove quarantine: xattr -d com.apple.quarantine powermem-1.1.5-macos-aarch64/bin/*
  3. Run ./powermem memory list --user-id test → exits 1 with libseekdb_python import error.
  4. Run ./powermem-server --version → SIGKILL, no output.
  5. Run ./powermem-server (no args) → process spawns, prints "Uvicorn running on http://0.0.0.0:8848", but port never enters LISTEN state (service singleton init failed).

Affected binaries

binary process starts help/version core function
powermem ❌ (native module missing)
powermem-server ⚠️ (port never listens) ❌ (SIGKILL)
powermem-mcp ⚠️ (no output) ❌ (SIGKILL)

Root cause

scripts/build_binary_package.sh only collects pyobvector:

--collect-all pyobvector

But libseekdb_python is a standalone C extension .dylib (not a Python package with __init__.py), imported by pylibseekdb. PyInstaller does not follow this import chain on macOS aarch64.

Minimal fix proposal

  1. Add explicit PyInstaller hooks for libseekdb_python in the build script:

    --hidden-import libseekdb_python \
    --hidden-import pylibseekdb \

    Or use --collect-all pylibseekdb with --add-binary if the .dylib path needs to be explicit.

  2. Investigate the --version/--help SIGKILL on macOS 15.5. This may be a PyInstaller bootloader compatibility issue; consider upgrading PyInstaller or adding a workaround for argument-parsing in the server entrypoint.

  3. Add a CI smoke test that runs powermem --version, powermem-server --version, powermem-mcp --version on each platform to catch packaging regressions before release.

  4. If seekdb is not required when using SQLite, consider making the libseekdb_python import optional (graceful fallback to SQLite-only mode) so that a single binary works with or without the native extension.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions