Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build with Qt 6.2.4 #784

Closed
data-man opened this issue Aug 11, 2022 · 4 comments
Closed

Cannot build with Qt 6.2.4 #784

data-man opened this issue Aug 11, 2022 · 4 comments
Labels

Comments

@data-man
Copy link
Contributor

Contour Terminal version

master

Installer source

Github: source code cloned

Operating System

Devuan

Architecture

x86-64

Other Software

No response

Steps to reproduce

Configure with -DCONTOUR_BUILD_WITH_QT6=ON option.

Expected Behavior

Successfully compiling.

Actual Behavior

/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp: In function ‘void BlurBehind::setEnabled(QWindow*, bool, QRegion)’:
/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:37:28: error: invalid use of incomplete type ‘class QVariant’
   37 |         window->setProperty("kwin_blur", region);
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/qtypeinfo.h:42,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qglobal.h:1431,
                 from /usr/include/x86_64-linux-gnu/qt6/QtGui/qtguiglobal.h:43,
                 from /usr/include/x86_64-linux-gnu/qt6/QtGui/qwindow.h:43,
                 from /usr/include/x86_64-linux-gnu/qt6/QtGui/QWindow:1,
                 from /home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.h:16,
                 from /home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:14:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainerfwd.h:72:7: note: forward declaration of ‘class QVariant’
   72 | class QVariant;
      |       ^~~~~~~~
/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:38:28: error: invalid use of incomplete type ‘class QVariant’
   38 |         window->setProperty("kwin_background_region", region);
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainerfwd.h:72:7: note: forward declaration of ‘class QVariant’
   72 | class QVariant;
      |       ^~~~~~~~
/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:39:57: error: cannot convert ‘int’ to ‘const QVariant&’
   39 |         window->setProperty("kwin_background_contrast", 1);
      |                                                         ^
      |                                                         |
      |                                                         int
In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/QObject:1,
                 from /usr/include/x86_64-linux-gnu/qt6/QtGui/qwindow.h:44:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobject.h:376:56: note:   initializing argument 2 of ‘bool QObject::setProperty(const char*, const QVariant&)’
  376 |     bool setProperty(const char *name, const QVariant &value);
      |                                        ~~~~~~~~~~~~~~~~^~~~~
/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:40:58: error: cannot convert ‘int’ to ‘const QVariant&’
   40 |         window->setProperty("kwin_background_intensity", 1);
      |                                                          ^
      |                                                          |
      |                                                          int
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobject.h:376:56: note:   initializing argument 2 of ‘bool QObject::setProperty(const char*, const QVariant&)’
  376 |     bool setProperty(const char *name, const QVariant &value);
      |                                        ~~~~~~~~~~~~~~~~^~~~~
/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:41:59: error: cannot convert ‘int’ to ‘const QVariant&’
   41 |         window->setProperty("kwin_background_saturation", 1);
      |                                                           ^
      |                                                           |
      |                                                           int
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobject.h:376:56: note:   initializing argument 2 of ‘bool QObject::setProperty(const char*, const QVariant&)’
  376 |     bool setProperty(const char *name, const QVariant &value);
      |                                        ~~~~~~~~~~~~~~~~^~~~~
/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:42:46: error: cannot convert ‘const char [38]’ to ‘const QVariant&’
   42 |         window->setProperty("_MUTTER_HINTS", "blur-provider=sigma:60,brightness:0.9");
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                              |
      |                                              const char [38]
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobject.h:376:56: note:   initializing argument 2 of ‘bool QObject::setProperty(const char*, const QVariant&)’
  376 |     bool setProperty(const char *name, const QVariant &value);
      |                                        ~~~~~~~~~~~~~~~~^~~~~
/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:46:28: error: invalid use of incomplete type ‘const class QVariant’
   46 |         window->setProperty("kwin_blur", {});
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainerfwd.h:72:7: note: forward declaration of ‘class QVariant’
   72 | class QVariant;
      |       ^~~~~~~~
/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:47:28: error: invalid use of incomplete type ‘const class QVariant’
   47 |         window->setProperty("kwin_background_region", {});
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainerfwd.h:72:7: note: forward declaration of ‘class QVariant’
   72 | class QVariant;
      |       ^~~~~~~~
/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:48:28: error: invalid use of incomplete type ‘const class QVariant’
   48 |         window->setProperty("kwin_background_contrast", {});
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainerfwd.h:72:7: note: forward declaration of ‘class QVariant’
   72 | class QVariant;
      |       ^~~~~~~~
/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:49:28: error: invalid use of incomplete type ‘const class QVariant’
   49 |         window->setProperty("kwin_background_intensity", {});
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainerfwd.h:72:7: note: forward declaration of ‘class QVariant’
   72 | class QVariant;
      |       ^~~~~~~~
/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:50:28: error: invalid use of incomplete type ‘const class QVariant’
   50 |         window->setProperty("kwin_background_saturation", {});
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainerfwd.h:72:7: note: forward declaration of ‘class QVariant’
   72 | class QVariant;
      |       ^~~~~~~~
/home/dataman/Projects/C/---Terminals/contour/src/contour/BlurBehind.cpp:51:28: error: invalid use of incomplete type ‘const class QVariant’
   51 |         window->setProperty("_MUTTER_HINTS", {});
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainerfwd.h:72:7: note: forward declaration of ‘class QVariant’
   72 | class QVariant;
      |       ^~~~~~~~
make[2]: *** [src/contour/CMakeFiles/contour.dir/build.make:140: src/contour/CMakeFiles/contour.dir/BlurBehind.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:556: src/contour/CMakeFiles/contour.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Additional notes

No response

@data-man data-man added the bug Something isn't working label Aug 11, 2022
@christianparpart
Copy link
Member

This was a bad use of setProperty() call from the beginning. I've been fixing the actual use in #789 and I therefore wonder if that's still a problem (and why didn't the CI hit on that problem anyways?).

In the somewhat longer term, it may very well be that we're about to move and exclusively depend on Qt6 rather than supporting both, because of a bug i was encountering while porting the frontend code from QtWidgets to QtQuick/QML. The problem there however would be how to support Ubuntu 18.04 - probably by installing custom Qt6 into some prefix like /opt/contour (just like it's done on Mac and Windows). We will see.

@christianparpart christianparpart added build and removed bug Something isn't working labels Aug 13, 2022
@Glog78
Copy link

Glog78 commented Aug 19, 2022

There might be another issue with that too ->

FAILED: src/contour/CMakeFiles/contour.dir/BlurBehind.cpp.o
/usr/bin/ccache /usr/lib/ccache/bin/c++ -DBOOST_STACKTRACE_USE_ADDR2LINE=1 -DCONTOUR_FRONTEND_GUI -DCONTOUR_PROJECT_SOURCE_DIR=\"/home/mgnad/install/contour-git/src/contour-git\" -DCONTOUR_SCROLLBAR -DCONTOUR_STACKTRACE_ADDR2LINE=1 -DCONTOUR_VERSION_MAJOR=0 -DCONTOUR_VERSION_MINOR=3 -DCONTOUR_VERSION_PATCH=3 -DCONTOUR_VERSION_STRING=\"0.3.3-unreleased-makepkg-6a97b8af\" -DFMT_HEADER_ONLY=1 -DHAVE_BACKTRACE -DHAVE_BACKTRACE_SYMBOLS -DHAVE_CXXABI_H -DHAVE_DLADDR -DHAVE_DLFCN_H -DHAVE_DLSYM -DHAVE_EXECINFO_H -DHAVE_SYS_SELECT_H -DHAVE_UNWIND_H -DLIBTERMINAL_LOG_TRACE=1 -DLIBTERMINAL_PTY_BUFFER_OBJECTS=1 -DQT_CORE_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x050F00 -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGLWIDGETS_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/mgnad/install/contour-git/src/build/src/contour/contour_autogen/include -I/home/mgnad/install/contour-git/src/build/src/contour -I/home/mgnad/install/contour-git/src/contour-git/src -I/home/mgnad/install/contour-git/src/contour-git/_deps/sources/fmt-8.1.1/include -I/home/mgnad/install/contour-git/src/contour-git/_deps/sources/libunicode-a511f3995cdf708f2e199276c90e21408db00a50/src -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/lib/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtGui -isystem /usr/include/qt6/QtOpenGL -isystem /usr/include/qt6/QtOpenGLWidgets -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6/QtNetwork -isystem /usr/include/qt6/QtMultimedia -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection  -flto -O3 -DNDEBUG -fdiagnostics-color=always -maes -fPIC -std=c++17 -MD -MT src/contour/CMakeFiles/contour.dir/BlurBehind.cpp.o -MF src/contour/CMakeFiles/contour.dir/BlurBehind.cpp.o.d -o src/contour/CMakeFiles/contour.dir/BlurBehind.cpp.o -c /home/mgnad/install/contour-git/src/contour-git/src/contour/BlurBehind.cpp
/home/mgnad/install/contour-git/src/contour-git/src/contour/BlurBehind.cpp:35:18: schwerwiegender Fehler: private/qtx11extras_p.h: Datei oder Verzeichnis nicht gefunden
   35 |         #include <private/qtx11extras_p.h>

-> https://code.qt.io/cgit/qt/qtx11extras.git/about/?h=v5.4.2

@christianparpart
Copy link
Member

There might be another issue with that too ->

FAILED: src/contour/CMakeFiles/contour.dir/BlurBehind.cpp.o
/usr/bin/ccache /usr/lib/ccache/bin/c++ -DBOOST_STACKTRACE_USE_ADDR2LINE=1 -DCONTOUR_FRONTEND_GUI -DCONTOUR_PROJECT_SOURCE_DIR=\"/home/mgnad/install/contour-git/src/contour-git\" -DCONTOUR_SCROLLBAR -DCONTOUR_STACKTRACE_ADDR2LINE=1 -DCONTOUR_VERSION_MAJOR=0 -DCONTOUR_VERSION_MINOR=3 -DCONTOUR_VERSION_PATCH=3 -DCONTOUR_VERSION_STRING=\"0.3.3-unreleased-makepkg-6a97b8af\" -DFMT_HEADER_ONLY=1 -DHAVE_BACKTRACE -DHAVE_BACKTRACE_SYMBOLS -DHAVE_CXXABI_H -DHAVE_DLADDR -DHAVE_DLFCN_H -DHAVE_DLSYM -DHAVE_EXECINFO_H -DHAVE_SYS_SELECT_H -DHAVE_UNWIND_H -DLIBTERMINAL_LOG_TRACE=1 -DLIBTERMINAL_PTY_BUFFER_OBJECTS=1 -DQT_CORE_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x050F00 -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGLWIDGETS_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/mgnad/install/contour-git/src/build/src/contour/contour_autogen/include -I/home/mgnad/install/contour-git/src/build/src/contour -I/home/mgnad/install/contour-git/src/contour-git/src -I/home/mgnad/install/contour-git/src/contour-git/_deps/sources/fmt-8.1.1/include -I/home/mgnad/install/contour-git/src/contour-git/_deps/sources/libunicode-a511f3995cdf708f2e199276c90e21408db00a50/src -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/lib/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtGui -isystem /usr/include/qt6/QtOpenGL -isystem /usr/include/qt6/QtOpenGLWidgets -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6/QtNetwork -isystem /usr/include/qt6/QtMultimedia -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection  -flto -O3 -DNDEBUG -fdiagnostics-color=always -maes -fPIC -std=c++17 -MD -MT src/contour/CMakeFiles/contour.dir/BlurBehind.cpp.o -MF src/contour/CMakeFiles/contour.dir/BlurBehind.cpp.o.d -o src/contour/CMakeFiles/contour.dir/BlurBehind.cpp.o -c /home/mgnad/install/contour-git/src/contour-git/src/contour/BlurBehind.cpp
/home/mgnad/install/contour-git/src/contour-git/src/contour/BlurBehind.cpp:35:18: schwerwiegender Fehler: private/qtx11extras_p.h: Datei oder Verzeichnis nicht gefunden
   35 |         #include <private/qtx11extras_p.h>

-> https://code.qt.io/cgit/qt/qtx11extras.git/about/?h=v5.4.2

Related to xcb I have added some fixes to master. But that particular line for qt6, hm... Thanks, I have to check how to do that. :)

I did not know there is an actual interest in depending on Qt6 already. :)

@christianparpart
Copy link
Member

Qt6-X11 builds were fixed in #826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants