From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure
Date: Wed, 1 Jul 2020 23:15:13 +0200 [thread overview]
Message-ID: <20200701211513.GX20645@scaer> (raw)
In-Reply-To: <a339f273-33f3-f232-eac4-6e50427abf6d@cordier.org>
Louis-Paul, Andreas, All,
Thank you both for working on this difficult topic. :-)
(removing Julien C., as his email is hitting a closed door..)
On 2020-06-19 12:22 +0200, Louis-Paul CORDIER spake thusly:
> On 2/17/20 10:23 PM, Andreas Naumann wrote:
> >Per default qmake uses the pkg-config binary and search path detected by qt5base
> >and set in mkspecs/qconfig.pri. For per-package infra, this leads to packages
> >not contained in qt5base not being detected.
> >To overcome this, set the correct pathes in the global QMAKE variable.
> >
> >Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> >---
> > package/qt5/qt5.mk | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> >diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
> >index eb2a749678..c3b9f69c3f 100644
> >--- a/package/qt5/qt5.mk
> >+++ b/package/qt5/qt5.mk
> >@@ -33,4 +33,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
> >
> I attached 2 additional patches, that fix compile issue on x86 platform (see
> http://lists.busybox.net/pipermail/buildroot/2020-June/285123.html). I based
> my work on top of 2020.05 tag [...]
[--SNIP--]
> 1. The first one is fixing the absolute path added in .pri and .pc files
> when building qt5base. When using sysroot, thos abolute path are breaking
> the compilation because they are pointing to directories outside the
> sysroot.
As I read that description, I can see that some keywords are matching
with the original commit mesage.
Most notabley, the originalcommit states "mkspecs/qconfig.pri" while
your are talking about "absolute path added in .pri [..] files".
So, am I allowed to take the following shortcut :
the patch from Louis-Paul supersedes the one from Andreas, as it
fixes the issue at the root, rther than work around it
?
As for the .pc files, I think the fix should be generalised out of the
Qt world, maybe... Fopr example, we already fix the /la files in
package/pkg-generic at 324
So, as far as I can see (which can be quite short, in some cases), we
should introduce a similar generic .pc fixup.
Also, please see a little comment below...
> 2. The second one is fixing .cmake files that also contains absolute paths
> after qt5base installation
Ditto, maybe all .cmake files should be fixed, not just the ones by
Qt5, no?
> I'm now able to use full parallel build with per-package with Qt5.
This is really sounding good! :-)
Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see
an updated and consolidated series reposted to the list, that aggregates
both your developments.
Would you be willing to do that, please?
Regards,
Yann E. MORIN.
>
> Thank you for your hard work Andreas,
>
> BR,
> Louis-Paul CORDIER
> From bc08430ebb5d76bdd0b45b8339761c85c7a48800 Mon Sep 17 00:00:00 2001
> From: Louis-Paul Cordier <lpdev@cordier.org>
> Date: Fri, 19 Jun 2020 11:01:21 +0200
> Subject: [PATCH 1/2] core/pkg-infra: Fix pkg-config and .pri absolute path
>
> Signed-off-by: Louis-Paul Cordier <lpdev@cordier.org>
> ---
> package/pkg-qmake.mk | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk
> index 27727119d7..49fe185d4a 100644
> --- a/package/pkg-qmake.mk
> +++ b/package/pkg-qmake.mk
> @@ -20,6 +20,22 @@
> #
> ################################################################################
>
> +# 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
> +
> ################################################################################
> # inner-qmake-package -- defines how the configuration, compilation and
> # installation of a qmake package should be done, implements a few hooks
> @@ -66,6 +82,7 @@ define $(2)_BUILD_CMDS
> endef
> endif
>
> +
Spurious empty line.
> #
> # Staging installation step. Only define it if not already defined by
> # the package .mk file.
> @@ -76,6 +93,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.
> --
> 2.26.2
>
> From 517307628cd76079952e606061990c2fd8df0d84 Mon Sep 17 00:00:00 2001
> From: Louis-Paul Cordier <lpdev@cordier.org>
> Date: Fri, 19 Jun 2020 12:05:19 +0200
> Subject: [PATCH 2/2] package/qt5base: fix absolute path generated in .cmake
> config files
>
> Signed-off-by: Louis-Paul Cordier <lpdev@cordier.org>
> ---
> package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
> index ec56287ed0..3d30c41d0e 100644
> --- a/package/qt5/qt5base/qt5base.mk
> +++ b/package/qt5/qt5base/qt5base.mk
> @@ -310,4 +310,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.26.2
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2020-07-01 21:15 UTC|newest]
Thread overview: 98+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 01/28] package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen Andreas Naumann
2020-03-09 21:21 ` Thomas Petazzoni
2020-03-09 22:42 ` Peter Seiderer
2020-03-10 8:13 ` Thomas Petazzoni
2020-03-10 8:17 ` Peter Seiderer
2020-03-10 17:02 ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 02/28] core/pkg-infra: Add generic qmake package infrastructure Andreas Naumann
2020-03-09 22:10 ` Thomas Petazzoni
2020-03-10 17:10 ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 03/28] qt5: Convert straightforward packages to qmake infra Andreas Naumann
2020-03-09 22:12 ` Thomas Petazzoni
2020-03-10 18:09 ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 04/28] package/qt5base: Convert " Andreas Naumann
2020-03-09 22:29 ` Thomas Petazzoni
2020-03-10 18:20 ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 05/28] package/qwt: Partially convert " Andreas Naumann
2020-03-11 21:19 ` Thomas Petazzoni
2020-03-14 20:58 ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 06/28] package/qwt: Add missing qt5svg dependency Andreas Naumann
2020-02-17 21:56 ` Thomas Petazzoni
2020-02-18 9:43 ` Andreas Naumann
2020-02-18 14:58 ` Thomas Petazzoni
2020-02-19 19:16 ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 07/28] package/qt5tools: Partially convert to qmake infra Andreas Naumann
2020-03-11 21:22 ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 08/28] package/qt5virtualkeyboard: Convert " Andreas Naumann
2020-03-11 21:35 ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 09/28] package/quazip: " Andreas Naumann
2020-02-17 21:57 ` Thomas Petazzoni
2020-02-18 10:00 ` Andreas Naumann
2020-03-11 21:42 ` Thomas Petazzoni
2020-03-14 21:52 ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 10/28] package/qt5wayland: " Andreas Naumann
2020-03-11 21:48 ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 11/28] package/qt5webchannel: " Andreas Naumann
2020-03-11 21:49 ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 12/28] package/qt5webkit: " Andreas Naumann
2020-03-11 21:55 ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 13/28] package/qt5webkit-examples: " Andreas Naumann
2020-03-11 21:57 ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 14/28] package/qt5webengine: " Andreas Naumann
2020-03-11 22:01 ` Thomas Petazzoni
2020-03-16 21:15 ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 15/28] package/qt-webkit-kiosk: " Andreas Naumann
2020-03-11 22:04 ` Thomas Petazzoni
2020-03-16 21:53 ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 16/28] package/qt5cinex: " Andreas Naumann
2020-03-11 22:06 ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 17/28] core/pkg-infra: Fix package file statistics for parallel build Andreas Naumann
2020-03-11 22:07 ` Thomas Petazzoni
2020-03-16 21:54 ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make Andreas Naumann
2020-03-11 22:25 ` Thomas Petazzoni
2020-03-12 13:00 ` Arnout Vandecappelle
2020-03-12 13:22 ` Thomas Petazzoni
2020-03-16 22:15 ` Andreas Naumann
2020-03-17 6:08 ` Thomas Petazzoni
2020-03-17 19:02 ` Asaf Kahlon
2020-03-18 15:35 ` Andreas Naumann
2020-03-18 18:59 ` Asaf Kahlon
2020-03-18 21:03 ` Andreas Naumann
2020-03-19 11:40 ` Asaf Kahlon
2020-03-19 12:49 ` Thomas Petazzoni
2020-03-19 13:53 ` Asaf Kahlon
2020-03-19 14:00 ` Thomas Petazzoni
2020-03-22 20:46 ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 19/28] core/pkg-infra: Add per-package support in qmake infra Andreas Naumann
2020-04-10 20:25 ` Yann E. MORIN
2020-07-01 19:01 ` Yann E. MORIN
2020-07-20 6:14 ` Peter Korsgaard
2020-02-17 21:23 ` [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure Andreas Naumann
2020-06-19 10:22 ` Louis-Paul CORDIER
2020-07-01 21:15 ` Yann E. MORIN [this message]
2020-07-01 21:54 ` Yann E. MORIN
2020-07-02 17:38 ` Yann E. MORIN
2020-07-22 19:48 ` LP C
2020-07-22 20:26 ` Yann E. MORIN
2020-07-23 10:29 ` Andreas Naumann
2020-07-23 20:17 ` Yann E. MORIN
2020-07-24 7:17 ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 21/28] package/python-sip: Fix qmake usage for per-package build Andreas Naumann
2020-03-11 22:30 ` Thomas Petazzoni
2020-03-16 22:32 ` Andreas Naumann
2020-07-01 21:56 ` Yann E. MORIN
2020-02-17 21:23 ` [Buildroot] [PATCH v6 22/28] package/python-pyqt5: " Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 23/28] package/qt5webengine: add libXdamage as XCB dependency Andreas Naumann
2020-03-12 8:15 ` Thomas Petazzoni
2020-03-16 22:40 ` Andreas Naumann
2020-03-22 21:58 ` Andreas Naumann
2020-03-22 22:03 ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 24/28] package/qt5webengine: Add optional dependency on qt5quickcontrols2 Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 25/28] package/qt5webengine: Add optional dependency on qt5location Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 26/28] package/qt5virtualkeyboard: Add optional dependency on qt5quickcontrols2 Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 27/28] package/qt53d: Add optional dependency on qt5multimedia Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 28/28] package/qt5charts: " Andreas Naumann
2020-02-18 21:33 ` [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Peter Seiderer
2020-02-19 14:46 ` Andreas Naumann
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=20200701211513.GX20645@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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