#875·freemocap

[Bug] Linux AppImage: bundled libstdc++.so.6 lacks GLIBCXX_3.4.32 required by system libjack → server crashes at startup, no camera/mic detection

Author: blvcksenpaiCreated Aug 25, 2026Updated Aug 25, 2026

Environment

  • FreeMoCap version: 2.0.0-alpha.21 (freemocap_2.0.0-alpha.21_linux-x64-cuda.AppImage)
  • OS: CachyOS (Arch-based), kernel 7.2.0-1-cachyos
  • System libstdc++: provides up to GLIBCXX_3.4.36
  • Audio stack: PipeWire 1.6.8 with pipewire-pulse; system libportaudio.so.2 is linked against JACK (/usr/lib/libjack.so.0)

Summary

On Arch-based distros, the bundled Python server (freemocap_server) crashes at import time because the bundled _internal/libstdc++.so.6 is older than what the system's JACK library requires. The failure cascades through the import chain and kills camera and microphone detection entirely:

skellycam/api/routers.py → camera_router.py → camera_group_manager.py
→ camera_group.py → skellycam/core/recorders/audio/audio_recorder.py
→ sounddevice.py

The result from the user's perspective is simply "no cameras or microphones detected", with hardware/permissions perfectly fine on the host.

Steps to reproduce

  1. On a distro whose libportaudio.so.2 links against a recent JACK (e.g. CachyOS/Arch):
    bash
    $ ./freemocap_2.0.0-alpha.21_linux-x64-cuda.AppImage --appimage-extract
    $ ./squashfs-root/resources/app.asar.unpacked/freemocap_server/freemocap_server
  2. Observe the crash below.

Error output

Unhandled exception: cannot load library 'libportaudio.so.2':
/tmp/opencode/squashfs-root/resources/app.asar.unpacked/freemocap_server/_internal/libstdc++.so.6:
version `GLIBCXX_3.4.32' not found (required by /usr/lib/libjack.so.0)
Traceback (most recent call last):
  File "sounddevice.py", line 73, in <module>
OSError: cannot load library 'libportaudio.so.2': ... GLIBCXX_3.4.32 not found ...

Root cause

sounddevice doesn't ship a PortAudio binary in this bundle, so it dlopens the system libportaudio.so.2, which depends on system libjack.so.0, which requires GLIBCXX_3.4.32. PyInstaller puts _internal first in the library search path, so the bundle's older libstdc++.so.6 wins over the system one, and the symbol lookup fails.

Since audio_recorder.py imports sounddevice at module level, and camera_group.py imports audio_recorder, one missing symbol takes down the whole camera subsystem too — even though OpenCV/V4L2 camera detection itself would work fine.

Suggested fixes (any of)

  1. Bundle libportaudio.so.2 (and ideally pin/bundle a matching libjack or build PortAudio without JACK) so system PortAudio is never used.
  2. Ship a newer libstdc++.so.6 in _internal (or don't bundle libstdc++ at all and rely on the host, which every modern distro has).
  3. Make the sounddevice/audio_recorder import failures non-fatal (log + degrade to video-only) so audio problems can't take out camera detection.

Workaround that confirmed the diagnosis

Preloading the system libstdc++ makes everything work — after this, camera and microphone detection both succeed:

bash
LD_PRELOAD=/usr/lib/libstdc++.so.6 ./squashfs-root/resources/app.asar.unpacked/freemocap_server/freemocap_server
# → FREEMOCAP_PORT=53117, all routes registered, uvicorn healthy
# GET /skellycam/camera/microphone/detect → {"microphones":{"0":"HDA Intel PCH: ALC287 Analog (hw:0,0)", ...}}
# POST /skellycam/camera/detect → {"cameras":[{"index":0,"name":"Integrated Camera","path":"/dev/video0","backend_name":"V4L2",...}]}

Related but separate issue: the AppImage also caches the server's /tmp/.mount_* path across runs, which breaks startup independently of this bug (see companion report).