Bug 377490 - build failure with qt-5.9
Summary: build failure with qt-5.9
Status: RESOLVED FIXED
Alias: None
Product: frameworks-khtml
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.31.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Sandsmark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-11 11:00 UTC by Treeve Jelbert
Modified: 2017-10-11 20:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Treeve Jelbert 2017-03-11 11:00:02 UTC
this also applies to khtml-5.32
all other frameworks build ok


[101/503] Generating khtmlimage.json
Warning: Could not locate service type file kservicetypes5/kparts-readonlypart.desktop, tried ("/root/.local/share", "/opt/qt5/share", "/usr/share") ((null):0, (null))
Warning: Could not locate service type file kservicetypes5/browser-view.desktop, tried ("/root/.local/share", "/opt/qt5/share", "/usr/share") ((null):0, (null))
About to parse service type file "kparts-readonlypart.desktop"
About to parse service type file "browser-view.desktop"
Generated  "/usr/src/khtml-5.32.0/build/src/khtmlimage.json"

[102/503] Automatic moc for target khtmlpart
FAILED: src/CMakeFiles/khtmlpart_automoc
cd /usr/src/khtml-5.32.0/build/src && /usr/bin/cmake -E cmake_autogen /usr/src/khtml-5.32.0/build/src/CMakeFiles/khtmlpart_automoc.dir/ Release
Generating moc source khtmlpart_automoc.dir/moc_khtml_factory_NTHQOY6QXGWJMR.cpp
/usr/src/khtml-5.32.0/src/khtml_factory.h:31: Error: Plugin Metadata file "" could not be opened: file to open is a directory
AUTOGEN: error: process for /usr/src/khtml-5.32.0/build/src/khtmlpart_automoc.dir/moc_khtml_factory_NTHQOY6QXGWJMR.cpp failed:
/usr/src/khtml-5.32.0/src/khtml_factory.h:31: Error: Plugin Metadata file "" could not be opened: file to open is a directory

Generating moc compilation khtmlpart_automoc.cpp
moc failed...
[103/503] Automatic moc for target khtmladaptorpart
Comment 1 Luigi Toscano 2017-04-10 23:36:09 UTC
Proposed review (not by me) here:
https://phabricator.kde.org/D5392
if you want to test it and leave feedback.
Comment 2 Treeve Jelbert 2017-04-11 08:56:11 UTC
the patch solves the problem with qt-5.9

There is a similar problem in konqueror

diff --git a/webenginepart/src/webenginepartfactory.h b/webenginepart/src/webenginepartfactory.h
index 1eaaf42ba..cc6b4db14 100644
--- a/webenginepart/src/webenginepartfactory.h
+++ b/webenginepart/src/webenginepartfactory.h
@@ -30,7 +30,7 @@ class QWidget;
 class WebEngineFactory : public KPluginFactory
 {
     Q_OBJECT
-    Q_PLUGIN_METADATA(IID "org.kde.KPluginFactory" FILE "")
+    Q_PLUGIN_METADATA(IID "org.kde.KPluginFactory")
     Q_INTERFACES(KPluginFactory)
 public:
     virtual ~WebEngineFactory();
Comment 3 Aleix Pol 2017-04-13 01:03:07 UTC
Git commit 2d9c893adef9ba22a6357b01c51ca9983fbba5a9 by Aleix Pol.
Committed on 13/04/2017 at 01:02.
Pushed by apol into branch 'master'.

Fix build with Qt 5.9

Summary:
Otherwise we get the following error:
/home/apol/devel/frameworks/khtml/src/khtml_factory.h:31: Error: Plugin Metadata file "" could not be opened: file to open is a directory

Arguably it's something to fix upstream, but also having `FILE ""` doesn't add
much either.

Test Plan: Now it compiles, tests pass, khelpcenter runs.

Reviewers: #frameworks, kfunk

Reviewed By: kfunk

Subscribers: mpyne, ltoscano, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D5392

M  +1    -1    src/khtml_factory.h

https://commits.kde.org/khtml/2d9c893adef9ba22a6357b01c51ca9983fbba5a9
Comment 4 Fabian Vogt 2017-05-06 11:22:26 UTC
Git commit d47024af73f8fece618cfd52990abf6fbda57415 by Fabian Vogt.
Committed on 06/05/2017 at 11:21.
Pushed by fvogt into branch 'master'.

Fix build with Qt 5.9

moc 5.9 errors out when building:
Error: Plugin Metadata file "" could not be opened: file to open is a directory

Same issue and fix as https://phabricator.kde.org/D5392 for khtml.

M  +1    -1    src/kwebkitpartfactory.h

https://commits.kde.org/kwebkitpart/d47024af73f8fece618cfd52990abf6fbda57415
Comment 5 Fabian Vogt 2017-05-06 13:24:27 UTC
Git commit f84f6ed4a9c8f153d682aa6c4cf163fb8e4d98b5 by Fabian Vogt.
Committed on 06/05/2017 at 13:10.
Pushed by fvogt into branch 'Applications/17.04'.

Fix build with Qt 5.9

moc 5.9 errors out when building:
Error: Plugin Metadata file "" could not be opened: file to open is a directory

Same issue and fix as https://phabricator.kde.org/D5392 for khtml.

M  +1    -1    webenginepart/src/webenginepartfactory.h

https://commits.kde.org/konqueror/f84f6ed4a9c8f153d682aa6c4cf163fb8e4d98b5
Comment 6 Pino Toscano 2017-10-11 20:17:36 UTC
Git commit 3def65075c09af4961cd399e8e78ed78cca72e65 by Pino Toscano, on behalf of Wolfgang Bauer.
Committed on 11/10/2017 at 20:17.
Pushed by pino into branch '0.12'.

Fix build with Qt 5.9

Summary:
moc 5.9 errors out when building:
Error: Plugin Metadata file "" could not be opened: file to open is a directory

Same issue and fix as https://phabricator.kde.org/D5392 for khtml.

Test Plan: builds fine now with Qt 5.9.0rc and also earlier versions.

Reviewers: vriezen, pino

Reviewed By: pino

Subscribers: pino

Differential Revision: https://phabricator.kde.org/D5985

M  +1    -1    src/kmplayer_part.h

https://commits.kde.org/kmplayer/3def65075c09af4961cd399e8e78ed78cca72e65