Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: Florent AUMAITRE <florent.aumaitre@medianesysteme.com>
Cc: Julien Corjon <corjon.j@ecagroup.com>,
	Naumann Andreas <ANaumann@ultratronik.de>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/qt5: fix parallel build qmake package (qt5) doesn't build when using parallel build.
Date: Wed, 15 Dec 2021 23:28:39 +0100	[thread overview]
Message-ID: <20211215232839.22ae07a9@gmx.net> (raw)
In-Reply-To: <20211214075133.4482-1-florent.aumaitre@medianesysteme.com>

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

  reply	other threads:[~2021-12-15 22:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211215232839.22ae07a9@gmx.net \
    --to=ps.report@gmx.net \
    --cc=ANaumann@ultratronik.de \
    --cc=buildroot@buildroot.org \
    --cc=corjon.j@ecagroup.com \
    --cc=florent.aumaitre@medianesysteme.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox