Opened 2 months ago
Last modified 8 weeks ago
#73138 assigned defect
qt6-qtbase @6.10.0: fatal error: 'QtGui/private/qdbuslistener_p.h' file not found
| Reported by: | amadeus24 | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.11.5 |
| Keywords: | tahoe arm64 | Cc: | reneeotten (Renee Otten) |
| Port: | qt6-qtbase |
Description
Upgrading qt6-aqtbase, building failed since several files were not found.
A snippet from log-file:
:info:build /opt/local/var/macports/build/qt6-qtbase-e1fa6a31/work/qtbase-everywhere-src-6.10.0/src/gui/platform/unix/qgnomeportalinterface_p.h:22:10: fatal error: 'QtGui/private/qdbuslistener_p.h' file not found :info:build 1 error generated. :info:build /opt/local/var/macports/build/qt6-qtbase-e1fa6a31/work/qtbase-everywhere-src-6.10.0/src/gui/platform/unix/qgnomeportalinterface_p.h:22:10: fatal error: 'QtGui/private/qdbuslistener_p.h' file not found :info:build 1 error generated. :info:build /opt/local/var/macports/build/qt6-qtbase-e1fa6a31/work/qtbase-everywhere-src-6.10.0/src/gui/platform/unix/qkdetheme.cpp:11:10: fatal error: 'private/qdbustrayicon_p.h' file not found
Attachments (1)
Change History (7)
Changed 2 months ago by amadeus24
comment:1 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)
| Cc: | MarcusCalhoun-Lopez removed |
|---|---|
| Keywords: | tahoe added; qt6-qtbase don't upgrade at removed |
| Owner: | set to MarcusCalhoun-Lopez |
| Status: | new → assigned |
| Summary: | qt6-qtbase don't upgrade on arm64 - several files weren't found → qt6-qtbase @6.10.0: fatal error: 'QtGui/private/qdbuslistener_p.h' file not found |
comment:2 Changed 8 weeks ago by reneeotten (Renee Otten)
comment:4 Changed 8 weeks ago by amadeus24
Seems to me that the unix—stuff and its dependencies creates the problem and since I don't need them I want to deactivate them.
Tried to upgrade with
sudo port -s install qt6-qtbase \
configure.args-append="\
-DQT_FEATURE_systemtrayicon=OFF \
-DQT_FEATURE_platformtheme_genericunixtheme=OFF \
-DQT_FEATURE_platformtheme_genericunix=OFF \
-DQT_FEATURE_platformtheme_xdgdesktopportal=OFF \
-DQT_FEATURE_xdg_desktop_portal=OFF \
-DQT_FEATURE_wayland_client=OFF \
-DQT_FEATURE_wayland_server=OFF"
but configure.args-append ignored all the OFF.
- I copied the sources to a directory in my
$HOMEand
- changed the
Portfilein the sectionsubport ${name}-qtbase
# --- macOS Cocoa-only: make sure generic Unix platform theme sources never build --- post-patch { # In 6.10.0 the Unix platform theme/portal sources are listed directly in src/gui/CMakeLists.txt. # On macOS I exclude them to avoid DBus-private header build failures. set guicmake ${worksrcpath}/src/gui/CMakeLists.txt if {[file exists $guicmake]} { # 1) Comment out whole lines that mention any of these files foreach pat { platform/unix/qgenericunixtheme.cpp platform/unix/qgenericunixtheme_p.h platform/unix/qgnometheme.cpp platform/unix/qkdetheme.cpp platform/unix/qgnomeportalinterface.cpp platform/unix/qgnomeportalinterface_p.h } { reinplace "s|^\\(.*${pat}.*\\)$|# MacPorts: disabled on macOS \\1|" $guicmake } # 2) Also strip tokens in case they appear on long target_sources(...) lines foreach tok { "platform/unix/qgenericunixtheme.cpp" "platform/unix/qgenericunixtheme_p.h" "platform/unix/qgnometheme.cpp" "platform/unix/qkdetheme.cpp" "platform/unix/qgnomeportalinterface.cpp" "platform/unix/qgnomeportalinterface_p.h" } { reinplace "s|${tok}||g" $guicmake } # --- also disable the Wayland platform plugin on macOS --- set platcmake ${worksrcpath}/src/plugins/platforms/CMakeLists.txt if {[file exists $platcmake]} { # Comment out any line that adds the wayland subdirectory reinplace {s|^\(.*add_subdirectory(wayland.*\)$|# MacPorts: disabled on macOS \1|} $platcmake # In case "wayland" appears in token lists (rare), strip the token reinplace {s|\<wayland\>||g} $platcmake # Tidy up any double spaces created by the token removal reinplace {s| | |g} $platcmake } # NOTE: Do not run extra "cleanup" sed passes; CMake tolerates extra spaces/commas. } } # Keep feature args to document intent (harmless if also set in headers) # These don’t fix the issue by themselves, but we leave them for clarity. # (Leaving existing configure.args-append -DQT_FEATURE_* lines) } # Keep the feature toggles (harmless; documents intent) configure.args-append \ -DQT_FEATURE_platformtheme_genericunixtheme=OFF \ -DQT_FEATURE_platformtheme_genericunix=OFF \ -DQT_FEATURE_platformtheme_gtk3=OFF \ -DQT_FEATURE_platformtheme_xdgdesktopportal=OFF \ -DQT_FEATURE_xdg_desktop_portal=OFF \ -DQT_FEATURE_systemtrayicon=OFF \ -DQT_FEATURE_wayland_client=OFF \ -DQT_FEATURE_wayland_server=OFF buildworked.
comment:5 Changed 8 weeks ago by reneeotten (Renee Otten)
I cannot explain why this seems to happen just for you (at least as far as we know), as it works fine for me locally and also it builds on the buildbots for all supported systems. So to me it seems like there is something peculiar with your system (e.g., you have other ports installed that somehow affect the qt6-qtbase installations, you have things installed outside of MacPorts that interfere with it, ....). There is unfortunately not much to go on here.
comment:6 Changed 8 weeks ago by amadeus24
I‘m not sure this is correct. I‘m using qt6-qtbase in the versions before and always compiled them without any problems.
Unix platform themes were pulled into QtGui on macOS.
qgenericunixtheme.cpp, qgnometheme.cpp, qkdetheme.cpp, and the GNOME portal interface got added to src/gui/CMakeLists.txt in 6.10.0. They rely on Qt DBus private headers (qdbuslistener_p.h, qdbustrayicon_p.h) that aren’t available/used on macOS. Because those files were listed unconditionally (or not guarded tightly enough at CMake time), Ninja tried to build them and died with “file not found”.
Wayland client bits were also scheduled accidentally.
Even though the command line had QT_FEATURE_wayland_client=OFF, the headers said it was ON (macro redefinition warnings). That mismatch made CMake/Ninja try to build Wayland client plugin sources, which then failed looking for EGL types/headers (qeglplatformcontext_p.h, EGLContext, EGLDisplay) that don’t apply to Cocoa.
Why this happened on upgrade in this version, in my opinion: New CMakeLists lines and feature wiring in 6.10.0 that weren’t present (or were differently guarded) in previous version. Same MacPorts environment, new upstream build files → different behavior.
The failures came from Linux/Unix-only sources (GNOME/KDE themes, XDG portal, Wayland/EGL) being scheduled for build on Cocoa/macOS.
Adding DBus, Wayland, EGL, Mesa, etc. on macOS wouldn’t fix it and would be the wrong direction because the code paths still don’t match Cocoa (abstract class/API mismatches, not just missing headers).
Bottom line: my system didn’t lack packages; the port accidentally tried to compile Linux bits on macOS. The real “dependency” I need is the corrected Portfile/patch, which I now effectively have locally.
It would be a help if configure.args-append would accept if I reject something and not overruling me with something I don‘t need/want.
Please don‘t misunderstand me, I highly appreciate what you guys are doing and so far I‘m wrong, please feel free to correct me. If I‘m right I would appreciate if the next version would only accept configure.args-append.

it builds fine on the buildbot so you should be able to get a binary by now. I'll take a look at the log file you added to see what could be the difference between your local installation and what the buildbot does...