diff mbox series

[v6,20/28] qt5: Fix pkgconfig search path for per-package infrastructure

Message ID 20200217212350.29750-21-anaumann@ultratronik.de
State Changes Requested
Headers show
Series Qt5 qmake infra and per-package compatibility | expand

Commit Message

Andreas Naumann Feb. 17, 2020, 9:23 p.m. UTC
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(-)

Comments

LP C June 19, 2020, 10:22 a.m. UTC | #1
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
> 

Andreas, all,

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, plus:

- [v6,19/28] core/pkg-infra: Add per-package support in qmake infra 
(https://patchwork.ozlabs.org/project/buildroot/patch/20200217212350.29750-20-anaumann@ultratronik.de/)
- [v6,20/28] qt5: Fix pkgconfig search path for per-package 
infrastructure 
(https://patchwork.ozlabs.org/project/buildroot/patch/20200217212350.29750-21-anaumann@ultratronik.de/)

Description of my patches:

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.

2. The second one is fixing .cmake files that also contains absolute 
paths after qt5base installation

I'm now able to use full parallel build with per-package with Qt5.

Thank you for your hard work Andreas,

BR,
Louis-Paul CORDIER
Yann E. MORIN July 1, 2020, 9:15 p.m. UTC | #2
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@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@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Yann E. MORIN July 1, 2020, 9:54 p.m. UTC | #3
Louis-Paul, Andeas, All,

On 2020-07-01 23:15 +0200, Yann E. MORIN spake thusly:
> 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
> ?

So, patch 19 in the series is in master now, but patch 20 (this one)
not yet. So, on master, I did a build with PPD, and right after qt5base,
was built, I applied Louis-Paul's tweaks [0], marked the qt5base PPD
directory read-only, and built qt5declarative. It worked. :-)

    $ make qt5base-depends
    $ sed magic from L-P's patch
    $ chmod -R a-w per-package/qt5base/
    $ make qt5dceclarative

Woot! :-)

So, yeath it looks like this patch 20 is not needed if the .pri and .pc
(and .cmake) are properly fixed.

Still, I'll let you guys validate that point, and maybe repost the
agregated series.

Thanks again! :-)

[0] I did not apply the patch from Louis-Paul, because I wanted to
observe the build step by step, and see how the files were before/after
the fixes.

Regards,
Yann E. MORIN.

> 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@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@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.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Yann E. MORIN July 2, 2020, 5:38 p.m. UTC | #4
Louis-Paul, Andreas, All,

On 2020-07-01 23:54 +0200, Yann E. MORIN spake thusly:
> On 2020-07-01 23:15 +0200, Yann E. MORIN spake thusly:
[--SNIP--]
> So, patch 19 in the series is in master now, but patch 20 (this one)
> not yet. So, on master, I did a build with PPD, and right after qt5base,
> was built, I applied Louis-Paul's tweaks [0], marked the qt5base PPD
> directory read-only, and built qt5declarative. It worked. :-)
> 
>     $ make qt5base-depends
>     $ sed magic from L-P's patch
>     $ chmod -R a-w per-package/qt5base/
>     $ make qt5dceclarative
> 
> Woot! :-)

So I was a bit too tired yesterday evening. This chmod can't work,
otherwise the per-package directory for qt5declarative would also be
read-only.

And it worked because I had a hack that restores the +w on the current
per-package directory. And since this is a rsync --link-dest, then we
only have hard-links, and thus the ppd of dependencies are turned back
to read-write...

Damn...

Still this is a nice set of patches.

That gave me an idea for a paranoid PPD, though... hack-hack-hack...

Regards,
Yann E. MORIN.

> So, yeath it looks like this patch 20 is not needed if the .pri and .pc
> (and .cmake) are properly fixed.
> 
> Still, I'll let you guys validate that point, and maybe repost the
> agregated series.
> 
> Thanks again! :-)
> 
> [0] I did not apply the patch from Louis-Paul, because I wanted to
> observe the build step by step, and see how the files were before/after
> the fixes.
> 
> Regards,
> Yann E. MORIN.
> 
> > 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@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@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.  |
> > '------------------------------^-------^------------------^--------------------'
> > _______________________________________________
> > buildroot mailing list
> > buildroot@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.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
LP C July 22, 2020, 7:48 p.m. UTC | #5
Hi all,

I'm very glad that this serie has finally ended. Thank you very much
Andreas for the serie.

I'm still experiencing some issues while compiling Buildroot with Centos
devtoolset 7 and I need to investigate further (qmake-pkg mode of
buildroot seems to honor devtoolset compiler instead of the
cross-compile toolchain for an x86 build)

On Jul 1 2020, at 11:54 pm, Yann E. MORIN <yann.morin.1998@free.fr> wrote:

> Louis-Paul, Andeas, All,
> 
> On 2020-07-01 23:15 +0200, Yann E. MORIN spake thusly:
>> 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
>> ?
> 
> So, patch 19 in the series is in master now, but patch 20 (this one)
> not yet. So, on master, I did a build with PPD, and right after qt5base,
> was built, I applied Louis-Paul's tweaks [0], marked the qt5base PPD
> directory read-only, and built qt5declarative. It worked. :-)
> 
>    $ make qt5base-depends
>    $ sed magic from L-P's patch
>    $ chmod -R a-w per-package/qt5base/
>    $ make qt5dceclarative
> 
> Woot! :-)
> 
> So, yeath it looks like this patch 20 is not needed if the .pri and .pc
> (and .cmake) are properly fixed.
> 
> Still, I'll let you guys validate that point, and maybe repost the
> agregated series.
>
> Thanks again! :-)
> 
> [0] I did not apply the patch from Louis-Paul, because I wanted to
> observe the build step by step, and see how the files were before/after
> the fixes.
> 
> Regards,
> Yann E. MORIN.
> 
>> 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@324
>> 
>> So, as far as I can see (which can be quite short, in some cases), we
>> should introduce a similar generic .pc fixup.
>> 

I totally agree with this. I can add this on my todo list if you wish.

>> 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?

See my comment above.

>> 
>> > 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?

I'm really crowded under the snow those days (you know, when you come
back from holidays ;) ). I'm ok to do it but in a teamwork (IRC or
Discord). I spent way too much of my personal time to fix Qt5 parallel build.

>> 
>> 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@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.  |
>> '------------------------------^-------^------------------^--------------------'
>> _______________________________________________
>> buildroot mailing list
>> buildroot@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.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
Yann E. MORIN July 22, 2020, 8:26 p.m. UTC | #6
Louis-Paul, All,

On 2020-07-22 21:48 +0200, LP C spake thusly:
> I'm very glad that this serie has finally ended.

Oh, no, no! The series is not applied to master at all!

I've just provided some feedback while trying your patches. The original
patches from 20 onward have not been applied...

[--SNIP--]
> >> 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@324
> >> So, as far as I can see (which can be quite short, in some cases), we
> >> should introduce a similar generic .pc fixup.
> I totally agree with this. I can add this on my todo list if you wish.

I'd like to, please.

[--SNIP--]
> >> > 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?
> 
> I'm really crowded under the snow those days (you know, when you come
> back from holidays ;) ). I'm ok to do it but in a teamwork (IRC or
> Discord).

Thomas P. and I are always logged in on IRC. I look from ~07:30+0200 to
~22:00+0200, and Thomas has similar presence. Not sure about Andreas and
Peter, though...

> I spent way too much of my personal time to fix Qt5 parallel build.

I know this can be a lot of work, and that people have a life outside of
Buildroot (and even outside of computers, amazing! ;-] ), but having
people, like you, who understand what is going on, and are interested in
fixing the issue, is the only way to make progress on such topics.

By the way, we're having a virtual developper day next Monday,
2020-07-27, the whole day. If you are willing to join:
    https://elinux.org/Buildroot:VirtualDeveloperDaysSummer2020

Regards,
Yann E. MORIN.
Andreas Naumann July 23, 2020, 10:29 a.m. UTC | #7
Hi Yann, Louis-Paul, all

first of all sorry for not responding for such a long time. There are 
just too many things on my table and yes, I also have a life outside the 
computer (kids, bees, wife should probably come first ...).

However, I'm still interested in the set and veeery happy that #19 was 
finally merged. Thanks everyone for reviewing and testing!

So Louis Paul, would it be possible you send your fix as a separate 
patch and once this is in, I resend what's left from the series?

If IRC is needed for further coordination i can join, but I'm a bit 
hesitant because I can hardly handle the four different messengers that 
I'm using already.


regards,
Andreas



On 22.07.20 22:26, Yann E. MORIN wrote:
> Louis-Paul, All,
> 
> On 2020-07-22 21:48 +0200, LP C spake thusly:
>> I'm very glad that this serie has finally ended.
> 
> Oh, no, no! The series is not applied to master at all!
> 
> I've just provided some feedback while trying your patches. The original
> patches from 20 onward have not been applied...
> 
> [--SNIP--]
>>>> 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@324
>>>> So, as far as I can see (which can be quite short, in some cases), we
>>>> should introduce a similar generic .pc fixup.
>> I totally agree with this. I can add this on my todo list if you wish.
> 
> I'd like to, please.
> 
> [--SNIP--]
>>>>> 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?
>>
>> I'm really crowded under the snow those days (you know, when you come
>> back from holidays ;) ). I'm ok to do it but in a teamwork (IRC or
>> Discord).
> 
> Thomas P. and I are always logged in on IRC. I look from ~07:30+0200 to
> ~22:00+0200, and Thomas has similar presence. Not sure about Andreas and
> Peter, though...
> 
>> I spent way too much of my personal time to fix Qt5 parallel build.
> 
> I know this can be a lot of work, and that people have a life outside of
> Buildroot (and even outside of computers, amazing! ;-] ), but having
> people, like you, who understand what is going on, and are interested in
> fixing the issue, is the only way to make progress on such topics.
> 
> By the way, we're having a virtual developper day next Monday,
> 2020-07-27, the whole day. If you are willing to join:
>      https://elinux.org/Buildroot:VirtualDeveloperDaysSummer2020
> 
> Regards,
> Yann E. MORIN.
>
Yann E. MORIN July 23, 2020, 8:17 p.m. UTC | #8
Andreas, All,

On 2020-07-23 12:29 +0200, Andreas Naumann spake thusly:
> first of all sorry for not responding for such a long time. There are just
> too many things on my table and yes, I also have a life outside the computer
> (kids, bees, wife should probably come first ...).

Yes, this is perfectly understandable. :-)
(my comment was just a joke; a bad one, I agree.)

> However, I'm still interested in the set and veeery happy that #19 was
> finally merged. Thanks everyone for reviewing and testing!
> 
> So Louis Paul, would it be possible you send your fix as a separate patch
> and once this is in, I resend what's left from the series?

Yes, we can address it in smaller, independent pieces, as long as they
make sense on their own.

I think there were two major thinks in the orioginal series:

  - making the qmake infra parallel-safe

  - fixing individual packages that are not using the qmake infra

Maybe we can first concentrate on fixing the infra, and then handle
packages.

> If IRC is needed for further coordination i can join, but I'm a bit hesitant
> because I can hardly handle the four different messengers that I'm using
> already.

Well, IRC is mostly for quick back-n-forth discussions to clarify
things, and to organise the work. It's not mandatory to join.

Regards,
Yann E. MORIN.
Andreas Naumann July 24, 2020, 7:17 a.m. UTC | #9
Hi,

On 23.07.20 22:17, Yann E. MORIN wrote:
> Andreas, All,
> 
> On 2020-07-23 12:29 +0200, Andreas Naumann spake thusly:
>> first of all sorry for not responding for such a long time. There are just
>> too many things on my table and yes, I also have a life outside the computer
>> (kids, bees, wife should probably come first ...).
> 
> Yes, this is perfectly understandable. :-)
> (my comment was just a joke; a bad one, I agree.)
> 
>> However, I'm still interested in the set and veeery happy that #19 was
>> finally merged. Thanks everyone for reviewing and testing!
>>
>> So Louis Paul, would it be possible you send your fix as a separate patch
>> and once this is in, I resend what's left from the series?
> 
> Yes, we can address it in smaller, independent pieces, as long as they
> make sense on their own.
> 
> I think there were two major thinks in the orioginal series:
> 
>    - making the qmake infra parallel-safe
> 
>    - fixing individual packages that are not using the qmake infra
> 
> Maybe we can first concentrate on fixing the infra, and then handle
> packages.

I guess #20 is the last generic one, the rework from Louis Paul being 
even more generic.

The individual ones #24-#28 are probably still applicable. If somebody 
wants to have a look at it...

For some of the other ones I owe a response or have already agreed on a 
rework.

> 
>> If IRC is needed for further coordination i can join, but I'm a bit hesitant
>> because I can hardly handle the four different messengers that I'm using
>> already.
> 
> Well, IRC is mostly for quick back-n-forth discussions to clarify
> things, and to organise the work. It's not mandatory to join.

Yes of course. I see how it goes.

regards,
Andreas


> 
> Regards,
> Yann E. MORIN.
>
diff mbox series

Patch

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