[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#998853: obs-frontend-api.h: fatal error: {obs,util/darray}.h: No such file or directory



Package: libobs-dev
Version: 26.1.2+dfsg1-2
Severity: important
Tags: patch
Control: affects -1 obs-move-transition

Dear maintainer,

In last weekend obs-move-transition[1] arrived to Debian. obs-move-transition
is the most rated plugin for obs-studio.

 [1] https://tracker.debian.org/pkg/obs-move-transition

obs-move-transition depends of the libobs-dev. When packaging this plugin, I
got the following errors:

 In file included from /PKGS/obs-move-transition-2.5.1/move-source-filter.c:2:
 /usr/include/obs/obs-frontend-api.h:3:10: fatal error: obs.h: No such file or directory
     3 | #include <obs.h>
       |          ^~~~~~~

 In file included from /PKGS/obs-move-transition-2.5.1/move-transition.c:3:
 /usr/include/obs/obs-frontend-api.h:4:10: fatal error: util/darray.h: No such file or directory
     4 | #include <util/darray.h>
       |          ^~~~~~~~~~~~~~~

To allow the plugin to build correctly, I created a 'fixed copy' of the
/usr/include/obs/obs-frontend-api.h inside of
obs-move-transition-2.5.1.

On Debian, the libobs-dev put the headers in /usr/include/obs/ but the current
/usr/include/obs/obs-frontend-api.h expects to find for these files in
/usr/include/. However, when building obs-studio, the source code searches for
the headers also in /usr/include/. Consequently, making a patch for
obs-frontend-api.h to search for headers in /usr/include/obs/ will generate a
FTBFS. IMO, the right way is changing the obs-frontend-api.h after the
obs-studio build process. The attached patch will fix this issue. I also sent
an MR to Salsa [2] to make to make easier the fix.

[2] https://salsa.debian.org/multimedia-team/obs-studio/-/merge_requests/5

After the fix, I will drop the embedded copy of the obs-frontend-api.h in
obs-move-transition.

Thanks in advance.

Regards,

Eriberto
--- a/debian/rules
+++ b/debian/rules
@@ -28,6 +28,8 @@ override_dh_install:
 		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/obs-plugins/obs-ffmpeg/obs-ffmpeg-mux
 	dh_install
 	rm -rf debian/obs-studio/usr/share/obs/obs-studio/license
+	sed -i 's/#include <obs.h>/#include <obs\/obs.h>/' debian/libobs-dev/usr/include/obs/obs-frontend-api.h
+	sed -i 's/#include <util\/darray.h>/#include <obs\/util\/darray.h>/' debian/libobs-dev/usr/include/obs/obs-frontend-api.h
 
 execute_before_dh_shlibdeps:
 	echo "libobs 0 libobs0 (= ${DEB_VERSION})" > debian/shlibs.local


Reply to: