qmake cannot find webkitwidgets module with qtwebkit base app

wereturtle wereturtledev at gmail.com
Thu May 31 18:35:00 UTC 2018


Hi all,

I am trying to create a flatpak manifest for building a Qt app that
uses qtwebkit, but am having a problem.  For my example starting
point, I'm borrowing from an app that already exists in Flathub,
CuteMarkEd.  As a prerequisite for building CuteMarkEd (as well as my
own app), I've installed the qtwebkit base app and the Qt and KF5
Runtimes with the following commands using the latest Flatpak from the
official Ubuntu PPA (currently version 0.11.7):

$ flatpak remote-add --if-not-exists flathub
https://flathub.org/repo/flathub.flatpakrepo
$ flatpak install flathub org.kde.Platform//5.9
$ flatpak install flathub org.kde.Sdk//5.9
$ flatpak install flathub io.qt.qtwebkit.BaseApp

I've then created my build area directory, and beneath that created
app and repo directories:

I am using the io.github.cloose.CuteMarkEd.json and
io.github.cloose.CuteMarkEd.appdata.xml files from
https://github.com/flathub/io.github.cloose.CuteMarkEd.  My directory
structure looks like this:


build_dir
-> app/
-> repo/
-> io.github.cloose.CuteMarkEd.json
-> io.github.cloose.CuteMarkEd.appdata.xml

Finally, I've tried to build with the following command from within build_dir:

$ flatpak-builder --ccache --repo=repo --subject="Build of CuteMarkEd
`date`" app io.github.cloose.CuteMarkEd.json --force-clean

The first error I get is the following:

ln: failed to create symbolic link
'/app/include/QtWebKitWidgets/QWebFrame.h': No such file or directory

It appears that in my app/ directory, there is a files/lib directory,
but no files/include directory.  Likewise for
/var/lib/flatpak/app/io.qt.qtwebkit.BaseApp/current/active/files/.
There is only a lib directory with the qtwebkit libraries, but there
is no include directory with the header files.

If I remove the line from io.github.cloose.CuteMarkEd.json in
build-commands that creates the softlink to QWebFrame.h, and allow
qmake to proceed, I end up with the following error:

Project ERROR: Unknown module(s) in QT: webkitwidgets

How do I get this app to build with qtwebkit as its base app?  What
step am I missing that Flathub obviously has in place to build it?

Thanks in advance!

Also, below is the manifest for CuteMarkEd, for your convenience:

{
    "app-id": "io.github.cloose.CuteMarkEd",
    "base": "io.qt.qtwebkit.BaseApp",
    "base-version": "stable",
    "runtime": "org.kde.Platform",
    "runtime-version": "5.9",
    "sdk": "org.kde.Sdk",
    "command": "cutemarked",
    "rename-icon": "cutemarked",
    "rename-desktop-file": "cutemarked.desktop",
    "finish-args":[
        "--socket=x11",
        "--socket=wayland",
        "--share=network",
        "--device=dri"
    ],
    "cleanup": [
        "/include",
        "/lib/cmake",
        "/lib/mkspecs",
        "/lib/pkgconfig",
        "*.la",
        "*.a"
    ],
    "modules":[
        {
            "name": "discount",
            "no-autogen": true,
            "sources":[
                {
                    "type":"archive",
                    "url":
"https://github.com/Orc/discount/archive/v2.2.3a.tar.gz",
                    "sha256":
"40defe460dc005dbc78a4e6174fce29fca2ac3ccd5acd400c05eb713f824df97"
                },
                {
                    "type": "shell",
                    "commands": ["./configure.sh --prefix=/app"]
                }
            ]
        },
        {
            "name": "cutemarked",
            "buildsystem": "simple",
            "sources":[
                {
                    "type":"archive",
                    "url":
"https://github.com/cloose/CuteMarkEd/archive/v0.11.3.tar.gz",
                    "sha256":
"78a41808c2f0452375810abdff76eeaaee012f8d1368a2b8772ec6b4d2ceeec8"
                },
                {
                    "type": "file",
                    "path": "io.github.cloose.CuteMarkEd.appdata.xml"
                }
            ],
            "build-commands": [
                "ln -s /app/include/QtWebKitWidgets/qwebframe.h
/app/include/QtWebKitWidgets/QWebFrame.h",
                "export QMAKEPATH=QMAKEPATH:/app/lib && qmake
-makefile \"INCLUDEPATH+=/app/include/QtWebKitWidgets\"
\"INCLUDEPATH+=/app/include/QtWebKit\" \"QMAKE_LIBDIR+=/app/lib\"
PREFIX=/app",
                "export QMAKEPATH=QMAKEPATH:/app/lib && make",
                "make install",
                "install -Dm644
io.github.cloose.CuteMarkEd.appdata.xml
/app/share/appdata/io.github.cloose.CuteMarkEd.appdata.xml"
            ]
        }
    ]
}


More information about the Flatpak mailing list