scap-workbench icon indicating copy to clipboard operation
scap-workbench copied to clipboard

Hand compile issues with QT on Rocky Linux 8.6

Open LinuxETC opened this issue 2 years ago • 1 comments

While trying to hand compile scap-workbench v1.2.1 for Rocky Linux v8.6 I am receiving the following error message during the make call.

/home/openscap-service/Downloads/scap-workbench-1.2.1/src/SaveAsRPMDialog.cpp: In member function ‘void SaveAsRPMDialog::slotFinished(int)’:
/home/openscap-service/Downloads/scap-workbench-1.2.1/src/SaveAsRPMDialog.cpp:89:42: error: ‘QList<T> QSet<T>::toList() const [with T = QString]’ is deprecated: Use values() instead. [-Werror=deprecated-declarations]
     closureOrdered.append(closure.toList());
                                          ^
In file included from /usr/include/qt5/QtCore/QSet:1,
                 from /home/openscap-service/Downloads/scap-workbench-1.2.1/include/ScanningSession.h:28,
                 from /home/openscap-service/Downloads/scap-workbench-1.2.1/src/SaveAsRPMDialog.cpp:24:
/usr/include/qt5/QtCore/qset.h:265:14: note: declared here
     QList<T> toList() const { return values(); }
              ^~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/scap-workbench.dir/build.make:398: CMakeFiles/scap-workbench.dir/src/SaveAsRPMDialog.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:112: CMakeFiles/scap-workbench.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Granted, I know that scap-workbench has v1.2.0 available via Rocky's package repositories. However, I wanted to test this while "breaking in" Rocky as well.

From what I am reading it seems that there are some deprecated QT calls while compiling which errors out make.

Questions and/or feedback are welcomed. Thanks for everyone's time and assistance in advance.

LinuxETC avatar Aug 29 '22 16:08 LinuxETC

It looks like this is only a deprecation warning that is being treated as an error:

cc1plus: all warnings being treated as errors

If you manage to switch how the warnings are handled, you will probably be able to build it normally.

ggbecker avatar Aug 29 '22 16:08 ggbecker