Skip to content

[Bug]: macOS arm64 build bundles an x86_64 libopus, so no codec loads #115

Description

@pxlninja

MeshChatX version

4.9.1

Release channel

Stable

Platform

Desktop (Electron)

Operating system

macOS

OS details (if Other)

Apple Silicon (arm64)

How did you install MeshChatX?

macOS app

What happened?

ReticulumMeshChatX-v4.9.1-mac-arm64.dmg bundles an x86_64 build of
libopus, so the app cannot load a codec at all on Apple Silicon:

$ file "/Applications/Reticulum MeshChatX.app/Contents/Resources/backend/lib/libopus.0.dylib"
… Mach-O 64-bit dynamically linked shared library x86_64

Every call attempt logs:

PyOggError: The Opus library wasn't found or couldn't be loaded
  File "LXST/Primitives/Telephony.py", line 641, in __select_call_codecs
  File "LXST/Codecs/Opus.py", line 48, in __init__

The call itself connects normally, which makes this hard to spot: the path
resolves, the link establishes, the UI shows the peer and a duration. There is
simply no audio in either direction, because nothing can be encoded or
decoded. The far end recorded 15 seconds of digital silence from us, and we
never heard its greeting.

What did you expect?

The arm64 build to bundle an arm64 libopus, so calls carry audio.

Steps to reproduce

  1. Install the 4.9.1 arm64 .dmg on an Apple Silicon Mac.
  2. Run file on the bundled dylib, as above.
  3. Place a call to any LXST peer. It connects; no audio passes; the log shows
    the PyOgg error.

Logs or error output

INFO:meshchatx.rns: [Error] An unhandled <class 'LXST.Codecs.libs.pyogg.pyogg_error.PyOggError'>
exception occurred: The Opus library wasn't found or couldn't be loaded (maybe you're trying
to use 64bit libraries with 32bit Python?)
  File "LXST/Primitives/Telephony.py", line 641, in __select_call_codecs
  File "LXST/Codecs/libs/pyogg/__init__.py", line 74, in __init__


Workaround for anyone hitting this: build libopus for arm64 and put it
somewhere dyld's fallback path finds it, for example `~/lib/libopus.dylib`.
After that `ctypes.util.find_library("opus")` resolves to the native build and
the app loads it.

Related, on the same call path: `Tee` in `telephone_manager.py` is not a
`Sink` subclass and has no `stop()`, which kills the receive path on desktop
too — covered in the other issue.

Checklist

  • I searched existing issues to avoid duplicates
  • I included my MeshChatX version, channel, operating system, and install method
  • I can reproduce the issue with the steps above

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions