Bug 1456211

Summary: missing private headets in cmake config
Product: [Fedora] Fedora Reporter: Christian Gmeiner <christian.gmeiner>
Component: qt5-qtdeclarativeAssignee: Than Ngo <than>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: christian.gmeiner, jgrulich, jreznik, lupinix.fedora, rdieter, than
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qt5-qtdeclarative-5.7.1-8.fc26 qt5-qtdeclarative-5.7.1-8.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-20 01:49:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Diff between Fedora and Arch Qt5QuickConfig.cmake none

Description Christian Gmeiner 2017-05-27 21:44:33 UTC
Description of problem:

/usr/lib64/cmake/Qt5Quick/Qt5QuickConfig.cmake does not set Qt5Quick_PRIVATE_INCLUDE_DIRS correctly.

It could/should be:
set(Qt5Quick_PRIVATE_INCLUDE_DIRS "/usr/include/qt5/QtQuick/5.7.1/QtQuick/")

Version-Release number of selected component (if applicable):
qt5-qtdeclarative-devel-5.7.1-5.fc25.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. git clone https://github.com/annulen/webkit
2. cd webkit
3. Tools/Scripts/build-webkit --qt --release

Actual results:
[1053/1431] Building CXX object Source/WebKit2/CMakeFiles/WebKit2.dir/UIProcess/API/qt/qquicknetworkreply.cpp.o
FAILED: Source/WebKit2/CMakeFiles/WebKit2.dir/UIProcess/API/qt/qquicknetworkreply.cpp.o 
/usr/lib64/ccache/c++    @Source/WebKit2/CMakeFiles/WebKit2.dir/UIProcess/API/qt/qquicknetworkreply.cpp.o.rsp -MD -MT Source/WebKit2/CMakeFiles/WebKit2.dir/UIProcess/API/qt/qquicknetworkreply.cpp.o -MF Source/WebKit2/CMakeFiles/WebKit2.dir/UIProcess/API/qt/qquicknetworkreply.cpp.o.d -o Source/WebKit2/CMakeFiles/WebKit2.dir/UIProcess/API/qt/qquicknetworkreply.cpp.o -c ../../Source/WebKit2/UIProcess/API/qt/qquicknetworkreply.cpp
In file included from ../../Source/WebKit2/UIProcess/API/qt/qquicknetworkreply_p.h:27:0,
                 from ../../Source/WebKit2/UIProcess/API/qt/qquicknetworkreply.cpp:22:
../../Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h:29:39: schwerwiegender Fehler: private/qquickflickable_p.h: No such file or directory
 #include <private/qquickflickable_p.h>

Expected results:
It builds without errors.

Additional info:

Comment 1 Rex Dieter 2017-05-28 12:43:33 UTC
pretty sure qtwebkit doesn't use cmake (but qmake)

Comment 2 Rex Dieter 2017-05-28 13:01:02 UTC
actually, the output you posted does indeed look like cmake.

Have you confirmed adjusting Qt5QuickConfig.cmake helps?

Comment 3 Rex Dieter 2017-05-28 13:02:21 UTC
Also note this section of Qt5QuickConfig.cmake:

    # Only check existence of private includes if the Private component is
    # specified.
    list(FIND Qt5Quick_FIND_COMPONENTS Private _check_private)
    if (NOT _check_private STREQUAL -1)
        foreach(_dir ${Qt5Quick_PRIVATE_INCLUDE_DIRS})
            _qt5_Quick_check_file_exists(${_dir})
        endforeach()
    endif()


means qtwebkit needs to explicitly request the private headers, does it?

Comment 4 Christian Dersch 2017-06-11 14:37:49 UTC
I'm also seeing this with qmake, but from logs I see that cmake is used in background anyway.

Comment 5 Christian Dersch 2017-06-15 17:44:17 UTC
I also get that issue on Rawhide with Qt 5.9.0 while Arch Linux already provides a new qt5-webkit → They build it successfully. Not I checked their Qt5QuickConfig.cmake and there is a difference in *exactly* that point (see attachment).

Comment 6 Christian Dersch 2017-06-15 17:45:08 UTC
Created attachment 1288154 [details]
Diff between Fedora and Arch Qt5QuickConfig.cmake

diff -Naur Qt5QuickConfig.cmake.fedora Qt5QuickConfig.cmake.arch

Comment 7 Rex Dieter 2017-06-15 18:01:38 UTC
Looks like we've stumbled upon upstream bug,
https://bugreports.qt.io/browse/QTBUG-37417

Comment 8 Christian Dersch 2017-06-15 18:43:22 UTC
Exactly, when I do the build of qt5-qtdeclarative in source tree, the resulting Qt5QuickConfig.cmake looks fine.

Comment 9 Christian Dersch 2017-06-15 20:46:09 UTC
I've built a copr [1] to test a change [2] Arch makes to fix this issue, so added to %prep in spec of qt5-qtbase: 

# Fix missing private includes https://bugreports.qt.io/browse/QTBUG-37417
sed -e '/CMAKE_NO_PRIVATE_INCLUDES\ \=\ true/d' -i mkspecs/features/create_cmake.prf

Result: qt5-qtdeclarative rebuilt against this new qt5-qtbase build has proper definitions in Qt5QuickConfig.cmake. I think we should adapt the change to qt5-qtbase.

[1] https://copr.fedorainfracloud.org/coprs/lupinix/qt59-test/
[2] https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/qt5-base#n50

Comment 10 Rex Dieter 2017-06-15 21:37:39 UTC
Oh, I just committed this:

http://pkgs.fedoraproject.org/cgit/rpms/qt5-qtdeclarative.git/commit/?id=0153371fc6a5972d7b2f4eebdeb4f40e6c65b8cf

to drop shadow builds, which reportedly fixes the issue too.


I suppose we could adapt the CMAKE_NO_PRIVATE_INCLUDES change too, but no one knows if that has any side-effects (apparently not, other distros use that hack as well).

Comment 11 Rex Dieter 2017-06-16 14:50:09 UTC
OK, all other core qt5 modules no longer use shadow-builds, and added now to qt5-qtbase:

%changelog
* Fri Jun 16 2017 Rex Dieter <rdieter> - 5.9.0-3
- create_cmake.prf: adjust CMAKE_NO_PRIVATE_INCLUDES (#1456211,QTBUG-37417)

that should theoretically avoid the issue for good

Comment 12 Fedora Update System 2017-06-16 16:31:52 UTC
qt5-qtdeclarative-5.7.1-8.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2a01da57ff

Comment 13 Fedora Update System 2017-06-16 16:35:42 UTC
qt5-qtdeclarative-5.7.1-8.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c1937fe117

Comment 14 Fedora Update System 2017-06-18 03:52:40 UTC
qt5-qtdeclarative-5.7.1-8.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c1937fe117

Comment 15 Fedora Update System 2017-06-18 06:20:51 UTC
qt5-qtdeclarative-5.7.1-8.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-2a01da57ff

Comment 16 Fedora Update System 2017-06-19 14:16:28 UTC
qt5-qtdeclarative-5.6.2-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-9016c421fd

Comment 17 Fedora Update System 2017-06-19 14:35:13 UTC
qt5-qtdeclarative-5.7.1-8.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2017-06-19 15:52:15 UTC
qt5-qtdeclarative-5.6.2-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9016c421fd

Comment 19 Fedora Update System 2017-06-20 01:49:37 UTC
qt5-qtdeclarative-5.7.1-8.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2017-06-21 11:19:09 UTC
qt5-qtdeclarative-5.6.2-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.