Stating sndio link error with OpenAL built on Debian bookworm on arm64
When doing a linux-arm64 static build, I get this on arm64 on Debian Bookworm:
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioPlayback::~SndioPlayback()':
sndio.cpp:(.text+0xb8): undefined reference to `sio_close'
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioCapture::~SndioCapture()':
sndio.cpp:(.text+0x118): undefined reference to `sio_close'
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioPlayback::mixerProc()':
sndio.cpp:(.text+0x224): undefined reference to `sio_write'
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioCapture::recordProc()':
sndio.cpp:(.text+0x3a4): undefined reference to `sio_nfds'
/usr/bin/ld: sndio.cpp:(.text+0x410): undefined reference to `sio_pollfd'
/usr/bin/ld: sndio.cpp:(.text+0x440): undefined reference to `sio_revents'
/usr/bin/ld: sndio.cpp:(.text+0x498): undefined reference to `sio_read'
/usr/bin/ld: sndio.cpp:(.text+0x5cc): undefined reference to `sio_read'
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioPlayback::stop()':
sndio.cpp:(.text+0x644): undefined reference to `sio_stop'
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioCapture::start()':
sndio.cpp:(.text+0x698): undefined reference to `sio_start'
/usr/bin/ld: sndio.cpp:(.text+0x76c): undefined reference to `sio_stop'
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioPlayback::start()':
sndio.cpp:(.text+0x848): undefined reference to `sio_start'
/usr/bin/ld: sndio.cpp:(.text+0x91c): undefined reference to `sio_stop'
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioCapture::open(char const*)':
sndio.cpp:(.text+0xa28): undefined reference to `sio_open'
/usr/bin/ld: sndio.cpp:(.text+0xa3c): undefined reference to `sio_initpar'
/usr/bin/ld: sndio.cpp:(.text+0xadc): undefined reference to `sio_setpar'
/usr/bin/ld: sndio.cpp:(.text+0xaec): undefined reference to `sio_getpar'
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioPlayback::open(char const*)':
sndio.cpp:(.text+0xfd0): undefined reference to `sio_open'
/usr/bin/ld: sndio.cpp:(.text+0xfe4): undefined reference to `sio_close'
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioCapture::stop()':
sndio.cpp:(.text+0x10e4): undefined reference to `sio_stop'
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioCapture::~SndioCapture()':
sndio.cpp:(.text+0x1258): undefined reference to `sio_close'
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioPlayback::~SndioPlayback()':
sndio.cpp:(.text+0x12b8): undefined reference to `sio_close'
/usr/bin/ld: build/deps/linux-arm64-default_10/lib/libopenal.a(sndio.cpp.o):
in function `(anonymous namespace)::SndioPlayback::reset()':
sndio.cpp:(.text+0x1380): undefined reference to `sio_initpar'
/usr/bin/ld: sndio.cpp:(.text+0x1400): undefined reference to `sio_setpar'
/usr/bin/ld: sndio.cpp:(.text+0x140c): undefined reference to `sio_initpar'
/usr/bin/ld: sndio.cpp:(.text+0x1418): undefined reference to `sio_getpar'
/usr/bin/ld: sndio.cpp:(.text+0x18e0): undefined reference to `sio_initpar'
sndio is the OpenBSD sound server: https://sndio.org/
Even if it had been ported to Linux, we probably better disable it on Linux, this looks very niche.
I get this because some desktop applications pulled openal, which pulled the sndio shared library, and then the cmake OpenAL script found sndio and enabled the support for it, but there installed sndio doesn't provide static libraries.
In the docker build openal is not installed at all so sndio isn't found.
I confirm passing -DALSOFT_BACKEND_SNDIO=OFF to cmake fixes the build.