Obs-ptz-controls fails to build

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:


  but it set SDL2_FOUND to FALSE so package "SDL2" is considered to be NOT


/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);

/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.

Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

No idea about building from source, but you can try to unpack the .deb put the files manually and see if it works.

There is an AUR package obs-ptz-controls, try that.

Welcome to the forum! :wave:

Note that I fixed the formatting. :wink:

That appears to be why it’s failing to build, not because warnings are treated as errors. You’ll see the same error occurs building with -Wno-error.

You may want to create an upstream issue if there isn’t already one related.

That’s what he’s building. :wink:

Fair enough. I just read obs-ptz and there’s no AUR package called that :stuck_out_tongue:

Sorry, yes obs-ptz-controls

I will try building from source.


Note that I’ve edited the topic title to be more clear.

You already did via the AUR package. :wink:

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 :stuck_out_tongue:

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

Yep, already tried.

The error that’s causing the build failure is actually an error, not a warning.

I did test what I posted. The package builds for me with those steps.

Finished making: obs-ptz-controls 0.15.4-2

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. :wink:

MrLavender, thank you.

Finished making: obs-ptz-controls 0.15.4-2

Exactly the answer I was hoping for!

Manjaro has been rock solid for us for four years.

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.