[Bug] Linux AppImage: bundled libstdc++.so.6 lacks GLIBCXX_3.4.32 required by system libjack → server crashes at startup, no camera/mic detection
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.2is 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.pyThe result from the user's perspective is simply "no cameras or microphones detected", with hardware/permissions perfectly fine on the host.
Steps to reproduce
- On a distro whose
libportaudio.so.2links against a recent JACK (e.g. CachyOS/Arch):$ ./freemocap_2.0.0-alpha.21_linux-x64-cuda.AppImage --appimage-extract $ ./squashfs-root/resources/app.asar.unpacked/freemocap_server/freemocap_server - 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)
- Bundle
libportaudio.so.2(and ideally pin/bundle a matchinglibjackor build PortAudio without JACK) so system PortAudio is never used. - Ship a newer
libstdc++.so.6in_internal(or don't bundlelibstdc++at all and rely on the host, which every modern distro has). - Make the
sounddevice/audio_recorderimport 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:
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).
Source: freemocap/freemocap