We are getting two PTZOptics cameras and tried to build obs-ptz but I get:
CMake Warning at CMakeLists.txt:107 (find_package):
Found package configuration file:
/usr/lib/cmake/SDL2/SDL2Config.cmake
but it set SDL2_FOUND to FALSE so package "SDL2" is considered to be NOT
FOUND.
And:
ptz_load_controls()’:
/var/tmp/pamac-build-jrs/obs-ptz-controls/src/obs-ptz/src/ptz-controls.cpp:33:30: error: ‘void* obs_frontend_add_dock(void*)’ is deprecated [-Werror=deprecated-declarations]
33 | obs_frontend_add_dock(tmp);
And:
/usr/include/obs/obs-frontend-api.h:142:14: note: declared here
142 | EXPORT void *obs_frontend_add_dock(void *dock);
| ^~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
I have been searching for a week but I have not found anything similar.
Well, by using -Werror the developer has basically promised to support new warnings in every C/C++ compiler that might ever be used, forever. So ask them to fix their build
If you’re desperate you can build it manually by turning off -Werror. The sed command below just comments that out on line 177 of the specified file;
git clone https://aur.archlinux.org/obs-ptz-controls.git
cd obs-ptz-controls
makepkg -o
sed -i '177 s/./#&/' src/obs-ptz/cmake/ObsPluginHelpers.cmake
makepkg -e
Well, let the AUR maintainer know so they can make a change to the PKGBUILD create an upstream issue as the developer should probably not be using that flag as mentioned above.
I attempted to override the Cmake flags in the PKGBUILD which normally works.
Keep in mind it’s a temporary workaround, not a solution. You’re going to have to do the same thing manually again every time the package is updated–unless the issue is reported upstream and actually dealt with properly.