Nheko-Reborn / nheko

Desktop client for Matrix using Qt and C++20.

Home Page:https://nheko-reborn.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nheko-0.12.0: error: no member named 'QWaylandApplication' in namespace 'QNativeInterface'

dm9pZCAq opened this issue · comments

Describe the bug

when I'm trying to build nheko on Gentoo I'm getting this error:

FAILED: CMakeFiles/nheko.dir/src/main.cpp.o
/usr/lib/llvm/17/bin/clang++ -DCPPHTTPLIB_OPENSSL_SUPPORT -DCPPHTTPLIB_ZLIB_SUPPORT -DFMT_SHARED -DGSTREAMER_AVAILABLE -DNHEKO_DBUS_SYS -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_QMLBUI
LTINS_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -I/var/tmp/portage/net-im/nheko-0.12.0/w
ork/nheko-v0.12.0_build -I/var/tmp/portage/net-im/nheko-0.12.0/work/nheko-v0.12.0 -I/var/tmp/portage/net-im/nheko-0.12.0/work/nheko-v0.12.0_build/nheko_autogen/include -I/var/tmp/portage/net-im/nheko-0.12.0/work/nheko-v0.12.0/src -I/var/tm
p/portage/net-im/nheko-0.12.0/work/nheko-v0.12.0/includes -I/var/tmp/portage/net-im/nheko-0.12.0/work/nheko-v0.12.0/src/timeline -I/var/tmp/portage/net-im/nheko-0.12.0/work/nheko-v0.12.0/src/ui -I/var/tmp/portage/net-im/nheko-0.12.0/work/n
heko-v0.12.0/src/encryption -I/var/tmp/portage/net-im/nheko-0.12.0/work/nheko-v0.12.0/src/voip -isystem /usr/include/qt6/QtQml/6.7.1 -isystem /usr/include/qt6/QtQml/6.7.1/QtQml -isystem /usr/include/qt6/QtCore/6.7.1 -isystem /usr/include/q
t6/QtCore/6.7.1/QtCore -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/lib/qt6/mkspecs/linux-clang -isystem /usr/include/qt6/QtQmlBuiltins/6.7.1 -isystem /usr/include/qt6/QtQmlBuiltins/6.7.1/QtQmlBuiltins -isystem
/usr/include/qt6/QtQmlBuiltins -isystem /usr/include/qt6/QtQml -isystem /usr/include/qt6/QtQmlIntegration -isystem /usr/include/qt6/QtNetwork -isystem /usr/include/qt6/QtDBus -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6/Qt
Gui -isystem /usr/include/qt6/QtSvg -isystem /usr/include/qt6/QtMultimedia -isystem /usr/include/qt6/QtQuickControls2 -isystem /usr/include/qt6/QtQuick -isystem /usr/include/qt6/QtQmlModels -isystem /usr/include/kdsingleapplication-qt6 -is
ystem /usr/include/qt6/QtGui/6.7.1 -isystem /usr/include/qt6/QtGui/6.7.1/QtGui -isystem /usr/include/gstreamer-1.0 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/lib/gstreamer-1.0/include -isystem /usr/lib/libffi/
include -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include  -pipe -march=native -O3 -flto -fPIC -falign-functions=32 -funroll-loops -fno-math-errno -fno-trapping-math -fno-math-errno -ffinite-math-only -fno-rounding-math -fn
o-signed-zeros -fassociative-math -freciprocal-math -fstack-protector-all -fstack-protector-strong -fstack-clash-protection -fPIE -fcf-protection -D_FORTIFY_SOURCE=2 -D_LARGEFILE64_SOURCE         -Wall         -Wextra         -pedantic
     -fsized-deallocation         -fdiagnostics-color=always         -Wunreachable-code         -Wno-attributes -Wshadow -std=gnu++20 -fPIE -fPIC -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -pthread -MD -MT CMakeFiles/n
heko.dir/src/main.cpp.o -MF CMakeFiles/nheko.dir/src/main.cpp.o.d -o CMakeFiles/nheko.dir/src/main.cpp.o -c /var/tmp/portage/net-im/nheko-0.12.0/work/nheko-v0.12.0/src/main.cpp
/var/tmp/portage/net-im/nheko-0.12.0/work/nheko-v0.12.0/src/main.cpp:254:65: error: no member named 'QWaylandApplication' in namespace 'QNativeInterface'
  254 |         auto waylandApp = app.nativeInterface<QNativeInterface::QWaylandApplication>();
      |                                               ~~~~~~~~~~~~~~~~~~^
/var/tmp/portage/net-im/nheko-0.12.0/work/nheko-v0.12.0/src/main.cpp:267:65: error: no member named 'QWaylandWindow' in namespace 'QNativeInterface::Private'
  267 |               window.nativeInterface<QNativeInterface::Private::QWaylandWindow>();
      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/var/tmp/portage/net-im/nheko-0.12.0/work/nheko-v0.12.0/src/main.cpp:272:47: error: no member named 'QWaylandWindow' in namespace 'QNativeInterface::Private'
  272 |                   &QNativeInterface::Private::QWaylandWindow::xdgActivationTokenCreated,
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
3 errors generated.

I compiled dev-qt/qtbase-6.7.1 with USE="-* X concurrent dbus gui network widgets zstd" (without wayland support), as I understand error happens due to this, maybe in nheko somewhere should be check for wayland support?

To Reproduce

USE="-wayland X concurrent dbus gui network widgets zstd" \
    emerge dev-qt/qtbase '=net-im/nheko-0.12.0::guru'

What happened?

No response

Expected behavior

No response

Screenshots

No response

Version

0.12.0

Operating system

Linux

Installation method

Local build

Qt version

5.15.14 and 6.7.1

C++ compiler

clang version 17.0.6

Desktop Environment

No response

Did you use profiles?

  • Profiles used?

Relevant log output

No response

Backtrace

No response

This should still work on systems without wayland, but I guess the problem is that the specific header isn't installed on non-wayland systems. We probably should check, if the header exists.

You can pick that above commit into your patches, which should resolve your problem. I didn't know that the struct was incomplete on some platforms...