-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Build failure on Linux when PulseAudio is disabled - missing devices_match symbol #12810
Description
Operating System Info
Other
Other OS
Gentoo Linux
OBS Studio Version
Git
OBS Studio Version (Other)
32.0.2-11-geb4161e72-modified
OBS Studio Log URL
NA
OBS Studio Crash Log URL
No response
Expected Behavior
The build should complete successfully when PulseAudio is disabled, as it did in version 32.0.2.
Current Behavior
The build fails with a linker error when PulseAudio support is disabled:
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: libobs/libobs.so.30: undefined reference to devices_match'
collect2: error: ld returned 1 exit status`
Steps to Reproduce
- Clone the master branch
- Configure build with PulseAudio disabled: cmake -DENABLE_PULSEAUDIO=OFF ..
- Run make or ninja
- Observe linker failure due to missing devices_match symbol1.
Anything else we should know?
Root cause analysis:
Line 50: extern bool devices_match(const char *id1, const char *id2); - The function is declared as an external symbol unconditionally
Lines 71 and 78: The devices_match() function is called unconditionally in check_audio_output_source_is_monitoring_device():
Missing implementation: On Linux, the devices_match() function is only defined in pulseaudio-wrapper.c, which is only compiled when ENABLE_PULSEAUDIO=ON
Build failure: When PulseAudio is disabled (-DENABLE_PULSEAUDIO=OFF), the linker cannot find the devices_match symbol, causing the build to fail.
Looking at the old code versus the current code, I can see the key difference that's causing the build failure. The old code used a simple strcmp comparison, while the new code introduced the devices_match() function call which is only available when PulseAudio is enabled.