dimtpap / obs-pipewire-audio-capture

🔊 Audio device and application capture for OBS Studio using PipeWire
https://obsproject.com/forum/resources/pipewire-audio-capture.1458/
GNU General Public License v2.0
384 stars 12 forks source link

Release is linked to `libobs.so.0` #77

Open stephematician opened 1 month ago

stephematician commented 1 month ago

I am having trouble loading this module when I build OBS myself:

error: os_dlopen(/home/username/.config/obs-studio/plugins/linux-pipewire-audio/bin/64bit/linux-pipewire-audio.so->/home/username/.config/obs-studio/plugins/linux-pipewire-audio/bin/64bit/linux-pipewire-audio.so): libobs.so.0: cannot open shared object file: No such file or directory

I have a /etc/ld.so.conf.d/obs-studio.conf:

/path/to/obs-studio/lib

which is where libobs.so.0 and libobs.so.30 exist, and I get the following output from ldconfig -p | grep obs:

    libobs.so.30 (libc6,x86-64) => path/to//obs-studio/lib/libobs.so.30
    libobs.so (libc6,x86-64) => /path/to/obs-studio/lib/libobs.so
    libobs-scripting.so.30 (libc6,x86-64) => /path/to/obs-studio/lib/libobs-scripting.so.30
    libobs-scripting.so (libc6,x86-64) => /path/to/obs-studio/lib/libobs-scripting.so
    libobs-opengl.so.30 (libc6,x86-64) => /path/to/obs-studio/lib/libobs-opengl.so.30
    libobs-opengl.so (libc6,x86-64) => /path/to/obs-studio/lib/libobs-opengl.so
    libobs-frontend-api.so.30 (libc6,x86-64) => /path/to/obs-studio/lib/libobs-frontend-api.so.30
    libobs-frontend-api.so (libc6,x86-64) => /path/to/obs-studio/lib/libobs-frontend-api.so

From what I understand, ldconfig doesn't add a .so.0 if there is a later version. When run ldd linux-pipewire-audio.so I get:

    linux-vdso.so.1 (0x00007ffc4591d000)
    libobs.so.0 => not found
    libpipewire-0.3.so.0 => /lib/x86_64-linux-gnu/libpipewire-0.3.so.0 (0x00007db050d5f000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007db050a00000)
    /lib64/ld-linux-x86-64.so.2 (0x00007db050e6f000)

So, it's falling over because ldconfig only sets up a link for libobs.so and libobs.so.30. Is this the expected behaviour for a plugin to link to the .so.0 specifically? If so, how do I add the .so.0 entry to ldconfig cache?

dimtpap commented 2 days ago

Is this the expected behaviour for a plugin to link to the .so.0 specifically?

Pretty sure it is. It's a compatibility symlink to the actual libobs.so which can change names between major versions