* [Buildroot] [PATCH] package/qt5/qt5webkit: fix generated artifacts @ 2022-09-22 21:45 Thomas Ballasi 2022-09-29 10:43 ` Giulio Benetti 2022-09-29 18:13 ` [Buildroot] [PATCH v2] " Thomas Ballasi 0 siblings, 2 replies; 8+ messages in thread From: Thomas Ballasi @ 2022-09-22 21:45 UTC (permalink / raw) To: buildroot; +Cc: Peter Seiderer, Thomas Ballasi, Julien Corjon Generated artifacts of the installation process were wrongly located, causing packages using qt5webkit (qt-webkit-kiosk and python-pyqt5) to fail at build time. The changes aims at fixing this issue. There were three main issues occuring during the build: 1. *.pri files were wrongly located in the host's and target's sysroot directores while buildroot implements its own mkspecs directory. By setting KDE_INSTALL_USE_QT_SYS_PATHS on, mkspecs modules are now being installed in host's data dir (ECM_MKSPECS_INSTALL_DIR is set accordingly @ line 102 in Source/cmake/ECMGeneratePriFile.cmake). This also required to prevent using the CMake package's default DATADIR variable as it enforces to install under the sysroot directory. 2. *.pri files' content had hardcoded include and library paths which has been corrected by setting on KDE_INSTALL_USE_QT_SYS_PATHS as their content is written according to this value (see line 514 and 739 in file Source/WebKit/PlatformQt.cmake). 3. *.h files were located a directory below where supposed (inside qt5/ directory). This was caused by using DATADIR which assumed include files were to be located in sysroot/usr/include/. Disabling this variable by removing it from build options leads to a correct behavior. Regression happened when qt5webkit started using cmake-package at commit df0b0fe6919c0d0f3750f439a3cfa765232bd569. More info @ https://bugs.buildroot.org/show_bug.cgi?id=14606 Signed-off-by: Thomas Ballasi <thomas.ballasi@savoirfairelinux.com> --- ...-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch | 42 +++++++++++++++++++ package/qt5/qt5webkit/qt5webkit.mk | 7 ++++ 2 files changed, 49 insertions(+) create mode 100644 package/qt5/qt5webkit/0007-cmake-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch diff --git a/package/qt5/qt5webkit/0007-cmake-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch b/package/qt5/qt5webkit/0007-cmake-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch new file mode 100644 index 0000000000..b65eb305b4 --- /dev/null +++ b/package/qt5/qt5webkit/0007-cmake-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch @@ -0,0 +1,42 @@ +From f4950219005b487c18d41ce4e6bc11c4b0e3a20d Mon Sep 17 00:00:00 2001 +From: Thomas Ballasi <thomas.ballasi@savoirfairelinux.com> +Date: Wed, 21 Sep 2022 14:46:40 -0400 +Subject: [PATCH] cmake: set KDE_INSTALL_USE_QT_SYS_PATHS on + +This variable is used to save .pri files to directories relative to the +host (output/host/mkspecs/modules/) rather than relative to the target +itself, which is unwanted behavior. + +The changes also enables .pri files not to hardcode include and library +paths and to use $$QT_MODULE_INCLUDE_BASE and $$QT_MODULE_LIB_BASE. + +Signed-off-by: Thomas Ballasi <thomas.ballasi@savoirfairelinux.com> +--- + Source/cmake/OptionsQt.cmake | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake +index 1ee60b777106..607c69bd38fe 100644 +--- a/Source/cmake/OptionsQt.cmake ++++ b/Source/cmake/OptionsQt.cmake +@@ -998,16 +998,10 @@ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) + include(ECMQueryQmake) + + query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX) +-if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) +- set(CMAKE_INSTALL_PREFIX "${qt_install_prefix_dir}" CACHE PATH "Install path prefix, prepended onto install directories." FORCE) +-endif () ++set(CMAKE_INSTALL_PREFIX "${qt_install_prefix_dir}") + + include(KDEInstallDirs) + +-if (NOT qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") +- set(KDE_INSTALL_USE_QT_SYS_PATHS OFF) +-endif () +- + # We split all installed files into 2 components: Code and Data. This is different from + # traditional approach with Runtime and Devel, but we need it to fix concurrent installation of + # debug and release builds in qmake-based build +-- +2.25.1 + diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk index 6912359674..607c022568 100644 --- a/package/qt5/qt5webkit/qt5webkit.mk +++ b/package/qt5/qt5webkit/qt5webkit.mk @@ -57,4 +57,11 @@ QT5WEBKIT_CONF_OPTS += \ -DSHARED_CORE=ON \ -DUSE_LIBHYPHEN=OFF +QT5WEBKIT_INSTALL_STAGING_OPTS = install/fast + +define QT5WEBKIT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(BR2_CMAKE) --install $(QT5WEBKIT_BUILDDIR) \ + --prefix $(TARGET_DIR)/usr +endef + $(eval $(cmake-package)) -- 2.25.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH] package/qt5/qt5webkit: fix generated artifacts 2022-09-22 21:45 [Buildroot] [PATCH] package/qt5/qt5webkit: fix generated artifacts Thomas Ballasi @ 2022-09-29 10:43 ` Giulio Benetti 2022-09-29 18:04 ` Thomas Ballasi 2022-09-29 18:13 ` [Buildroot] [PATCH v2] " Thomas Ballasi 1 sibling, 1 reply; 8+ messages in thread From: Giulio Benetti @ 2022-09-29 10:43 UTC (permalink / raw) To: Thomas Ballasi, buildroot; +Cc: Peter Seiderer, Julien Corjon Hi Thomas, On 22/09/22 23:45, Thomas Ballasi wrote: > Generated artifacts of the installation process were wrongly located, > causing packages using qt5webkit (qt-webkit-kiosk and python-pyqt5) to > fail at build time. The changes aims at fixing this issue. "The changes aims at fixing this issue." should be: "Let's add a patch that:" and then you list the points below using the present verb > There were three main issues occuring during the build: > > 1. *.pri files were wrongly located in the host's and target's sysroot > directores while buildroot implements its own mkspecs directory. > By setting KDE_INSTALL_USE_QT_SYS_PATHS on, mkspecs modules are now > being installed in host's data dir (ECM_MKSPECS_INSTALL_DIR is set > accordingly @ line 102 in Source/cmake/ECMGeneratePriFile.cmake). > This also required to prevent using the CMake package's default > DATADIR variable as it enforces to install under the sysroot > directory. > > 2. *.pri files' content had hardcoded include and library paths which > has been corrected by setting on KDE_INSTALL_USE_QT_SYS_PATHS as > their content is written according to this value (see line 514 and > 739 in file Source/WebKit/PlatformQt.cmake). > > 3. *.h files were located a directory below where supposed (inside qt5/ > directory). This was caused by using DATADIR which assumed include > files were to be located in sysroot/usr/include/. > Disabling this variable by removing it from build options leads to a > correct behavior. > > Regression happened when qt5webkit started using cmake-package at commit > df0b0fe6919c0d0f3750f439a3cfa765232bd569. What is the upstream status of this patch? Can you point here the URL of the pending patch? > More info @ https://bugs.buildroot.org/show_bug.cgi?id=14606 Here ^^^ it should be: Fixes: https://bugs.buildroot.org/show_bug.cgi?id=14606 > Signed-off-by: Thomas Ballasi <thomas.ballasi@savoirfairelinux.com> > --- > ...-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch | 42 +++++++++++++++++++ > package/qt5/qt5webkit/qt5webkit.mk | 7 ++++ > 2 files changed, 49 insertions(+) > create mode 100644 package/qt5/qt5webkit/0007-cmake-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch > > diff --git a/package/qt5/qt5webkit/0007-cmake-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch b/package/qt5/qt5webkit/0007-cmake-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch > new file mode 100644 > index 0000000000..b65eb305b4 > --- /dev/null > +++ b/package/qt5/qt5webkit/0007-cmake-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch > @@ -0,0 +1,42 @@ > +From f4950219005b487c18d41ce4e6bc11c4b0e3a20d Mon Sep 17 00:00:00 2001 > +From: Thomas Ballasi <thomas.ballasi@savoirfairelinux.com> > +Date: Wed, 21 Sep 2022 14:46:40 -0400 > +Subject: [PATCH] cmake: set KDE_INSTALL_USE_QT_SYS_PATHS on > + > +This variable is used to save .pri files to directories relative to the > +host (output/host/mkspecs/modules/) rather than relative to the target > +itself, which is unwanted behavior. > + > +The changes also enables .pri files not to hardcode include and library > +paths and to use $$QT_MODULE_INCLUDE_BASE and $$QT_MODULE_LIB_BASE. > + > +Signed-off-by: Thomas Ballasi <thomas.ballasi@savoirfairelinux.com> Also here please add: '[Upstream status: URL of this pending patch] > +--- > + Source/cmake/OptionsQt.cmake | 8 +------- > + 1 file changed, 1 insertion(+), 7 deletions(-) > + > +diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake > +index 1ee60b777106..607c69bd38fe 100644 > +--- a/Source/cmake/OptionsQt.cmake > ++++ b/Source/cmake/OptionsQt.cmake > +@@ -998,16 +998,10 @@ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) > + include(ECMQueryQmake) > + > + query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX) > +-if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) > +- set(CMAKE_INSTALL_PREFIX "${qt_install_prefix_dir}" CACHE PATH "Install path prefix, prepended onto install directories." FORCE) > +-endif () > ++set(CMAKE_INSTALL_PREFIX "${qt_install_prefix_dir}") > + > + include(KDEInstallDirs) > + > +-if (NOT qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") > +- set(KDE_INSTALL_USE_QT_SYS_PATHS OFF) > +-endif () > +- > + # We split all installed files into 2 components: Code and Data. This is different from > + # traditional approach with Runtime and Devel, but we need it to fix concurrent installation of > + # debug and release builds in qmake-based build > +-- > +2.25.1 > + > diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk > index 6912359674..607c022568 100644 > --- a/package/qt5/qt5webkit/qt5webkit.mk > +++ b/package/qt5/qt5webkit/qt5webkit.mk > @@ -57,4 +57,11 @@ QT5WEBKIT_CONF_OPTS += \ > -DSHARED_CORE=ON \ > -DUSE_LIBHYPHEN=OFF > > +QT5WEBKIT_INSTALL_STAGING_OPTS = install/fast > + > +define QT5WEBKIT_INSTALL_TARGET_CMDS > + $(TARGET_MAKE_ENV) $(BR2_CMAKE) --install $(QT5WEBKIT_BUILDDIR) \ > + --prefix $(TARGET_DIR)/usr > +endef > + > $(eval $(cmake-package)) The patch works correctly, so with commit log improve and the local patch with Upstream status pointed: Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Thanks for contributing! Best regards -- Giulio Benetti CEO/CTO@Benetti Engineering sas _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] package/qt5/qt5webkit: fix generated artifacts 2022-09-29 10:43 ` Giulio Benetti @ 2022-09-29 18:04 ` Thomas Ballasi 0 siblings, 0 replies; 8+ messages in thread From: Thomas Ballasi @ 2022-09-29 18:04 UTC (permalink / raw) To: Giulio Benetti, buildroot; +Cc: Peter Seiderer, Julien Corjon Hello Giulio, On Thu, 29 Sep 2022 12:43:22 +0200 Giulio Benetti <giulio.benetti@benettiengineering.com> wrote: > > Generated artifacts of the installation process were wrongly > > located, causing packages using qt5webkit (qt-webkit-kiosk and > > python-pyqt5) to fail at build time. The changes aims at fixing > > this issue. > > "The changes aims at fixing this issue." should be: > "Let's add a patch that:" This isn't necessarily true. While the patch answers points 1 and 2, the third one isn't really affected by it. I will try to rephrase the message for more clarification as the way I phrased it is ambiguous, thanks. > What is the upstream status of this patch? Can you point here the URL > of the pending patch? This patch isn't pending for merge in the qt5webkit repository for the reason that it may break other projects. At first, I made this patch to counter the use of CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT, which CMake's documentation seems to imply that it cannot be set by the user but is set automatically by CMake, which leads to the unwanted behavior. The patch makes it as if it was ON specifically for buildroot. I reckon that it may be bad practice to create such patches, so I just checked whether or not this variable can be set via CONF_OPTS and it seems it can, leading to the same working behavior (it also doesn't seem to be set in CMakeCache by CMake if not manually added). I also made sure setting this variable doesn't have any potential side effects as it is only used once in the case inside the patch. Therefore, it seems to be a better fit to set INITIALIZED_TO_DEFAULT's value in CONF_OPTS rather than bypassing its usage inside a patch. This has been replaced. > > More info @ https://bugs.buildroot.org/show_bug.cgi?id=14606 > > Here ^^^ it should be: > Fixes: > https://bugs.buildroot.org/show_bug.cgi?id=14606 Done! > Also here please add: > '[Upstream status: URL of this pending patch] Patch is replaced, ignoring. > The patch works correctly, so with commit log improve and the local > patch with Upstream status pointed: > Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com> > > Thanks for contributing! > > Best regards Thanks a lot for the constructive review! I will send a v2 asap. Kind regards, Thomas Ballasi _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2] package/qt5/qt5webkit: fix generated artifacts 2022-09-22 21:45 [Buildroot] [PATCH] package/qt5/qt5webkit: fix generated artifacts Thomas Ballasi 2022-09-29 10:43 ` Giulio Benetti @ 2022-09-29 18:13 ` Thomas Ballasi 2022-09-29 22:02 ` Giulio Benetti ` (3 more replies) 1 sibling, 4 replies; 8+ messages in thread From: Thomas Ballasi @ 2022-09-29 18:13 UTC (permalink / raw) To: buildroot; +Cc: Peter Seiderer, Thomas Ballasi, Julien Corjon Generated artifacts of the installation process were wrongly located, causing packages using qt5webkit (qt-webkit-kiosk and python-pyqt5) to fail at build time. Firstly, *.h files are wrongly located a directory below where supposed (inside qt5/ directory). This is caused by using DATADIR which assumed include files were to be located in sysroot/usr/include/. Disabling this variable by removing it from build options leads to a correct behavior. Secondly, in order to locate *.pri artifacts correctly, we set the conf option CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT on, which in turn sets the variable KDE_INSTALL_USE_QT_SYS_PATHS on, for the following reasons: 1. *.pri files are wrongly located in the host's and target's sysroot directores while buildroot implements its own mkspecs directory. By setting KDE_INSTALL_USE_QT_SYS_PATHS on, mkspecs modules are now being installed in host's data dir (ECM_MKSPECS_INSTALL_DIR is set accordingly @ line 102 in Source/cmake/ECMGeneratePriFile.cmake). This also required to prevent using the CMake package's default DATADIR variable, as done previously, as it enforced to install artifacts under the sysroot directory. 2. *.pri files' content have hardcoded include and library paths. This has been corrected by setting on KDE_INSTALL_USE_QT_SYS_PATHS as their content is written according to this value (see line 514 and 739 in file Source/WebKit/PlatformQt.cmake). Regression happened when qt5webkit started using cmake-package at commit df0b0fe6919c0d0f3750f439a3cfa765232bd569. Fixes: https://bugs.buildroot.org/show_bug.cgi?id=14606 Signed-off-by: Thomas Ballasi <thomas.ballasi@savoirfairelinux.com> --- package/qt5/qt5webkit/qt5webkit.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk index 6912359674..8310ef20c8 100644 --- a/package/qt5/qt5webkit/qt5webkit.mk +++ b/package/qt5/qt5webkit/qt5webkit.mk @@ -51,10 +51,18 @@ QT5WEBKIT_CONF_OPTS += -DENABLE_SAMPLING_PROFILER=OFF endif QT5WEBKIT_CONF_OPTS += \ + -DCMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT=ON \ -DENABLE_TOOLS=OFF \ -DPORT=Qt \ -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3 \ -DSHARED_CORE=ON \ -DUSE_LIBHYPHEN=OFF +QT5WEBKIT_INSTALL_STAGING_OPTS = install/fast + +define QT5WEBKIT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(BR2_CMAKE) --install $(QT5WEBKIT_BUILDDIR) \ + --prefix $(TARGET_DIR)/usr +endef + $(eval $(cmake-package)) -- 2.25.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH v2] package/qt5/qt5webkit: fix generated artifacts 2022-09-29 18:13 ` [Buildroot] [PATCH v2] " Thomas Ballasi @ 2022-09-29 22:02 ` Giulio Benetti 2023-08-11 7:23 ` Thomas Petazzoni via buildroot ` (2 subsequent siblings) 3 siblings, 0 replies; 8+ messages in thread From: Giulio Benetti @ 2022-09-29 22:02 UTC (permalink / raw) To: Thomas Ballasi, buildroot; +Cc: Peter Seiderer, Julien Corjon Hi Thomas, On 29/09/22 20:13, Thomas Ballasi wrote: > Generated artifacts of the installation process were wrongly located, > causing packages using qt5webkit (qt-webkit-kiosk and python-pyqt5) to > fail at build time. > > Firstly, *.h files are wrongly located a directory below where supposed > (inside qt5/ directory). This is caused by using DATADIR which assumed > include files were to be located in sysroot/usr/include/. Disabling this > variable by removing it from build options leads to a correct behavior. > > Secondly, in order to locate *.pri artifacts correctly, we set the conf > option CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT on, which in turn > sets the variable KDE_INSTALL_USE_QT_SYS_PATHS on, for the following > reasons: > > 1. *.pri files are wrongly located in the host's and target's sysroot > directores while buildroot implements its own mkspecs directory. > By setting KDE_INSTALL_USE_QT_SYS_PATHS on, mkspecs modules are now > being installed in host's data dir (ECM_MKSPECS_INSTALL_DIR is set > accordingly @ line 102 in Source/cmake/ECMGeneratePriFile.cmake). > This also required to prevent using the CMake package's default > DATADIR variable, as done previously, as it enforced to install > artifacts under the sysroot directory. > > 2. *.pri files' content have hardcoded include and library paths. This > has been corrected by setting on KDE_INSTALL_USE_QT_SYS_PATHS as > their content is written according to this value (see line 514 and > 739 in file Source/WebKit/PlatformQt.cmake). > > Regression happened when qt5webkit started using cmake-package at commit > df0b0fe6919c0d0f3750f439a3cfa765232bd569. > > Fixes: > https://bugs.buildroot.org/show_bug.cgi?id=14606 > > Signed-off-by: Thomas Ballasi <thomas.ballasi@savoirfairelinux.com> > --- > package/qt5/qt5webkit/qt5webkit.mk | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk > index 6912359674..8310ef20c8 100644 > --- a/package/qt5/qt5webkit/qt5webkit.mk > +++ b/package/qt5/qt5webkit/qt5webkit.mk > @@ -51,10 +51,18 @@ QT5WEBKIT_CONF_OPTS += -DENABLE_SAMPLING_PROFILER=OFF > endif > > QT5WEBKIT_CONF_OPTS += \ > + -DCMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT=ON \ > -DENABLE_TOOLS=OFF \ > -DPORT=Qt \ > -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3 \ > -DSHARED_CORE=ON \ > -DUSE_LIBHYPHEN=OFF > > +QT5WEBKIT_INSTALL_STAGING_OPTS = install/fast > + > +define QT5WEBKIT_INSTALL_TARGET_CMDS > + $(TARGET_MAKE_ENV) $(BR2_CMAKE) --install $(QT5WEBKIT_BUILDDIR) \ > + --prefix $(TARGET_DIR)/usr > +endef > + > $(eval $(cmake-package)) Definitely a better solution, it builds fine here at me for both qt-webkit-kiosk and python-pyqt5 so: Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Thank you! Best regards -- Giulio Benetti CEO/CTO@Benetti Engineering sas _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH v2] package/qt5/qt5webkit: fix generated artifacts 2022-09-29 18:13 ` [Buildroot] [PATCH v2] " Thomas Ballasi 2022-09-29 22:02 ` Giulio Benetti @ 2023-08-11 7:23 ` Thomas Petazzoni via buildroot 2023-10-02 20:01 ` Yann E. MORIN 2025-12-28 19:52 ` Thomas Petazzoni via buildroot 3 siblings, 0 replies; 8+ messages in thread From: Thomas Petazzoni via buildroot @ 2023-08-11 7:23 UTC (permalink / raw) To: Thomas Ballasi; +Cc: Giulio Benetti, Peter Seiderer, Julien Corjon, buildroot Hello Thomas, As part of an effort to clear up our backlog, I stumbled across this patch of yours, which has never been applied. However, looking at the issue, I see that both qt-webkit-kiosk and python-pyqt5 were indeed failing to build until November/December 2022, being unable to find the "webkit" Qt module. But since then, we haven't had any further build failure for those two packages: http://autobuild.buildroot.net/?reason=qt-webkit-kiosk% http://autobuild.buildroot.net/?reason=python-pyqt5% I don't immediately see what has changed in qt5webkit that could have fixed the issue. Does this issue still exists in the current Buildroot master? Thanks for your feedback, Thomas On Thu, 29 Sep 2022 14:13:50 -0400 Thomas Ballasi <thomas.ballasi@savoirfairelinux.com> wrote: > Generated artifacts of the installation process were wrongly located, > causing packages using qt5webkit (qt-webkit-kiosk and python-pyqt5) to > fail at build time. > > Firstly, *.h files are wrongly located a directory below where supposed > (inside qt5/ directory). This is caused by using DATADIR which assumed > include files were to be located in sysroot/usr/include/. Disabling this > variable by removing it from build options leads to a correct behavior. > > Secondly, in order to locate *.pri artifacts correctly, we set the conf > option CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT on, which in turn > sets the variable KDE_INSTALL_USE_QT_SYS_PATHS on, for the following > reasons: > > 1. *.pri files are wrongly located in the host's and target's sysroot > directores while buildroot implements its own mkspecs directory. > By setting KDE_INSTALL_USE_QT_SYS_PATHS on, mkspecs modules are now > being installed in host's data dir (ECM_MKSPECS_INSTALL_DIR is set > accordingly @ line 102 in Source/cmake/ECMGeneratePriFile.cmake). > This also required to prevent using the CMake package's default > DATADIR variable, as done previously, as it enforced to install > artifacts under the sysroot directory. > > 2. *.pri files' content have hardcoded include and library paths. This > has been corrected by setting on KDE_INSTALL_USE_QT_SYS_PATHS as > their content is written according to this value (see line 514 and > 739 in file Source/WebKit/PlatformQt.cmake). > > Regression happened when qt5webkit started using cmake-package at commit > df0b0fe6919c0d0f3750f439a3cfa765232bd569. > > Fixes: > https://bugs.buildroot.org/show_bug.cgi?id=14606 > > Signed-off-by: Thomas Ballasi <thomas.ballasi@savoirfairelinux.com> > --- > package/qt5/qt5webkit/qt5webkit.mk | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk > index 6912359674..8310ef20c8 100644 > --- a/package/qt5/qt5webkit/qt5webkit.mk > +++ b/package/qt5/qt5webkit/qt5webkit.mk > @@ -51,10 +51,18 @@ QT5WEBKIT_CONF_OPTS += -DENABLE_SAMPLING_PROFILER=OFF > endif > > QT5WEBKIT_CONF_OPTS += \ > + -DCMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT=ON \ > -DENABLE_TOOLS=OFF \ > -DPORT=Qt \ > -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3 \ > -DSHARED_CORE=ON \ > -DUSE_LIBHYPHEN=OFF > > +QT5WEBKIT_INSTALL_STAGING_OPTS = install/fast > + > +define QT5WEBKIT_INSTALL_TARGET_CMDS > + $(TARGET_MAKE_ENV) $(BR2_CMAKE) --install $(QT5WEBKIT_BUILDDIR) \ > + --prefix $(TARGET_DIR)/usr > +endef > + > $(eval $(cmake-package)) -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH v2] package/qt5/qt5webkit: fix generated artifacts 2022-09-29 18:13 ` [Buildroot] [PATCH v2] " Thomas Ballasi 2022-09-29 22:02 ` Giulio Benetti 2023-08-11 7:23 ` Thomas Petazzoni via buildroot @ 2023-10-02 20:01 ` Yann E. MORIN 2025-12-28 19:52 ` Thomas Petazzoni via buildroot 3 siblings, 0 replies; 8+ messages in thread From: Yann E. MORIN @ 2023-10-02 20:01 UTC (permalink / raw) To: Thomas Ballasi; +Cc: Peter Seiderer, Julien Corjon, buildroot Thomas, All, Sorry for the awfully long delay in looking at this patch; it has all the words that make it scary to review: qt5. cmake. webkit... On 2022-09-29 14:13 -0400, Thomas Ballasi spake thusly: > Generated artifacts of the installation process were wrongly located, > causing packages using qt5webkit (qt-webkit-kiosk and python-pyqt5) to > fail at build time. It would have been good to provide an example of such a failure, and they are pretty rare: http://autobuild.buildroot.org/?reason=qt-webkit-kiosk% The last one is from 2023-09-04, pretty recent, but the one before that was in 2022-12-14, but it was more common before that (a few a month on average). We usually add a reference to such a build failure directly in the commit log: http://autobuild.buildroot.org/results/91a/91a2d87eb42bf62f8d4f2b24788deef6c5e866f6/ > Firstly, *.h files are wrongly located a directory below where supposed > (inside qt5/ directory). This is caused by using DATADIR which assumed > include files were to be located in sysroot/usr/include/. Disabling this > variable by removing it from build options leads to a correct behavior. I don't see where/how you are disabling the use of DATADIR. > Secondly, in order to locate *.pri artifacts correctly, we set the conf > option CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT on, From the cmake documentation, it looks like that variable i set by cmake, and is not to be set manually like you do: https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT.html qt5webkit looks for the value of CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT to set CMAKE_INSTALL_PREFIX: qt5webkit-5.212.0-alpha4/Source/cmake/OptionsQt.cmake 1004 query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX) 1005 if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 1006 set(CMAKE_INSTALL_PREFIX "${qt_install_prefix_dir}" CACHE PATH "Install path prefix, prepended onto install› 1007 endif () And this looks to me very close to what Looking a bit around, I only noticed jpeg-turbo doing something similar, but I don't understand why it looks if the path s set to its efault value to just then set it to its default value... I think the proper solution in pur case would be to drop that conditional block... > which in turn > sets the variable KDE_INSTALL_USE_QT_SYS_PATHS on, for the following > reasons: > > 1. *.pri files are wrongly located in the host's and target's sysroot > directores while buildroot implements its own mkspecs directory. > By setting KDE_INSTALL_USE_QT_SYS_PATHS on, mkspecs modules are now > being installed in host's data dir (ECM_MKSPECS_INSTALL_DIR is set > accordingly @ line 102 in Source/cmake/ECMGeneratePriFile.cmake). > This also required to prevent using the CMake package's default > DATADIR variable, as done previously, as it enforced to install > artifacts under the sysroot directory. > > 2. *.pri files' content have hardcoded include and library paths. This > has been corrected by setting on KDE_INSTALL_USE_QT_SYS_PATHS as > their content is written according to this value (see line 514 and > 739 in file Source/WebKit/PlatformQt.cmake). I think both issues should be fixed by removing that conditional block... [--SNIP--] > diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk > index 6912359674..8310ef20c8 100644 > --- a/package/qt5/qt5webkit/qt5webkit.mk > +++ b/package/qt5/qt5webkit/qt5webkit.mk > @@ -51,10 +51,18 @@ QT5WEBKIT_CONF_OPTS += -DENABLE_SAMPLING_PROFILER=OFF > endif > > QT5WEBKIT_CONF_OPTS += \ > + -DCMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT=ON \ > -DENABLE_TOOLS=OFF \ > -DPORT=Qt \ > -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3 \ > -DSHARED_CORE=ON \ > -DUSE_LIBHYPHEN=OFF > > +QT5WEBKIT_INSTALL_STAGING_OPTS = install/fast The default _INSTALL_STAGING_OPTS contains DESTDIR and isntall/fast: https://gitlab.com/buildroot.org/buildroot/-/blob/68b68518a8cc372cd6bfb34414a91311e7266044/package/pkg-cmake.mk#L56 So what you're doing is to rem ove setting DESTDIR, which feels horribly wrong. > +define QT5WEBKIT_INSTALL_TARGET_CMDS > + $(TARGET_MAKE_ENV) $(BR2_CMAKE) --install $(QT5WEBKIT_BUILDDIR) \ > + --prefix $(TARGET_DIR)/usr Ditto, not using DESTDIR as the install step for target looks highly suspicious. Note that the current state of affairs with cmake has slightly evolved since you posted your patch. as we recently merged support for using ninja as the backend (it is opt-in to that backend, the default is still Makefiles), and we may have a bit of a fallout. Still, I was able to reproduce the issue... So, I started a build (wee, 3 hours!) that have removed the conditional block in qt5webkit, let's see what that does... Regards, Yann E. MORIN. > +endef > + > $(eval $(cmake-package)) -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH v2] package/qt5/qt5webkit: fix generated artifacts 2022-09-29 18:13 ` [Buildroot] [PATCH v2] " Thomas Ballasi ` (2 preceding siblings ...) 2023-10-02 20:01 ` Yann E. MORIN @ 2025-12-28 19:52 ` Thomas Petazzoni via buildroot 3 siblings, 0 replies; 8+ messages in thread From: Thomas Petazzoni via buildroot @ 2025-12-28 19:52 UTC (permalink / raw) To: Thomas Ballasi; +Cc: buildroot, Peter Seiderer, Julien Corjon Hello Thomas, 3 years later, getting back to you. On Thu, 29 Sep 2022 14:13:50 -0400 Thomas Ballasi <thomas.ballasi@savoirfairelinux.com> wrote: > Generated artifacts of the installation process were wrongly located, > causing packages using qt5webkit (qt-webkit-kiosk and python-pyqt5) to > fail at build time. Unfortunately, your patch doesn't seem to work, or at least not anymore: +QT5WEBKIT_INSTALL_STAGING_OPTS = install/fast doesn't work anymore as we're now using "cmake --install" instead of "make install/fast". So I had to drop this line. But then, the build fails during staging installation with: qt5webkit: installs files in /home/thomas/buildroot/br/output-all/host/aarch64-buildroot-linux-gnu/sysroot//home/thomas/buildroot/br/output-all But I do agree that the build failure still exists, I was able to reproduce it. Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-12-28 19:52 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-09-22 21:45 [Buildroot] [PATCH] package/qt5/qt5webkit: fix generated artifacts Thomas Ballasi 2022-09-29 10:43 ` Giulio Benetti 2022-09-29 18:04 ` Thomas Ballasi 2022-09-29 18:13 ` [Buildroot] [PATCH v2] " Thomas Ballasi 2022-09-29 22:02 ` Giulio Benetti 2023-08-11 7:23 ` Thomas Petazzoni via buildroot 2023-10-02 20:01 ` Yann E. MORIN 2025-12-28 19:52 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox