F1ash / qt-virt-manager

Qt Virtual machines manager
http://f1ash.github.io/qt-virt-manager
GNU General Public License v2.0
241 stars 72 forks source link

Can't build - DotCursorState has not been declared #47

Closed eromatiya closed 4 years ago

eromatiya commented 4 years ago

Hello, I've been trying to build this and always greeted by an error. Already tried building it manually and using an AUR helper, but I'm already at my wit's end. Relevant log while building:

[ 30%] Building CXX object CMakeFiles/qt5-virt-manager.dir/src/settings/conn_settings.cpp.o
In file included from /home/manilarome/.cache/yay/qt-virt-manager/src/qt-virt-manager-0.70.91/src/vm_viewer/krdc_vnc_qtonly/Machine_View.h:28,
                 from /home/manilarome/.cache/yay/qt-virt-manager/src/qt-virt-manager-0.70.91/src/vm_viewer/vnc/vnc_viewer.h:6,
                 from /home/manilarome/.cache/yay/qt-virt-manager/src/qt-virt-manager-0.70.91/src/mainwindow.h:29,
                 from /home/manilarome/.cache/yay/qt-virt-manager/src/qt-virt-manager-0.70.91/src/main.cpp:1:
/home/manilarome/.cache/yay/qt-virt-manager/src/qt-virt-manager-0.70.91/src/vm_viewer/krdc_vnc_qtonly/vncview.h:64:24: error: ‘DotCursorState’ has not been declared
   64 |     void showDotCursor(DotCursorState state);
      |                        ^~~~~~~~~~~~~~
In file included from /home/manilarome/.cache/yay/qt-virt-manager/src/qt-virt-manager-0.70.91/src/vm_viewer/krdc_vnc_qtonly/Machine_View.h:28,
                 from /home/manilarome/.cache/yay/qt-virt-manager/src/qt-virt-manager-0.70.91/src/vm_viewer/vnc/vnc_viewer.h:6,
                 from /home/manilarome/.cache/yay/qt-virt-manager/src/qt-virt-manager-0.70.91/src/mainwindow.h:29,
                 from /home/manilarome/.cache/yay/qt-virt-manager/src/qt-virt-manager-0.70.91/src/mainwindow.cpp:1:
/home/manilarome/.cache/yay/qt-virt-manager/src/qt-virt-manager-0.70.91/src/vm_viewer/krdc_vnc_qtonly/vncview.h:64:24: error: ‘DotCursorState’ has not been declared
   64 |     void showDotCursor(DotCursorState state);
      |                        ^~~~~~~~~~~~~~
[ 31%] Building CXX object CMakeFiles/qt5-virt-manager.dir/src/wait_thread/wait_thread.cpp.o
make[2]: *** [CMakeFiles/qt5-virt-manager.dir/build.make:2444: CMakeFiles/qt5-virt-manager.dir/src/main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/qt5-virt-manager.dir/build.make:2457: CMakeFiles/qt5-virt-manager.dir/src/mainwindow.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:124: CMakeFiles/qt5-virt-manager.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
==> ERROR: A failure occurred in build().

Will appreciate any help.

F1ash commented 4 years ago

This error happens because there were changes in the krdc library. It can be fixed by disabling its use.

In vncclientthread.h `

ifdef Q_OS_LINUX

//#include <krdc/remoteview.h>
#include <QUrl>
#define KUrl QUrl

else

endif

include "remoteview.h"

`

eromatiya commented 4 years ago

Thank you! Managed to apply this! Closing this now.

FlorianFranzen commented 4 years ago

Alternatively, @fadenb wrote a patch to fix the build failure here.

eromatiya commented 4 years ago

Thanks @FlorianFranzen.