Bug 231369 - [WPE] QtWPE API has undeclared dependency on qpa/qplatformnativeinterface.h
Summary: [WPE] QtWPE API has undeclared dependency on qpa/qplatformnativeinterface.h
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WPE WebKit (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-07 09:44 PDT by Michael Catanzaro
Modified: 2021-11-15 06:40 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 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.
Comment 1 Diego Pino 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?
Comment 2 Michael Catanzaro 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.