nowrep / obs-vkcapture

OBS Linux Vulkan/OpenGL game capture
GNU General Public License v2.0
502 stars 24 forks source link

wayland-client.h: No such file or directory #167

Closed VortexAcherontic closed 9 months ago

VortexAcherontic commented 10 months ago

Describe the bug Since 1.4.3 when building obs-vulkan capture on RPM based distributions (or at least openSUSE it seems) wayland-client.h is located at /usr/include/wayland/ but /usr/include/ is assumed in vklayer.h

System (please complete the following information):

Build Log:

[    5s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --undefine _enable_debug_packages /home/abuild/rpmbuild/SOURCES/obs-vkcapture.spec
[    5s] setting SOURCE_DATE_EPOCH=1694995200
[    5s] Executing(%prep): /usr/bin/bash -e /var/tmp/rpm-tmp.l0APZO
[    5s] + umask 022
[    5s] + cd /home/abuild/rpmbuild/BUILD
[    5s] + cd /home/abuild/rpmbuild/BUILD
[    5s] + rm -rf obs-vkcapture-1.4.3
[    5s] + /usr/lib/rpm/rpmuncompress -x /home/abuild/rpmbuild/SOURCES/obs-vkcapture-1.4.3.tar.gz
[    5s] + STATUS=0
[    5s] + '[' 0 -ne 0 ']'
[    5s] + cd obs-vkcapture-1.4.3
[    5s] + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
[    5s] + RPM_EC=0
[    5s] ++ jobs -p
[    5s] + exit 0
[    5s] Executing(%build): /usr/bin/bash -e /var/tmp/rpm-tmp.BvPpij
[    5s] + umask 022
[    5s] + cd /home/abuild/rpmbuild/BUILD
[    5s] + /usr/bin/rm -rf /home/abuild/rpmbuild/BUILDROOT/obs-vkcapture-1.4.3-0.x86_64
[    5s] ++ dirname /home/abuild/rpmbuild/BUILDROOT/obs-vkcapture-1.4.3-0.x86_64
[    5s] + /usr/bin/mkdir -p /home/abuild/rpmbuild/BUILDROOT
[    5s] + /usr/bin/mkdir /home/abuild/rpmbuild/BUILDROOT/obs-vkcapture-1.4.3-0.x86_64
[    5s] + cd obs-vkcapture-1.4.3
[    5s] + find . -type f -name CMakeLists.txt -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\)/{s/^/#IGNORE /}' '{}' +
[    5s] + mkdir -p build
[    5s] + cd build
[    5s] + /usr/bin/cmake /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/. '-GUnix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_BINDIR:PATH=bin -DCMAKE_INSTALL_SBINDIR:PATH=sbin -DCMAKE_INSTALL_LIBEXECDIR:PATH=libexec -DCMAKE_INSTALL_SYSCONFDIR:PATH=etc -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=/var/lib -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=var -DCMAKE_INSTALL_RUNSTATEDIR:PATH=run -DCMAKE_INSTALL_LIBDIR:PATH=lib64 -DCMAKE_INSTALL_INCLUDEDIR:PATH=include -DCMAKE_INSTALL_DATAROOTDIR:PATH=share -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DCMAKE_BUILD_TYPE=RelWithDebInfo '-DCMAKE_C_FLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto' '-DCMAKE_CXX_FLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto' '-DCMAKE_Fortran_FLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto' '-DCMAKE_EXE_LINKER_FLAGS=-flto=auto -Wl,--as-needed -Wl,-z,now' '-DCMAKE_MODULE_LINKER_FLAGS=-flto=auto -Wl,--as-needed' '-DCMAKE_SHARED_LINKER_FLAGS=-flto=auto -Wl,--as-needed -Wl,-z,now' -DLIB_SUFFIX=64 -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF -DCMAKE_COLOR_MAKEFILE:BOOL=OFF -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_MODULES_INSTALL_DIR=/usr/lib64/cmake/obs-vkcapture -DCMAKE_INSTALL_PREFIX=/usr ..
[    5s] -- The C compiler identification is GNU 13.2.1
[    5s] -- Detecting C compiler ABI info
[    5s] -- Detecting C compiler ABI info - done
[    5s] -- Check for working C compiler: /usr/bin/cc - skipped
[    5s] -- Detecting C compile features
[    5s] -- Detecting C compile features - done
[    5s] -- Found Vulkan: /lib64/libvulkan.so (found version "1.3.261") found components: glslangValidator missing components: glslc
[    5s] -- Found OpenGL: /usr/lib64/libOpenGL.so   
[    5s] -- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0") 
[    5s] -- Checking for module 'egl'
[    5s] --   Found egl, version 1.5
[    5s] -- Checking for module 'x11'
[    5s] --   Found x11, version 1.8.6
[    5s] -- Checking for module 'xcb'
[    5s] --   Found xcb, version 1.16
[    5s] -- Checking for module 'xcb-xfixes'
[    6s] --   Found xcb-xfixes, version 1.16
[    6s] -- Checking for module 'wayland-client'
[    6s] --   Found wayland-client, version 1.22.0
[    6s] -- Checking for module 'libobs'
[    6s] --   Found libobs, version 29.1.3
[    6s] -- Configuring done (0.9s)
[    6s] -- Generating done (0.0s)
[    6s] CMake Warning:
[    6s]   Manually-specified variables were not used by the project:
[    6s] 
[    6s]     BUILD_STATIC_LIBS
[    6s]     CMAKE_CXX_FLAGS
[    6s]     CMAKE_Fortran_FLAGS
[    6s]     CMAKE_INSTALL_DO_STRIP
[    6s]     CMAKE_MODULES_INSTALL_DIR
[    6s]     INCLUDE_INSTALL_DIR
[    6s]     LIB_INSTALL_DIR
[    6s]     LIB_SUFFIX
[    6s]     SHARE_INSTALL_PREFIX
[    6s]     SYSCONF_INSTALL_DIR
[    6s] 
[    6s] 
[    6s] -- Build files have been written to: /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build
[    6s] + /usr/bin/make -O VERBOSE=1 -j4 -j4
[    6s] /usr/bin/cmake -S/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3 -B/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build --check-build-system CMakeFiles/Makefile.cmake 0
[    6s] /usr/bin/cmake -E cmake_progress_start /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build/CMakeFiles /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build//CMakeFiles/progress.marks
[    6s] /usr/bin/make  -f CMakeFiles/Makefile2 all
[    6s] /usr/bin/make  -f CMakeFiles/linux-vkcapture.dir/build.make CMakeFiles/linux-vkcapture.dir/depend
[    6s] /usr/bin/make  -f CMakeFiles/VkLayer_obs_vkcapture.dir/build.make CMakeFiles/VkLayer_obs_vkcapture.dir/depend
[    6s] /usr/bin/make  -f CMakeFiles/obs_glcapture.dir/build.make CMakeFiles/obs_glcapture.dir/depend
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] cd /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3 /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3 /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build/CMakeFiles/obs_glcapture.dir/DependInfo.cmake
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] cd /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3 /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3 /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build/CMakeFiles/VkLayer_obs_vkcapture.dir/DependInfo.cmake
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] /usr/bin/make  -f CMakeFiles/obs_glcapture.dir/build.make CMakeFiles/obs_glcapture.dir/build
[    6s] /usr/bin/make  -f CMakeFiles/VkLayer_obs_vkcapture.dir/build.make CMakeFiles/VkLayer_obs_vkcapture.dir/build
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] [ 13%] Generating screencopy_unstable_v1.c
[    6s] /usr/bin/wayland-scanner private-code /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/ext-screencopy-v1.xml /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build/screencopy_unstable_v1.c
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] [ 13%] Generating screencopy_unstable_v1.h
[    6s] /usr/bin/wayland-scanner client-header /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/ext-screencopy-v1.xml /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build/screencopy_unstable_v1.h
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] cd /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3 /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3 /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build/CMakeFiles/linux-vkcapture.dir/DependInfo.cmake
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] /usr/bin/make  -f CMakeFiles/linux-vkcapture.dir/build.make CMakeFiles/linux-vkcapture.dir/build
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] [ 26%] Building C object CMakeFiles/obs_glcapture.dir/src/dlsym.c.o
[    6s] /usr/bin/cc -DENABLE_WAYLAND=1 -Dobs_glcapture_EXPORTS -I/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -std=gnu11 -fPIC -MD -MT CMakeFiles/obs_glcapture.dir/src/dlsym.c.o -MF CMakeFiles/obs_glcapture.dir/src/dlsym.c.o.d -o CMakeFiles/obs_glcapture.dir/src/dlsym.c.o -c /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/dlsym.c
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] [ 33%] Building C object CMakeFiles/obs_glcapture.dir/src/elfhacks.c.o
[    6s] /usr/bin/cc -DENABLE_WAYLAND=1 -Dobs_glcapture_EXPORTS -I/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -std=gnu11 -fPIC -MD -MT CMakeFiles/obs_glcapture.dir/src/elfhacks.c.o -MF CMakeFiles/obs_glcapture.dir/src/elfhacks.c.o.d -o CMakeFiles/obs_glcapture.dir/src/elfhacks.c.o -c /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/elfhacks.c
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] [ 26%] Building C object CMakeFiles/VkLayer_obs_vkcapture.dir/src/vklayer.c.o
[    6s] /usr/bin/cc -DENABLE_WAYLAND=1 -DVkLayer_obs_vkcapture_EXPORTS -I/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -std=gnu11 -fPIC -MD -MT CMakeFiles/VkLayer_obs_vkcapture.dir/src/vklayer.c.o -MF CMakeFiles/VkLayer_obs_vkcapture.dir/src/vklayer.c.o.d -o CMakeFiles/VkLayer_obs_vkcapture.dir/src/vklayer.c.o -c /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/vklayer.c
[    6s] In file included from /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/vklayer.c:19:
[    6s] /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/vklayer.h:34:10: fatal error: wayland-client.h: No such file or directory
[    6s]    34 | #include <wayland-client.h>
[    6s]       |          ^~~~~~~~~~~~~~~~~~
[    6s] compilation terminated.
[    6s] make[2]: *** [CMakeFiles/VkLayer_obs_vkcapture.dir/build.make:79: CMakeFiles/VkLayer_obs_vkcapture.dir/src/vklayer.c.o] Error 1
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[2]: *** Waiting for unfinished jobs....
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] [ 46%] Building C object CMakeFiles/VkLayer_obs_vkcapture.dir/src/capture.c.o
[    6s] /usr/bin/cc -DENABLE_WAYLAND=1 -DVkLayer_obs_vkcapture_EXPORTS -I/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -std=gnu11 -fPIC -MD -MT CMakeFiles/VkLayer_obs_vkcapture.dir/src/capture.c.o -MF CMakeFiles/VkLayer_obs_vkcapture.dir/src/capture.c.o.d -o CMakeFiles/VkLayer_obs_vkcapture.dir/src/capture.c.o -c /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/capture.c
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[1]: *** [CMakeFiles/Makefile2:116: CMakeFiles/VkLayer_obs_vkcapture.dir/all] Error 2
[    6s] make[1]: *** Waiting for unfinished jobs....
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] [ 60%] Building C object CMakeFiles/obs_glcapture.dir/src/capture.c.o
[    6s] /usr/bin/cc -DENABLE_WAYLAND=1 -Dobs_glcapture_EXPORTS -I/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -std=gnu11 -fPIC -MD -MT CMakeFiles/obs_glcapture.dir/src/capture.c.o -MF CMakeFiles/obs_glcapture.dir/src/capture.c.o.d -o CMakeFiles/obs_glcapture.dir/src/capture.c.o -c /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/capture.c
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] [ 53%] Building C object CMakeFiles/obs_glcapture.dir/src/glinject.c.o
[    6s] /usr/bin/cc -DENABLE_WAYLAND=1 -Dobs_glcapture_EXPORTS -I/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -std=gnu11 -fPIC -MD -MT CMakeFiles/obs_glcapture.dir/src/glinject.c.o -MF CMakeFiles/obs_glcapture.dir/src/glinject.c.o.d -o CMakeFiles/obs_glcapture.dir/src/glinject.c.o -c /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/glinject.c
[    6s] In file included from /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/glinject.c:27:
[    6s] /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/vklayer.h:34:10: fatal error: wayland-client.h: No such file or directory
[    6s]    34 | #include <wayland-client.h>
[    6s]       |          ^~~~~~~~~~~~~~~~~~
[    6s] compilation terminated.
[    6s] make[2]: *** [CMakeFiles/obs_glcapture.dir/build.make:107: CMakeFiles/obs_glcapture.dir/src/glinject.c.o] Error 1
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[1]: *** [CMakeFiles/Makefile2:142: CMakeFiles/obs_glcapture.dir/all] Error 2
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] [ 80%] Building C object CMakeFiles/linux-vkcapture.dir/screencopy_unstable_v1.c.o
[    6s] /usr/bin/cc -DENABLE_WAYLAND=1 -Dlinux_vkcapture_EXPORTS -I/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build -isystem /usr/include/obs -isystem /usr/include/wayland -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -std=gnu11 -fPIC -DHAVE_OBSCONFIG_H -mmmx -msse -msse2 -MD -MT CMakeFiles/linux-vkcapture.dir/screencopy_unstable_v1.c.o -MF CMakeFiles/linux-vkcapture.dir/screencopy_unstable_v1.c.o.d -o CMakeFiles/linux-vkcapture.dir/screencopy_unstable_v1.c.o -c /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build/screencopy_unstable_v1.c
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] [ 66%] Building C object CMakeFiles/linux-vkcapture.dir/src/xcursor-xcb.c.o
[    6s] /usr/bin/cc -DENABLE_WAYLAND=1 -Dlinux_vkcapture_EXPORTS -I/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build -isystem /usr/include/obs -isystem /usr/include/wayland -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -std=gnu11 -fPIC -DHAVE_OBSCONFIG_H -mmmx -msse -msse2 -MD -MT CMakeFiles/linux-vkcapture.dir/src/xcursor-xcb.c.o -MF CMakeFiles/linux-vkcapture.dir/src/xcursor-xcb.c.o.d -o CMakeFiles/linux-vkcapture.dir/src/xcursor-xcb.c.o -c /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/xcursor-xcb.c
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] [ 40%] Building C object CMakeFiles/linux-vkcapture.dir/src/vkcapture.c.o
[    6s] /usr/bin/cc -DENABLE_WAYLAND=1 -Dlinux_vkcapture_EXPORTS -I/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build -isystem /usr/include/obs -isystem /usr/include/wayland -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -std=gnu11 -fPIC -DHAVE_OBSCONFIG_H -mmmx -msse -msse2 -MD -MT CMakeFiles/linux-vkcapture.dir/src/vkcapture.c.o -MF CMakeFiles/linux-vkcapture.dir/src/vkcapture.c.o.d -o CMakeFiles/linux-vkcapture.dir/src/vkcapture.c.o -c /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/vkcapture.c
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] [ 73%] Building C object CMakeFiles/linux-vkcapture.dir/src/wlcursor.c.o
[    6s] /usr/bin/cc -DENABLE_WAYLAND=1 -Dlinux_vkcapture_EXPORTS -I/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build -isystem /usr/include/obs -isystem /usr/include/wayland -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -std=gnu11 -fPIC -DHAVE_OBSCONFIG_H -mmmx -msse -msse2 -MD -MT CMakeFiles/linux-vkcapture.dir/src/wlcursor.c.o -MF CMakeFiles/linux-vkcapture.dir/src/wlcursor.c.o.d -o CMakeFiles/linux-vkcapture.dir/src/wlcursor.c.o -c /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/wlcursor.c
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    7s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    7s] [ 86%] Linking C shared module linux-vkcapture.so
[    7s] /usr/bin/cmake -E cmake_link_script CMakeFiles/linux-vkcapture.dir/link.txt --verbose=1
[    7s] /usr/bin/cc -fPIC -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -flto=auto -Wl,--as-needed -shared  -o linux-vkcapture.so "CMakeFiles/linux-vkcapture.dir/src/vkcapture.c.o" "CMakeFiles/linux-vkcapture.dir/src/xcursor-xcb.c.o" "CMakeFiles/linux-vkcapture.dir/src/wlcursor.c.o" "CMakeFiles/linux-vkcapture.dir/screencopy_unstable_v1.c.o"  -lobs-frontend-api /usr/lib64/libobs.so /usr/lib64/libEGL.so /usr/lib64/libxcb.so /usr/lib64/libxcb-xfixes.so /usr/lib64/libwayland-client.so 
[    7s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    7s] make[1]: Entering directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    7s] [ 86%] Built target linux-vkcapture
[    7s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    7s] make: *** [Makefile:139: all] Error 2
[    7s] error: Bad exit status from /var/tmp/rpm-tmp.BvPpij (%build)
[    7s] 
[    7s] RPM build errors:
[    7s]     Bad exit status from /var/tmp/rpm-tmp.BvPpij (%build)
[    7s] 
[    7s] tumbleweed.z002 failed "build obs-vkcapture.spec" at Mon Sep 18 11:11:34 UTC 2023.
[    7s] 

The buildroot was: /var/tmp/build-root/openSUSE_Tumbleweed-x86_64

Temporary patch file I use for a successful build: build.opensuse.org

nowrep commented 10 months ago

Does this work?

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c2fdfa..e65aa3e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,6 +111,9 @@ if (HAVE_X11_XCB)
         $<TARGET_PROPERTY:PkgConfig::XCB_XFIXES,INTERFACE_INCLUDE_DIRECTORIES>
     )
 endif()
+if (HAVE_WAYLAND)
+    target_include_directories(VkLayer_obs_vkcapture PRIVATE $<TARGET_PROPERTY:PkgConfig::WAYLAND_CLIENT,INTERFACE_INCLUDE_DIRECTORIES>)
+endif()

 set(GL_SOURCES src/dlsym.c src/elfhacks.c src/glinject.c src/capture.c)
 add_library(obs_glcapture MODULE ${GL_SOURCES})
VortexAcherontic commented 10 months ago

I replaced my patch file with your suggested changes but it still seems to fail.
Looking up the patched source inside the build environment it seems to have applied the patch correctly:

if (HAVE_X11_XCB)
    target_include_directories(VkLayer_obs_vkcapture PRIVATE
        $<TARGET_PROPERTY:PkgConfig::XCB,INTERFACE_INCLUDE_DIRECTORIES>
        $<TARGET_PROPERTY:PkgConfig::XCB_XFIXES,INTERFACE_INCLUDE_DIRECTORIES>
    )
endif()
if (HAVE_WAYLAND)
    target_include_directories(VkLayer_obs_vkcapture PRIVATE $<TARGET_PROPERTY:PkgConfig::WAYLAND_CLIENT,INTERFACE_INCLUDE_DIRECTORIES>)
endif()

But the error remains:

[    6s] [ 53%] Building C object CMakeFiles/obs_glcapture.dir/src/glinject.c.o
[    6s] /usr/bin/cc -DENABLE_WAYLAND=1 -Dobs_glcapture_EXPORTS -I/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -O2 -g -DNDEBUG -std=gnu11 -fPIC -MD -MT CMakeFiles/obs_glcapture.dir/src/glinject.c.o -MF CMakeFiles/obs_glcapture.dir/src/glinject.c.o.d -o CMakeFiles/obs_glcapture.dir/src/glinject.c.o -c /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/glinject.c
[    6s] In file included from /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/glinject.c:27:
[    6s] /home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/src/vklayer.h:34:10: fatal error: wayland-client.h: No such file or directory
[    6s]    34 | #include <wayland-client.h>
[    6s]       |          ^~~~~~~~~~~~~~~~~~
[    6s] compilation terminated.
[    6s] make[2]: *** [CMakeFiles/obs_glcapture.dir/build.make:107: CMakeFiles/obs_glcapture.dir/src/glinject.c.o] Error 1
[    6s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/obs-vkcapture-1.4.3/build'
[    6s] make[2]: *** Waiting for unfinished jobs....
nowrep commented 10 months ago

Strange, what's the contents of /usr/lib/pkgconfig/wayland-client.pc on your system? And output of pkg-config --cflags wayland-client.

VortexAcherontic commented 10 months ago

The content of /usr/lib64/pkgconfig/wayland-client.pc is:

prefix=/usr
includedir=${prefix}/include/wayland
libdir=${prefix}/lib64

datarootdir=${prefix}/share
pkgdatadir=${datarootdir}/wayland

Name: Wayland Client
Description: Wayland client side library
Version: 1.22.0
Requires.private: libffi
Libs: -L${libdir} -lwayland-client
Libs.private: -lm -pthread -lrt
Cflags: -I${includedir}

and the output of pkg-config is:

pkg-config --cflags wayland-client
-I/usr/include/wayland

Looks all legit to me no clue why the patch does not work 😕

nowrep commented 9 months ago

Yeah it looks correct, how come it doesn't work ...

nowrep commented 9 months ago

This should work, however I don't really want to link to libwayland when only headers are needed.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c2fdfa..0fceca1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -100,7 +100,7 @@ endif()
 set(LAYER_SOURCES src/vklayer.c src/capture.c)
 add_library(VkLayer_obs_vkcapture MODULE ${LAYER_SOURCES})
 set_target_properties(VkLayer_obs_vkcapture PROPERTIES LINK_FLAGS "-Wl,--version-script=\"${CMAKE_CURRENT_SOURCE_DIR}/src/vklayer.version\"")
-target_link_libraries(VkLayer_obs_vkcapture Vulkan::Vulkan)
+target_link_libraries(VkLayer_obs_vkcapture Vulkan::Vulkan PkgConfig::WAYLAND_CLIENT)
 target_include_directories(VkLayer_obs_vkcapture PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
 if (HAVE_X11_XLIB)
     target_include_directories(VkLayer_obs_vkcapture PRIVATE $<TARGET_PROPERTY:PkgConfig::X11,INTERFACE_INCLUDE_DIRECTORIES>)
VortexAcherontic commented 9 months ago

Sorry for the late response.
Your last suggested change did not helped as well.

But as I noticed you pushed a small addition to vklayer.h I did re-create the commit in my patch file and can confirm, that works as well.

Thank you for your time looking into this ❤️