* [Buildroot] [PATCH 1/1] package/qt5: fix parallel build qmake package (qt5) doesn't build when using parallel build.
@ 2021-12-14 7:51 Florent AUMAITRE
2021-12-15 22:28 ` Peter Seiderer
0 siblings, 1 reply; 6+ messages in thread
From: Florent AUMAITRE @ 2021-12-14 7:51 UTC (permalink / raw)
To: buildroot
Cc: Peter Seiderer, Julien Corjon, Naumann Andreas, Florent AUMAITRE
Signed-off-by: Florent AUMAITRE <florent.aumaitre@medianesysteme.com>
---
package/pkg-qmake.mk | 22 +++++++++++++++++++++-
package/qt5/qt5.mk | 4 +++-
package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
3 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk
index deb033c1d6..55b3594f32 100644
--- a/package/pkg-qmake.mk
+++ b/package/pkg-qmake.mk
@@ -20,6 +20,23 @@
#
################################################################################
+# When per-package is enabled, and qmake project is configured to generate
+# pkg-config compatible package, absolute path are generated for "prefix" field
+# of .pc files. In order to keep per-package isolation with sysroot'in, it is
+# needed to remove those absolute path. Same apply for mkspecs files.
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define PKG_QMAKE_FIXUP_ABSOLUTE_PATH
+ $(Q)find $(STAGING_DIR)/ -name "*.pc" \
+ | xargs --no-run-if-empty \
+ $(SED) "s:$(STAGING_DIR)::g"
+
+ $(Q)find $(HOST_DIR)/ -name "*.pri" \
+ | xargs --no-run-if-empty \
+ $(SED) "s:$(STAGING_DIR):\$$\$$\[QT_SYSROOT\]:g"
+endef
+endif
+
+
#
# Hook to sync Qt headers
#
@@ -89,6 +106,8 @@ define $(2)_INSTALL_STAGING_CMDS
endef
endif
+$(2)_POST_INSTALL_STAGING_HOOKS += PKG_QMAKE_FIXUP_ABSOLUTE_PATH
+
#
# Target installation step. Only define it if not already defined by
# the package .mk file.
@@ -103,9 +122,10 @@ endif
# We subsequently rsync only the files from the temporary staging dir and that
# way exclude files for the build host from target.
#
+# Qt Package (declarative at least) does not install in parallel due to improper make rules
ifndef $(2)_INSTALL_TARGET_CMDS
define $(2)_INSTALL_TARGET_CMDS
- $$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_BUILDDIR) INSTALL_ROOT=$$($(2)_BUILDDIR)tmp-target-install $$($(2)_INSTALL_TARGET_OPTS)
+ $$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE1) -C $$($(2)_BUILDDIR) INSTALL_ROOT=$$($(2)_BUILDDIR)tmp-target-install $$($(2)_INSTALL_TARGET_OPTS)
rsync -arv $$($(2)_BUILDDIR)tmp-target-install$$(STAGING_DIR)/ $$(TARGET_DIR)/
endef
endif
diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
index 3ffb7b0063..eced7e2564 100644
--- a/package/qt5/qt5.mk
+++ b/package/qt5/qt5.mk
@@ -27,4 +27,6 @@ endef
endif
# Variable for other Qt applications to use
-QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
+QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \
+ PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
+ PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index ba2971dc08..3750d4547e 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -334,4 +334,17 @@ endef
QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
+# CMake config files generated by Qt5 might break per-package isolation because
+# of absolute path generated.
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define QT5BASE_CMAKECONFIG_FIXUP
+ $(Q)find $(STAGING_DIR)/ -name "*.cmake" \
+ | xargs --no-run-if-empty \
+ $(SED) "s:$(STAGING_DIR)::g"
+endef
+endif
+
+QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_CMAKECONFIG_FIXUP
+
+
$(eval $(qmake-package))
--
2.17.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/qt5: fix parallel build qmake package (qt5) doesn't build when using parallel build.
2021-12-14 7:51 [Buildroot] [PATCH 1/1] package/qt5: fix parallel build qmake package (qt5) doesn't build when using parallel build Florent AUMAITRE
@ 2021-12-15 22:28 ` Peter Seiderer
2021-12-16 8:51 ` Andreas Naumann
2021-12-16 9:25 ` Florent AUMAITRE
0 siblings, 2 replies; 6+ messages in thread
From: Peter Seiderer @ 2021-12-15 22:28 UTC (permalink / raw)
To: Florent AUMAITRE; +Cc: Julien Corjon, Naumann Andreas, buildroot
Hello Florent,
On Tue, 14 Dec 2021 08:51:33 +0100, Florent AUMAITRE <florent.aumaitre@medianesysteme.com> wrote:
> Signed-off-by: Florent AUMAITRE <florent.aumaitre@medianesysteme.com>
> ---
> package/pkg-qmake.mk | 22 +++++++++++++++++++++-
> package/qt5/qt5.mk | 4 +++-
> package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
> 3 files changed, 37 insertions(+), 2 deletions(-)
>
> diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk
> index deb033c1d6..55b3594f32 100644
> --- a/package/pkg-qmake.mk
> +++ b/package/pkg-qmake.mk
> @@ -20,6 +20,23 @@
> #
> ################################################################################
>
> +# When per-package is enabled, and qmake project is configured to generate
> +# pkg-config compatible package, absolute path are generated for "prefix" field
> +# of .pc files. In order to keep per-package isolation with sysroot'in, it is
> +# needed to remove those absolute path. Same apply for mkspecs files.
> +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> +define PKG_QMAKE_FIXUP_ABSOLUTE_PATH
> + $(Q)find $(STAGING_DIR)/ -name "*.pc" \
> + | xargs --no-run-if-empty \
> + $(SED) "s:$(STAGING_DIR)::g"
> +
> + $(Q)find $(HOST_DIR)/ -name "*.pri" \
> + | xargs --no-run-if-empty \
> + $(SED) "s:$(STAGING_DIR):\$$\$$\[QT_SYSROOT\]:g"
> +endef
> +endif
> +
> +
> #
> # Hook to sync Qt headers
> #
> @@ -89,6 +106,8 @@ define $(2)_INSTALL_STAGING_CMDS
> endef
> endif
>
> +$(2)_POST_INSTALL_STAGING_HOOKS += PKG_QMAKE_FIXUP_ABSOLUTE_PATH
> +
> #
> # Target installation step. Only define it if not already defined by
> # the package .mk file.
> @@ -103,9 +122,10 @@ endif
> # We subsequently rsync only the files from the temporary staging dir and that
> # way exclude files for the build host from target.
> #
> +# Qt Package (declarative at least) does not install in parallel due to improper make rules
> ifndef $(2)_INSTALL_TARGET_CMDS
> define $(2)_INSTALL_TARGET_CMDS
> - $$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_BUILDDIR) INSTALL_ROOT=$$($(2)_BUILDDIR)tmp-target-install $$($(2)_INSTALL_TARGET_OPTS)
> + $$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE1) -C $$($(2)_BUILDDIR) INSTALL_ROOT=$$($(2)_BUILDDIR)tmp-target-install $$($(2)_INSTALL_TARGET_OPTS)
Which failure? Does it happen with per-package enabled or without (would
like to avoid the forced MAKE1 for all qt packages install) too? In case it
happens with per-package disabled it should go to an extra patch...
One qt5declarative failure for parallel install was fixed by 'package/qt5/qt5declarative:
fix parallel install' ([1]) some time back...
Regards,
Peter
[1] https://git.buildroot.net/buildroot/commit/?id=a96277a93d36a1828de87b011022ae389a549cbd
> rsync -arv $$($(2)_BUILDDIR)tmp-target-install$$(STAGING_DIR)/ $$(TARGET_DIR)/
> endef
> endif
> diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
> index 3ffb7b0063..eced7e2564 100644
> --- a/package/qt5/qt5.mk
> +++ b/package/qt5/qt5.mk
> @@ -27,4 +27,6 @@ endef
> endif
>
> # Variable for other Qt applications to use
> -QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
> +QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \
> + PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
> + PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
> diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
> index ba2971dc08..3750d4547e 100644
> --- a/package/qt5/qt5base/qt5base.mk
> +++ b/package/qt5/qt5base/qt5base.mk
> @@ -334,4 +334,17 @@ endef
>
> QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
>
> +# CMake config files generated by Qt5 might break per-package isolation because
> +# of absolute path generated.
> +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> +define QT5BASE_CMAKECONFIG_FIXUP
> + $(Q)find $(STAGING_DIR)/ -name "*.cmake" \
> + | xargs --no-run-if-empty \
> + $(SED) "s:$(STAGING_DIR)::g"
> +endef
> +endif
> +
> +QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_CMAKECONFIG_FIXUP
> +
> +
> $(eval $(qmake-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/qt5: fix parallel build qmake package (qt5) doesn't build when using parallel build.
2021-12-15 22:28 ` Peter Seiderer
@ 2021-12-16 8:51 ` Andreas Naumann
2021-12-16 9:25 ` Florent AUMAITRE
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Naumann @ 2021-12-16 8:51 UTC (permalink / raw)
To: Peter Seiderer, Florent AUMAITRE; +Cc: Naumann Andreas, buildroot
Hi,
On 15.12.21 23:28, Peter Seiderer wrote:
> Hello Florent,
>
> On Tue, 14 Dec 2021 08:51:33 +0100, Florent AUMAITRE <florent.aumaitre@medianesysteme.com> wrote:
>
>> Signed-off-by: Florent AUMAITRE <florent.aumaitre@medianesysteme.com>
>> ---
>> package/pkg-qmake.mk | 22 +++++++++++++++++++++-
>> package/qt5/qt5.mk | 4 +++-
>> package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
>> 3 files changed, 37 insertions(+), 2 deletions(-)
>>
>> diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk
>> index deb033c1d6..55b3594f32 100644
>> --- a/package/pkg-qmake.mk
>> +++ b/package/pkg-qmake.mk
>> @@ -20,6 +20,23 @@
>> #
>> ################################################################################
>>
>> +# When per-package is enabled, and qmake project is configured to generate
>> +# pkg-config compatible package, absolute path are generated for "prefix" field
>> +# of .pc files. In order to keep per-package isolation with sysroot'in, it is
>> +# needed to remove those absolute path. Same apply for mkspecs files.
>> +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
>> +define PKG_QMAKE_FIXUP_ABSOLUTE_PATH
>> + $(Q)find $(STAGING_DIR)/ -name "*.pc" \
>> + | xargs --no-run-if-empty \
>> + $(SED) "s:$(STAGING_DIR)::g"
>> +
>> + $(Q)find $(HOST_DIR)/ -name "*.pri" \
>> + | xargs --no-run-if-empty \
>> + $(SED) "s:$(STAGING_DIR):\$$\$$\[QT_SYSROOT\]:g"
>> +endef
>> +endif
>> +
>> +
>> #
>> # Hook to sync Qt headers
>> #
>> @@ -89,6 +106,8 @@ define $(2)_INSTALL_STAGING_CMDS
>> endef
>> endif
>>
>> +$(2)_POST_INSTALL_STAGING_HOOKS += PKG_QMAKE_FIXUP_ABSOLUTE_PATH
>> +
>> #
>> # Target installation step. Only define it if not already defined by
>> # the package .mk file.
>> @@ -103,9 +122,10 @@ endif
>> # We subsequently rsync only the files from the temporary staging dir and that
>> # way exclude files for the build host from target.
>> #
>> +# Qt Package (declarative at least) does not install in parallel due to improper make rules
>> ifndef $(2)_INSTALL_TARGET_CMDS
>> define $(2)_INSTALL_TARGET_CMDS
>> - $$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_BUILDDIR) INSTALL_ROOT=$$($(2)_BUILDDIR)tmp-target-install $$($(2)_INSTALL_TARGET_OPTS)
>> + $$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE1) -C $$($(2)_BUILDDIR) INSTALL_ROOT=$$($(2)_BUILDDIR)tmp-target-install $$($(2)_INSTALL_TARGET_OPTS)
>
> Which failure? Does it happen with per-package enabled or without (would
> like to avoid the forced MAKE1 for all qt packages install) too? In case it
> happens with per-package disabled it should go to an extra patch...
>
> One qt5declarative failure for parallel install was fixed by 'package/qt5/qt5declarative:
> fix parallel install' ([1]) some time back...
>
> Regards,
> Peter
>
> [1] https://git.buildroot.net/buildroot/commit/?id=a96277a93d36a1828de87b011022ae389a549cbd
I have the same question, which exact failure?
From my experience, since "qt5: Fix sporadic build failure during
top-level parallel build" [2], I have not observed any build failures.
Not saying that the assembled .pc or .pri files in the resulting SDK all
have correct pathes. But wouldnt this be a more general problem for all
pkg-config packages not just qt?
[2]
https://git.buildroot.net/buildroot/commit/?id=8132216e0ecb1cd115ec9d1a211b967e5bda3054
regards,
Andreas
>
>> rsync -arv $$($(2)_BUILDDIR)tmp-target-install$$(STAGING_DIR)/ $$(TARGET_DIR)/
>> endef
>> endif
>> diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
>> index 3ffb7b0063..eced7e2564 100644
>> --- a/package/qt5/qt5.mk
>> +++ b/package/qt5/qt5.mk
>> @@ -27,4 +27,6 @@ endef
>> endif
>>
>> # Variable for other Qt applications to use
>> -QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
>> +QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \
>> + PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
>> + PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
>> diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
>> index ba2971dc08..3750d4547e 100644
>> --- a/package/qt5/qt5base/qt5base.mk
>> +++ b/package/qt5/qt5base/qt5base.mk
>> @@ -334,4 +334,17 @@ endef
>>
>> QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
>>
>> +# CMake config files generated by Qt5 might break per-package isolation because
>> +# of absolute path generated.
>> +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
>> +define QT5BASE_CMAKECONFIG_FIXUP
>> + $(Q)find $(STAGING_DIR)/ -name "*.cmake" \
>> + | xargs --no-run-if-empty \
>> + $(SED) "s:$(STAGING_DIR)::g"
>> +endef
>> +endif
>> +
>> +QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_CMAKECONFIG_FIXUP
>> +
>> +
>> $(eval $(qmake-package))
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/qt5: fix parallel build qmake package (qt5) doesn't build when using parallel build.
2021-12-15 22:28 ` Peter Seiderer
2021-12-16 8:51 ` Andreas Naumann
@ 2021-12-16 9:25 ` Florent AUMAITRE
2021-12-26 22:50 ` Thomas Petazzoni
1 sibling, 1 reply; 6+ messages in thread
From: Florent AUMAITRE @ 2021-12-16 9:25 UTC (permalink / raw)
To: Peter Seiderer; +Cc: Julien Corjon, Naumann Andreas, buildroot
Hello Peter
> -----Message d'origine-----
> De : Peter Seiderer <ps.report@gmx.net>
> Envoyé : mercredi 15 décembre 2021 23:29
> À : Florent AUMAITRE <florent.aumaitre@medianesysteme.com>
> Cc : buildroot@buildroot.org; Naumann Andreas <ANaumann@ultratronik.de>;
> Julien Corjon <corjon.j@ecagroup.com>
> Objet : Re: [PATCH 1/1] package/qt5: fix parallel build qmake package (qt5)
> doesn't build when using parallel build.
>
> Hello Florent,
>
> On Tue, 14 Dec 2021 08:51:33 +0100, Florent AUMAITRE
> <florent.aumaitre@medianesysteme.com> wrote:
>
> > Signed-off-by: Florent AUMAITRE <florent.aumaitre@medianesysteme.com>
> > ---
> > package/pkg-qmake.mk | 22 +++++++++++++++++++++-
> > package/qt5/qt5.mk | 4 +++-
> > package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
> > 3 files changed, 37 insertions(+), 2 deletions(-)
> >
> > diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk index
> > deb033c1d6..55b3594f32 100644
> > --- a/package/pkg-qmake.mk
> > +++ b/package/pkg-qmake.mk
> > @@ -20,6 +20,23 @@
> > #
> >
> >
> #################################################################
> #####
> > ##########
> >
> > +# When per-package is enabled, and qmake project is configured to
> > +generate # pkg-config compatible package, absolute path are generated
> > +for "prefix" field # of .pc files. In order to keep per-package
> > +isolation with sysroot'in, it is # needed to remove those absolute path. Same
> apply for mkspecs files.
> > +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> > +define PKG_QMAKE_FIXUP_ABSOLUTE_PATH
> > + $(Q)find $(STAGING_DIR)/ -name "*.pc" \
> > + | xargs --no-run-if-empty \
> > + $(SED) "s:$(STAGING_DIR)::g"
> > +
> > + $(Q)find $(HOST_DIR)/ -name "*.pri" \
> > + | xargs --no-run-if-empty \
> > + $(SED) "s:$(STAGING_DIR):\$$\$$\[QT_SYSROOT\]:g"
> > +endef
> > +endif
> > +
> > +
> > #
> > # Hook to sync Qt headers
> > #
> > @@ -89,6 +106,8 @@ define $(2)_INSTALL_STAGING_CMDS endef endif
> >
> > +$(2)_POST_INSTALL_STAGING_HOOKS +=
> PKG_QMAKE_FIXUP_ABSOLUTE_PATH
> > +
> > #
> > # Target installation step. Only define it if not already defined by
> > # the package .mk file.
> > @@ -103,9 +122,10 @@ endif
> > # We subsequently rsync only the files from the temporary staging dir
> > and that # way exclude files for the build host from target.
> > #
> > +# Qt Package (declarative at least) does not install in parallel due
> > +to improper make rules
> > ifndef $(2)_INSTALL_TARGET_CMDS
> > define $(2)_INSTALL_TARGET_CMDS
> > - $$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE) -C
> $$($(2)_BUILDDIR) INSTALL_ROOT=$$($(2)_BUILDDIR)tmp-target-install
> $$($(2)_INSTALL_TARGET_OPTS)
> > + $$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE1) -C
> $$($(2)_BUILDDIR)
> > +INSTALL_ROOT=$$($(2)_BUILDDIR)tmp-target-install
> > +$$($(2)_INSTALL_TARGET_OPTS)
>
> Which failure? Does it happen with per-package enabled or without (would like
> to avoid the forced MAKE1 for all qt packages install) too? In case it happens
> with per-package disabled it should go to an extra patch...
I observe a race condition with some install target
2021-11-04T12:43:36 Makefile:886: recipe for target 'install_do_install_qmltypes' failed
2021-11-04T12:43:36 Makefile:400: recipe for target 'sub-wavefrontmesh-install_subtargets' failed
2021-11-04T12:43:36 make[4]: *** [sub-wavefrontmesh-install_subtargets] Error 2
2021-11-04T12:43:36 make[4]: *** Waiting for unfinished jobs...
Qt5declarative generated makefile (qt5declarative-5.15.2/src/imports/wavefrontmesh/Makefile) install twice /usr/qml/Qt/labs/wavefrontmesh/plugins.qmltypes in target install_qmlfiles and install_do_install_qmltypes.
Regards
Florent
> One qt5declarative failure for parallel install was fixed by
> 'package/qt5/qt5declarative:
> fix parallel install' ([1]) some time back...
>
> Regards,
> Peter
>
> [1]
> https://git.buildroot.net/buildroot/commit/?id=a96277a93d36a1828de87b0110
> 22ae389a549cbd
>
> > rsync -arv $$($(2)_BUILDDIR)tmp-target-install$$(STAGING_DIR)/
> > $$(TARGET_DIR)/ endef endif diff --git a/package/qt5/qt5.mk
> > b/package/qt5/qt5.mk index 3ffb7b0063..eced7e2564 100644
> > --- a/package/qt5/qt5.mk
> > +++ b/package/qt5/qt5.mk
> > @@ -27,4 +27,6 @@ endef
> > endif
> >
> > # Variable for other Qt applications to use -QT5_QMAKE =
> > $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
> > +QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \
> > + PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
> > +
> >
> +PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr
> > +/share/pkgconfig
> > diff --git a/package/qt5/qt5base/qt5base.mk
> > b/package/qt5/qt5base/qt5base.mk index ba2971dc08..3750d4547e 100644
> > --- a/package/qt5/qt5base/qt5base.mk
> > +++ b/package/qt5/qt5base/qt5base.mk
> > @@ -334,4 +334,17 @@ endef
> >
> > QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
> >
> > +# CMake config files generated by Qt5 might break per-package
> > +isolation because # of absolute path generated.
> > +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> > +define QT5BASE_CMAKECONFIG_FIXUP
> > + $(Q)find $(STAGING_DIR)/ -name "*.cmake" \
> > + | xargs --no-run-if-empty \
> > + $(SED) "s:$(STAGING_DIR)::g"
> > +endef
> > +endif
> > +
> > +QT5BASE_POST_INSTALL_STAGING_HOOKS +=
> QT5BASE_CMAKECONFIG_FIXUP
> > +
> > +
> > $(eval $(qmake-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/qt5: fix parallel build qmake package (qt5) doesn't build when using parallel build.
2021-12-16 9:25 ` Florent AUMAITRE
@ 2021-12-26 22:50 ` Thomas Petazzoni
2022-01-03 16:36 ` Florent AUMAITRE
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2021-12-26 22:50 UTC (permalink / raw)
To: Florent AUMAITRE
Cc: Peter Seiderer, Julien Corjon, Naumann Andreas, buildroot
Hello Florent,
On Thu, 16 Dec 2021 09:25:19 +0000
Florent AUMAITRE <florent.aumaitre@medianesysteme.com> wrote:
> > Which failure? Does it happen with per-package enabled or without (would like
> > to avoid the forced MAKE1 for all qt packages install) too? In case it happens
> > with per-package disabled it should go to an extra patch...
>
> I observe a race condition with some install target
> 2021-11-04T12:43:36 Makefile:886: recipe for target 'install_do_install_qmltypes' failed
> 2021-11-04T12:43:36 Makefile:400: recipe for target 'sub-wavefrontmesh-install_subtargets' failed
> 2021-11-04T12:43:36 make[4]: *** [sub-wavefrontmesh-install_subtargets] Error 2
> 2021-11-04T12:43:36 make[4]: *** Waiting for unfinished jobs...
>
> Qt5declarative generated makefile (qt5declarative-5.15.2/src/imports/wavefrontmesh/Makefile) install twice /usr/qml/Qt/labs/wavefrontmesh/plugins.qmltypes in target install_qmlfiles and install_do_install_qmltypes.
Could you specify whether this happens with BR2_PER_PACKAGE_DIRECTORIES
enabled or disabled? Also, do you have an example Buildroot
configuration that exhibits this problem?
According to http://autobuild.buildroot.net/?reason=qt5declarative%
there are only 3 "recent" failures of qt5declarative-5.15.2 and they
are not what you're pointing.
We unfortunately can't "blindly" apply a workaround for a problem that
isn't "visible".
However, your commit seems to mix up the $(MAKE) -> $(MAKE1) change
with those PKG_QMAKE_FIXUP_ABSOLUTE_PATH and QT5BASE_CMAKECONFIG_FIXUP
macros which are not explained in the commit log. Could you give more
details?
Best regards,
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] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/qt5: fix parallel build qmake package (qt5) doesn't build when using parallel build.
2021-12-26 22:50 ` Thomas Petazzoni
@ 2022-01-03 16:36 ` Florent AUMAITRE
0 siblings, 0 replies; 6+ messages in thread
From: Florent AUMAITRE @ 2022-01-03 16:36 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Peter Seiderer, Julien Corjon, Naumann Andreas, buildroot
Hello Thomas,
> -----Message d'origine-----
> De : Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Envoyé : dimanche 26 décembre 2021 23:50
> À : Florent AUMAITRE <florent.aumaitre@medianesysteme.com>
> Cc : Peter Seiderer <ps.report@gmx.net>; Julien Corjon
> <corjon.j@ecagroup.com>; Naumann Andreas
> <ANaumann@ultratronik.de>; buildroot@buildroot.org
> Objet : Re: [Buildroot] [PATCH 1/1] package/qt5: fix parallel build qmake
> package (qt5) doesn't build when using parallel build.
>
> Hello Florent,
>
> On Thu, 16 Dec 2021 09:25:19 +0000
> Florent AUMAITRE <florent.aumaitre@medianesysteme.com> wrote:
>
> > > Which failure? Does it happen with per-package enabled or without
> > > (would like to avoid the forced MAKE1 for all qt packages install)
> > > too? In case it happens with per-package disabled it should go to an extra
> patch...
> >
> > I observe a race condition with some install target
> > 2021-11-04T12:43:36 Makefile:886: recipe for target
> > 'install_do_install_qmltypes' failed
> > 2021-11-04T12:43:36 Makefile:400: recipe for target
> > 'sub-wavefrontmesh-install_subtargets' failed
> > 2021-11-04T12:43:36 make[4]: ***
> > [sub-wavefrontmesh-install_subtargets] Error 2
> > 2021-11-04T12:43:36 make[4]: *** Waiting for unfinished jobs...
> >
> > Qt5declarative generated makefile (qt5declarative-
> 5.15.2/src/imports/wavefrontmesh/Makefile) install twice
> /usr/qml/Qt/labs/wavefrontmesh/plugins.qmltypes in target install_qmlfiles
> and install_do_install_qmltypes.
>
> Could you specify whether this happens with
> BR2_PER_PACKAGE_DIRECTORIES enabled or disabled? Also, do you have an
> example Buildroot configuration that exhibits this problem?
This appended with BR2_PER_PACKAGE_DIRECTORIES enabled.
This problem is random so I didn't have a configuration that exhibits the problem all times.
For info we build on a machine with 36 cores (Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz).
I think http://autobuild.buildroot.net/results/d0c/d0c43084edd4de1221d93dfdfa15dfdeae16ceeb/build-end.log is the same problem.
>
> According to http://autobuild.buildroot.net/?reason=qt5declarative%
> there are only 3 "recent" failures of qt5declarative-5.15.2 and they are not
> what you're pointing.
> We unfortunately can't "blindly" apply a workaround for a problem that isn't
> "visible".
>
> However, your commit seems to mix up the $(MAKE) -> $(MAKE1) change
> with those PKG_QMAKE_FIXUP_ABSOLUTE_PATH and
> QT5BASE_CMAKECONFIG_FIXUP macros which are not explained in the
> commit log. Could you give more details?
Some part of the patch is for issue with linker like in http://autobuild.buildroot.net/results/8eb/8ebf6f8024ba32883e5c34c1c1c69de77246a7c3/build-end.log
Sysroot path : --sysroot=/tmp/instance-0/output-1/per-package/qt5declarative/host/arm-buildroot-linux-gnueabihf/sysroot
And
Library search path : -L/tmp/instance-0/output-1/per-package/qt5base/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib
Are not with the same prefix path so linker didn't find system library.
So I add PKG_QMAKE_FIXUP_ABSOLUTE_PATH and QT5BASE_CMAKECONFIG_FIXUP to fix this.
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel
> engineering and training https://bootlin.com
Best Regards
Florent
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-03 16:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 7:51 [Buildroot] [PATCH 1/1] package/qt5: fix parallel build qmake package (qt5) doesn't build when using parallel build Florent AUMAITRE
2021-12-15 22:28 ` Peter Seiderer
2021-12-16 8:51 ` Andreas Naumann
2021-12-16 9:25 ` Florent AUMAITRE
2021-12-26 22:50 ` Thomas Petazzoni
2022-01-03 16:36 ` Florent AUMAITRE
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.