Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949857 - app-emulation/virtualbox-7.1.4: Qt6 and Wayland only fails to compile -- "QX11Application’ is not a member of ‘QNativeInterface’; did you mean ‘QWaylandApplication'"
Summary: app-emulation/virtualbox-7.1.4: Qt6 and Wayland only fails to compile -- "QX1...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Viorel Munteanu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-17 06:12 UTC by Brendan Horan
Modified: 2025-02-28 14:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge info output (emerge-info,7.22 KB, text/plain)
2025-02-17 06:13 UTC, Brendan Horan
Details
Output of emerge -pqv '=app-emulation/virtualbox-7.1.4 (emerge-pqv,242 bytes, text/plain)
2025-02-17 06:13 UTC, Brendan Horan
Details
gzip of virtualbox-7.1.4- buildlog (virtualbox-7.1.4-build.log.gz,509.30 KB, application/gzip)
2025-02-17 06:42 UTC, Brendan Horan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Horan 2025-02-17 06:12:53 UTC
Hi,

Recently, VirtualBox fails to compile for me in a pure Wayland environment.
It used to compile just fine, I "feel" this issue happened after the "gui" flag, but I am not really sure.

Example of one of the compile time fail messages:
------------------------------------------------------
/var/tmp/portage/app-emulation/virtualbox-7.1.4/work/VirtualBox-7.1.4/src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.cpp:722:94: error: ‘QX11Application’ is not a member of ‘QNativeInterface’; did you mean ‘QWaylandApplication’?
|         QNativeInterface::QX11Application *pX11App = qApp->nativeInterface<QNativeInterface::QX11Application>();
|                                                                                              ^~~~~~~~~~~~~~~
|                                                                                              QWaylandApplication
------------------------------------------------------

I'e attached the build log and emerge info etc.
Please let me know if you need anything else, or if this is a misconfiguration on my side.

Reproducible: Always

Steps to Reproduce:
1.Use Wayland only
2.Emerge virtualbox 7.1.4
3.
Actual Results:  
--------------SNIP--------------
/var/tmp/portage/app-emulation/virtualbox-7.1.4/work/VirtualBox-7.1.4/src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.cpp:722:94: error: ‘QX11Application’ is not a member of ‘QNativeInterface’; did you mean ‘QWaylandApplication’?
  722 |         QNativeInterface::QX11Application *pX11App = qApp->nativeInterface<QNativeInterface::QX11Application>();
      |                                                                                              ^~~~~~~~~~~~~~~
      |                                                                                              QWaylandApplication
/var/tmp/portage/app-emulation/virtualbox-7.1.4/work/VirtualBox-7.1.4/src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.cpp:722:110: error: no matching function for call to ‘QGuiApplication::nativeInterface<<expression error> >()’
  722 |         QNativeInterface::QX11Application *pX11App = qApp->nativeInterface<QNativeInterface::QX11Application>();
/usr/include/qt6/QtCore/qnativeinterface.h:136:22: note: candidate: ‘template<class NativeInterface, class TypeInfo, class BaseType, typename std::enable_if<TypeInfo::isCompatibleWith<QGuiApplication>, bool>::type <anonymous> > NativeInterface* QGuiApplication::nativeInterface() const’
  136 |     NativeInterface *nativeInterface() const \
      |                      ^~~~~~~~~~~~~~~
/usr/include/qt6/QtGui/qguiapplication.h:142:5: note: in expansion of macro ‘QT_DECLARE_NATIVE_INTERFACE_ACCESSOR’
  142 |     QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(QGuiApplication)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qnativeinterface.h:136:22: note:   template argument deduction/substitution failed:
  136 |     NativeInterface *nativeInterface() const \
      |                      ^~~~~~~~~~~~~~~
/usr/include/qt6/QtGui/qguiapplication.h:142:5: note: in expansion of macro ‘QT_DECLARE_NATIVE_INTERFACE_ACCESSOR’
  142 |     QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(QGuiApplication)

--------------SNIP--------------

Expected Results:  
It emerges without errors as it did beforehand, using the same use flags.
Comment 1 Brendan Horan 2025-02-17 06:13:18 UTC
Created attachment 919129 [details]
emerge info output
Comment 2 Brendan Horan 2025-02-17 06:13:45 UTC
Created attachment 919130 [details]
Output of emerge -pqv '=app-emulation/virtualbox-7.1.4
Comment 3 Greg Kubaryk 2025-02-17 06:28:41 UTC
Could you attach the build.log as well, please?

As an aside, your binhost config is still pointing to a 17.1 directory but your profile is set to a 23.0; you should remove the configuration for 17.1 or update it to 23.0.
Comment 4 Brendan Horan 2025-02-17 06:42:09 UTC
Created attachment 919131 [details]
gzip of virtualbox-7.1.4- buildlog

sha256sum virtualbox-7.1.4-build.log.gz
8a9bd365f3230a46033fc40059babb35a73e8a3036e3edb41b1d07285e9d5e14  virtualbox-7.1.4-build.log.gz

sha256sum virtualbox-7.1.4-build.log
b1c0d86aee1034c21fe442264760ba82726f8b35d60bf2003e569dc55771e076  virtualbox-7.1.4-build.log
Comment 5 Brendan Horan 2025-02-17 06:44:30 UTC
(In reply to Greg Kubaryk from comment #3)
> Could you attach the build.log as well, please?

Attached, sorry I must have misted it.
Gzipped as it was rather large, added sha256 checksums.

> As an aside, your binhost config is still pointing to a 17.1 directory but
> your profile is set to a 23.0; you should remove the configuration for 17.1
> or update it to 23.0.

I do not have FEATURES="getbinpkg" enabled, so will the contents of "/etc/portage/binrepos.conf/gentoobinhost.conf" matter?

Looking over:
https://wiki.gentoo.org/wiki/Gentoo_Binary_Host_Quickstart#binrepos.conf

To see if I should simply delete it.
Comment 6 Greg Kubaryk 2025-02-17 07:11:46 UTC
Thanks for the build.log, reassigning.

(In reply to Brendan Horan from comment #5)
> I do not have FEATURES="getbinpkg" enabled, so will the contents of
> "/etc/portage/binrepos.conf/gentoobinhost.conf" matter?

Not really, unless you accidentally try to use binpkgs some day.

> Looking over:
> https://wiki.gentoo.org/wiki/Gentoo_Binary_Host_Quickstart#binrepos.conf
> 
> To see if I should simply delete it.

Yes, that'd work.
Comment 7 Viorel Munteanu gentoo-dev 2025-02-17 08:22:33 UTC
You need to rebuild dev-qt/qtbase with the X flag enabled.  This won't be a pure wayland environment, but upstream does not support one.

I will fix the dependency at some point, but I'll first try to build an X-less environment to check if anything else fails.
Comment 8 Brendan Horan 2025-02-17 22:29:22 UTC
(In reply to Viorel Munteanu from comment #7)
> You need to rebuild dev-qt/qtbase with the X flag enabled.  This won't be a
> pure wayland environment, but upstream does not support one.
> 
> I will fix the dependency at some point, but I'll first try to build an
> X-less environment to check if anything else fails.

Odd, as I don't feel I had the "X" use flag enabled for "dev-qt/qtbase" ever.
VirtualBox was working fine for the last 6+ months.

I can try that, and I assume that would fix it, but I don't understand why it used to work fine?

Hence, why I was semi surprised when the build started to fail.


I might have misunderstood, but I though QT handled all the X/Wayland stuff for VirtualBox, so as long as it was built, and environment variables set, it should be mostly okay.
I know the clipboard has been an issue, but that should be better in 7.1.x.
Comment 9 Larry the Git Cow gentoo-dev 2025-02-28 14:12:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0b2253f412c27e139c4b529b8101080a45d058f

commit f0b2253f412c27e139c4b529b8101080a45d058f
Author:     Viorel Munteanu <ceamac@gentoo.org>
AuthorDate: 2025-02-28 14:08:13 +0000
Commit:     Viorel Munteanu <ceamac@gentoo.org>
CommitDate: 2025-02-28 14:12:03 +0000

    app-emulation/virtualbox: require dev-qt/qtbase[X]
    
    Virtualbox 7.1 does not compile with dev-qt/qtbase[-X], so for now it
    cannot be built on a pure Wayland system.  I did not test if it still
    works if dev-qt/qtbase is rebuilt with -X afterwards, so I'm adding the
    requirement to RDEPEND.
    
    Closes: https://bugs.gentoo.org/949857
    Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>

 app-emulation/virtualbox/virtualbox-7.1.6a.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)