occ-ai / obs-backgroundremoval

An OBS plugin for removing background in portrait images (video), making it easy to replace the background when recording or streaming.
GNU General Public License v2.0
2.7k stars 185 forks source link

Missing dependency on libqt6-widgets6 #492

Closed fuglede closed 5 months ago

fuglede commented 7 months ago

I have installed obs-backgroundremoval using the .deb on Debian while having picked up OBS itself from the Debian Testing. When I try to add an effect filter to a video capture device, the background removal filter does not show up.

$ apt show obs-studio
Package: obs-studio
Version: 29.1.3+dfsg-2
Priority: optional
Section: video
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Installed-Size: 21.4 MB

$ apt show obs-backgroundremoval
Package: obs-backgroundremoval
Version: 1.1.7
Status: install ok installed
Priority: optional
Section: devel
Maintainer: roy.shil@gmail.com
Installed-Size: 427 MB
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: obs-backgroundremoval built using CMake

obs-backgroundremoval

One relevant thing that then shows up in the log is this:

09:55:21.313: os_dlopen(/usr//lib/x86_64-linux-gnu/obs-plugins/obs-backgroundremoval.so->/usr//lib/x86_64-linux-gnu/obs-plugins/obs-backgroundremoval.so): libQt6Widgets.so.6: cannot open shared object file: No such file or directory
09:55:21.313: 
09:55:21.313: Module '/usr//lib/x86_64-linux-gnu/obs-plugins/obs-backgroundremoval.so' not loaded

Indeed, after installing libqt6-widgets6, the effect filter shows up. So it seems this ought to be added as a dependency, or at least spelled out in the docs that this could be an issue.

One thing that confused me a bit is that the release page suggests that there are installation instructions on https://obs-ai.github.io/obs-backgroundremoval/, but that page 404s because it looks like obs-ai has been renamed to occ-ai.

umireon commented 7 months ago

The URL on the release page was fixed.

PhillCli commented 7 months ago

It's a deeper hole than that libqt6-widgets.so missing. AFAIK, .deb are built on https://github.com/occ-ai/obs-backgroundremoval/blob/main/.github/workflows/push.yaml#L34

ubuntu-22.04 which uses a newer glibc, and one of the symbols included in newer versions, will cause a fail on systems with older glibc, i.e. ubuntu-20.04, with __libc_single_threaded.so.

error: os_dlopen(/usr/local//lib/obs-plugins/obs-backgroundremoval.so->/usr/local//lib/obs-plugins/obs-backgroundremoval.so): /usr/local//lib/obs-plugins/obs-backgroundremoval.so: undefined symbol: __libc_single_threaded

error: os_dlopen(/usr/local//lib/obs-plugins/obs-backgroundremoval.so->/usr/local//lib/obs-plugins/obs-backgroundremoval.so): /usr/local//lib/obs-plugins/obs-backgroundremoval.so: undefined symbol: __libc_single_threaded

warning: Module '/usr/local//lib/obs-plugins/obs-backgroundremoval.so' not loaded

To make matters worse, even recompiling on ubuntu:20.04 doesn't seem to work, as some dependency that's getting pulled with FetchX.cmake is already using this symbol making re-compiling from current src is not possible, unless patching every upstream pull (pre-built OpenCV), and re-building without glibc >= 2.32 symbols. I did not have time to narrow on that.

I would appreciate, noting that pre-built PPA will work only with glibc >= 2.32, which is the first to contain said symbol, per release-notes glibc 2.32

EDIT: it's pre-built opencv from https://github.com/obs-ai/obs-backgroundremoval-dep-opencv

nm build_x86_64/_deps/opencv-src/lib/*.a | grep -i "libc_single_threaded" 
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
                 U __libc_single_threaded
umireon commented 5 months ago

@royshil We decided not to support Debian by the deb package so can we close this issue as not planned?

royshil commented 5 months ago

i removed Qt dep in #538 - woudn't that help with Debian?

royshil commented 5 months ago

538 was merged and removed Qt dependency.

umireon commented 5 months ago

@royshil Can we close this issue as completed?