Skip to content

docs: how to build native MLow audio on macOS/Linux (+ build script)#12

Closed
felipesartori wants to merge 1 commit into
JotaDev66:mainfrom
felipesartori:docs/native-audio-mac-linux
Closed

docs: how to build native MLow audio on macOS/Linux (+ build script)#12
felipesartori wants to merge 1 commit into
JotaDev66:mainfrom
felipesartori:docs/native-audio-mac-linux

Conversation

@felipesartori

@felipesartori felipesartori commented Jun 24, 2026

Copy link
Copy Markdown

What

Make native (live-audio) builds work on macOS/Linux, which previously only had Windows instructions.

  • README: new macOS / Linux subsection under Run (live audio) — how the codec maps to native/libopus_mlow.a, how to build it, and the CGO_ENABLED=1 go run -tags mlow … command. Requirements updated accordingly.
  • scripts/build-mlow.sh: clones and builds edgardmessias/opus_mlow and copies the static lib into native/.
  • .gitignore: ignores native/*.a.

Why the .a is not committed

A compiled .a is architecture-specific. Worse, a stray native/libopus_mlow.a would break the Windows build: for -lopus_mlow, GNU ld searches libopus_mlow.a before opus_mlow.dll, so on Windows it would try to link the wrong-arch archive instead of the bundled DLL. So the library is built locally per platform and git-ignored; Windows keeps using the committed .dlls untouched.

Without the matching lib (or without -tags mlow) the server still runs in signaling-only mode.

🤖 Generated with Claude Code

Add a macOS/Linux section to the README explaining how to build the
native MLow codec into native/libopus_mlow.a and run with
CGO_ENABLED=1 -tags mlow, plus scripts/build-mlow.sh which clones and
builds edgardmessias/opus_mlow into native/.

The .a is intentionally NOT committed: it is architecture-specific, and
a stray .a in native/ would be picked by the Windows linker ahead of
opus_mlow.dll (GNU ld searches lib<name>.a before <name>.dll), breaking
the Windows -tags mlow build. So native/*.a is git-ignored and built
locally per platform.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@felipesartori felipesartori force-pushed the docs/native-audio-mac-linux branch from 0f81214 to ab20f9c Compare June 24, 2026 14:42
@felipesartori felipesartori changed the title docs: native MLow audio on macOS/Linux (+ prebuilt arm64 lib & build script) docs: how to build native MLow audio on macOS/Linux (+ build script) Jun 24, 2026
@JotaDev66 JotaDev66 closed this Jun 25, 2026
@felipesartori felipesartori deleted the docs/native-audio-mac-linux branch June 25, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants