Opened 6 months ago

Closed 6 days ago

#73138 closed defect (fixed)

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), cooljeanius (Eric Gallager), mohd-akram (Mohamed Akram)
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 (2)

main.log (2.9 MB) - added by amadeus24 6 months ago.
main.2.log (139.8 KB) - added by amadeus24 2 weeks ago.
main.log from 1. April 2026

Change History (18)

Changed 6 months ago by amadeus24

Attachment: main.log added

comment:1 Changed 6 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: newassigned
Summary: qt6-qtbase don't upgrade on arm64 - several files weren't foundqt6-qtbase @6.10.0: fatal error: 'QtGui/private/qdbuslistener_p.h' file not found

comment:2 Changed 6 months ago by reneeotten (Renee Otten)

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...

comment:3 Changed 6 months ago by amadeus24

Last edited 6 months ago by amadeus24 (previous) (diff)

comment:4 Changed 6 months 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.

  1. I copied the sources to a directory in my $HOME and
  2. changed the Portfile in the section subport ${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
    
  3. build worked.

comment:5 Changed 6 months 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 6 months 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.

comment:7 Changed 3 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:8 Changed 2 months ago by cooljeanius (Eric Gallager)

I also get this failure on x86_64, so the "arm64" keyword can be removed.

comment:9 Changed 6 weeks ago by johankytt (Johan Kütt)

According to the port page https://ports.macports.org/port/qt6-qtbase/details/ the current version 6.10.2 builds fine. So can this issue be closed?

comment:10 in reply to:  9 ; Changed 5 weeks ago by cooljeanius (Eric Gallager)

Replying to johankytt:

According to the port page https://ports.macports.org/port/qt6-qtbase/details/ the current version 6.10.2 builds fine. So can this issue be closed?

No, I still experience this build failure on my machine.

comment:11 in reply to:  10 ; Changed 2 weeks ago by amadeus24

Replying to cooljeanius:

Replying to johankytt:

According to the port page https://ports.macports.org/port/qt6-qtbase/details/ the current version 6.10.2 builds fine. So can this issue be closed?

No, I still experience this build failure on my machine.

I was just upgrading qt6-qtbase and was facing a different error during building.
Minimal workaround that allowed me to build:
In qyieldcpu.h, replacing:

yield();

with:

builtin_arm_yield();

comment:12 in reply to:  11 Changed 2 weeks ago by reneeotten (Renee Otten)

Replying to amadeus24:

I was just upgrading qt6-qtbase and was facing a different error during building.
Minimal workaround that allowed me to build:
In qyieldcpu.h, replacing:

yield();

with:

builtin_arm_yield();

please add the main.log. It seems to me though that the builds succeed for all supported systems on the buildbots, so as before it seems to me this likely is a local issue that only shows up for some people...

Changed 2 weeks ago by amadeus24

Attachment: main.2.log added

main.log from 1. April 2026

comment:13 Changed 2 weeks ago by amadeus24

I have 2 MB's, both equipped with arm64. One which I use privately and the other one managend by my entrepreneur. The error occur on both. main.log uploaded.
Snippet from main.log:

434::info:build In file included from /opt/local/var/macports/build/qt6-qtbase-43387f49/work/qtbase-everywhere-src-6.11.0/include/QtCore/qyieldcpu.h:1:
435::info:build /opt/local/var/macports/build/qt6-qtbase-43387f49/work/qtbase-everywhere-src-6.11.0/src/corelib/thread/qyieldcpu.h:37:5: error: implicitly declaring library function '__yield' with type 'void ()' [-Werror,-Wimplicit-function-declaration]
436-:info:build    37 |     __yield();              // Generic
437-:info:build       |     ^
438::info:build /opt/local/var/macports/build/qt6-qtbase-43387f49/work/qtbase-everywhere-src-6.11.0/src/corelib/thread/qyieldcpu.h:37:5: note: include the header <arm_acle.h> or explicitly provide a declaration for '__yield'
439-:info:build 1 error generated.
440-:info:build ninja: build stopped: subcommand failed.
441-:info:build Command failed:  cd "/opt/local/var/macports/build/qt6-qtbase-43387f49/work/qtbase-everywhere-src-6.11.0" && ninja -j10 all -v 
442-:info:build Exit code: 1

comment:14 in reply to:  13 Changed 6 days ago by mohd-akram (Mohamed Akram)

Replying to amadeus24:

I have 2 MB's, both equipped with arm64. One which I use privately and the other one managend by my entrepreneur. The error occur on both. main.log uploaded.
Snippet from main.log:

434::info:build In file included from /opt/local/var/macports/build/qt6-qtbase-43387f49/work/qtbase-everywhere-src-6.11.0/include/QtCore/qyieldcpu.h:1:
435::info:build /opt/local/var/macports/build/qt6-qtbase-43387f49/work/qtbase-everywhere-src-6.11.0/src/corelib/thread/qyieldcpu.h:37:5: error: implicitly declaring library function '__yield' with type 'void ()' [-Werror,-Wimplicit-function-declaration]
436-:info:build    37 |     __yield();              // Generic
437-:info:build       |     ^
438::info:build /opt/local/var/macports/build/qt6-qtbase-43387f49/work/qtbase-everywhere-src-6.11.0/src/corelib/thread/qyieldcpu.h:37:5: note: include the header <arm_acle.h> or explicitly provide a declaration for '__yield'
439-:info:build 1 error generated.
440-:info:build ninja: build stopped: subcommand failed.
441-:info:build Command failed:  cd "/opt/local/var/macports/build/qt6-qtbase-43387f49/work/qtbase-everywhere-src-6.11.0" && ninja -j10 all -v 
442-:info:build Exit code: 1

I'm getting this same error building on macOS 26.4.

EDIT: Fixed in [d18a3ef0bd7d8fdd9fd01a47774d78dfda0b4a35/macports-ports].

Last edited 6 days ago by mohd-akram (Mohamed Akram) (previous) (diff)

comment:15 Changed 6 days ago by mohd-akram (Mohamed Akram)

Cc: mohd-akram added

comment:16 Changed 6 days ago by mohd-akram (Mohamed Akram)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.