roc-streaming / roc-pulse

Roc Toolkit modules for PulseAudio.
https://roc-streaming.org
GNU Lesser General Public License v2.1
8 stars 2 forks source link

PulseAudio modules not working with sanitizers #19

Closed gavv closed 7 months ago

gavv commented 5 years ago

If we enable any clang/gcc sanitizer in SCons (e.g. --sanitizers=all), PulseAudio modules fail to load with an undefined symbol error:

E: [pulseaudio] ltdl-bind-now.c: Failed to open module /usr/lib64/pulse-12.2/modules/module-roc-sink.so: /usr/lib64/libroc.so: undefined symbol: __ubsan_vptr_type_cache
E: [pulseaudio] module.c: Failed to open module "module-roc-sink".

It seems this happens because they are not linked with -lusan and -lasan, despite that we're using clang++ with -fsanitize option as a linker.

Linking with these two libraries manually is likely not a good idea since there may be multiple versions of them on the system and their location is disto-dependent.

Ideally clang++ should add them automatically, but for some reason it doesn't do it.