Bug 231369

Summary: [WPE] QtWPE API has undeclared dependency on qpa/qplatformnativeinterface.h
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WPE WebKitAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: aperez, bugs-noreply, dpino, mcatanzaro
Priority: P2    
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   

Michael Catanzaro
Reported 2021-10-07 09:44:13 PDT
I've failed to figure out how to build the QtWPE API: /home/mcatanzaro/Projects/WebKit/Source/WebKit/UIProcess/API/wpe/qt/WPEQtView.cpp:33:10: fatal error: qpa/qplatformnativeinterface.h: No such file or directory 33 | #include <qpa/qplatformnativeinterface.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. Not sure which Qt devel package on Fedora provides this. It appears to be a private header that's not part of the public API? Anyway, there is a WebKit bug here: OptionsWPE.cmake should detect all requirements and fail during the cmake stage if something is missing, rather than waiting until later to fail during compilation. Currently OptionsWPE.cmake does this: if (ENABLE_WPE_QT_API) find_package(Qt5 REQUIRED COMPONENTS Core Quick Gui) find_package(Qt5Test REQUIRED) endif () Something must be missing from here. Not sure what.
Attachments
Diego Pino
Comment 1 2021-11-15 04:47:45 PST
In Debian/Ubuntu, qplatformnativeinterface.h is provided by qtbase5-private-dev ``` $ apt-file search qplatformnativeinterface.h qtbase5-private-dev: /usr/include/x86_64-linux-gnu/qt5/QtGui/5.15.2/QtGui/qpa/qplatformnativeinterface.h ``` In Fedora, the header is provided by the same package but the location it seems to be different: /usr/include/qt5/QtGui/5.15.1/QtGui/qpa/qplatformnativeinterface.h https://fedora.pkgs.org/33/fedora-x86_64/qt5-qtbase-private-devel-5.15.1-5.fc33.x86_64.rpm.html I think there's nothing wrong with the required components in OptionsWPE.cmake as this file seems to be provided by Qt5Gui in both cases. I think the problem may lay in ${Qt5Gui_PRIVATE_INCLUDE_DIRS} (https://webkit-search.igalia.com/webkit/source/Source/WebKit/PlatformWPE.cmake#456). Perhaps it's not pointing to the right location of the headers in the case of Fedora?
Michael Catanzaro
Comment 2 2021-11-15 06:40:12 PST
(In reply to Diego Pino from comment #1) > I think there's nothing wrong with the required components in > OptionsWPE.cmake as this file seems to be provided by Qt5Gui in both cases. I don't agree, it's not checking for qt5-qtbase-private-devel at all. Proof: if I install qt5-qtbase-gui-devel but not qt5-qtbase-private-devel, the cmake stage succeeds even though the required package is not installed. So the cmake checks are insufficient.
Adrian Perez
Comment 3 2026-01-21 01:19:08 PST
I suppose this is not an issue anymore with the Qt6 bindings? We have removed the Qt5 ones (see #305602), and for the Qt6 ones, we have an additional: target_link_libraries(qtwpe PRIVATE Qt::QuickPrivate) We did not have something like that for the Qt5 code, and now the Qt6 one is using imported targets in CMake, and I expect the imported targets pull-in all needed flags for dependencies correctly.
Note You need to log in before you can comment on or make changes to this bug.