GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Feature Request: support Alpine / musl Linux (linux-x64-musl, linux-arm64-musl) · Issue #418 · tickernelz/opencode-mem

Feature Request: support Alpine / musl Linux (linux-x64-musl, linux-arm64-musl) #418

New issue
Copy link
New issue
Copy link
Open
Open
Feature Request: support Alpine / musl Linux (linux-x64-musl, linux-arm64-musl)#418
Copy link
Assignees
doublepi123
Labels
enhancementNew feature or request

Description

@doublepi123
doublepi123
opened on Oct 18, 2026
Issue body actions

Problem / motivation

opencode-mem cannot be loaded on Alpine Linux or any other musl-based distribution, so it cannot be used in Alpine containers.

Environment: OpenCode 2.0.32, opencode-mem 2.32.0, Alpine Linux 3.24 on aarch64.

The plugin installs, but OpenCode skips it at startup:

level=WARN message="failed to load plugin" target=opencode-mem@latest
cause="Error: Cannot find native binding. npm has a bug related to optional dependencies
(https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both
package-lock.json and node_modules directory."

The error text points at npm, but npm is not the cause. @tursodatabase/[email protected] publishes native bindings for only four platforms:

@tursodatabase/database-linux-x64-gnu
@tursodatabase/database-linux-arm64-gnu
@tursodatabase/database-darwin-arm64
@tursodatabase/database-win32-x64-msvc

On musl, its loader requires @tursodatabase/database-linux-arm64-musl (or -linux-x64-musl), and that package has never been published to npm.

Local embeddings have the same limitation: onnxruntime-node ships only glibc binaries for Linux. They are loaded lazily, though (src/services/embedding.ts, initializeModel), so remote embeddings (embeddingApiUrl + embeddingApiKey) never load onnxruntime. Once Turso ships musl bindings, musl users could run opencode-mem with remote embeddings.

Proposed solution

  1. Upstream: Turso needs to build and publish linux musl bindings. PR: bindings/javascript: build and publish linux musl binaries tursodatabase/turso#10107
  2. After a Turso release includes the musl packages, bump @tursodatabase/database. Turso's main branch is already at 0.9.0-pre.1, which the current ^0.8.3 range does not include.
  3. In the README, list musl as supported with remote embeddings only, the same way Intel Mac is documented today.
  4. Optional: detect musl at startup and report a clear error instead of the misleading npm message, the way onnxruntime-resolve.ts already does for Intel Mac. An Alpine job in platform-smoke.yml would keep musl from regressing.

Alternatives considered

  • Installing gcompat and dropping the glibc Turso binding in by hand. This is unsupported and fragile, and every auto-update (autoUpdate: true with @latest) wipes it out.
  • Running OpenCode on a glibc distribution instead. This works, but it is not an option for Alpine-based images.

Additional context

  • Turso build matrix: bindings/javascript/packages/native/package.json (napi.targets) and .github/workflows/napi.yml in tursodatabase/turso.
  • No existing opencode-mem issue mentions musl or Alpine.
Reacted by Marco Lazzarotto

Activity

  1. EyJunge1
    assigned
    doublepi123
    on Oct 20, 2026
  2. EyJunge1
    added
    enhancementNew feature or request
    on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @doublepi123
    doublepi123

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.