* [Buildroot] [PATCH 1/1] package/environment-setup: export pkgconf's evironment variables
@ 2024-09-13 11:53 Antoine Coutant via buildroot
2024-09-14 7:49 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Antoine Coutant via buildroot @ 2024-09-13 11:53 UTC (permalink / raw)
To: buildroot; +Cc: Antoine Coutant, romain.naour
pkgconf can not find libraries outside of the default sysroot without
PKG_CONFIG_PATH and PKG_CONFIG_PATH properly set.
Make environment-setup export those variables so that pkgconf can
look for libraries in the buildroot sysroot.
Signed-off-by: Antoine Coutant <antoine.coutant@smile.fr>
---
The issue can be reproduced by searching for libraries using buildroot's
pkgconf after sourcing environment-setup.
I found the issue when compiling using meson. The meson "dependency"
keyword uses pkgconf to find libraries, which uses pkgconf
(and other programs) [1].
[1]: https://mesonbuild.com/Dependencies.html
Signed-off-by: Antoine Coutant <antoine.coutant@smile.fr>
---
package/environment-setup/environment-setup.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/environment-setup/environment-setup.mk b/package/environment-setup/environment-setup.mk
index 069ee25f9f..2e0dbe071a 100644
--- a/package/environment-setup/environment-setup.mk
+++ b/package/environment-setup/environment-setup.mk
@@ -32,6 +32,8 @@ define HOST_ENVIRONMENT_SETUP_INSTALL_CMDS
$(ENVIRONMENT_SETUP_FILE)
printf "export \"PATH=\$$SDK_PATH/bin:\$$SDK_PATH/sbin:\$$PATH\"\n" \
>> $(ENVIRONMENT_SETUP_FILE)
+ printf "export \"PKG_CONFIG_PATH=\$$STAGING_DIR/usr/lib/pkgconfig\"\n" >> $(ENVIRONMENT_SETUP_FILE)
+ printf "export \"PKG_CONFIG_SYSROOT_DIR=\$$STAGING_DIR\"\n" >> $(ENVIRONMENT_SETUP_FILE)
$(if $(BR2_LINUX_KERNEL),\
printf "export \"KERNELDIR=$(LINUX_BUILDDIR)\"\n" \
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/environment-setup: export pkgconf's evironment variables
2024-09-13 11:53 [Buildroot] [PATCH 1/1] package/environment-setup: export pkgconf's evironment variables Antoine Coutant via buildroot
@ 2024-09-14 7:49 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-14 7:49 UTC (permalink / raw)
To: Antoine Coutant via buildroot; +Cc: Antoine Coutant, romain.naour
Hello,
On Fri, 13 Sep 2024 13:53:19 +0200
Antoine Coutant via buildroot <buildroot@buildroot.org> wrote:
> pkgconf can not find libraries outside of the default sysroot without
> PKG_CONFIG_PATH and PKG_CONFIG_PATH properly set.
>
> Make environment-setup export those variables so that pkgconf can
> look for libraries in the buildroot sysroot.
>
> Signed-off-by: Antoine Coutant <antoine.coutant@smile.fr>
> ---
> The issue can be reproduced by searching for libraries using buildroot's
> pkgconf after sourcing environment-setup.
>
> I found the issue when compiling using meson. The meson "dependency"
> keyword uses pkgconf to find libraries, which uses pkgconf
> (and other programs) [1].
>
> [1]: https://mesonbuild.com/Dependencies.html
>
> Signed-off-by: Antoine Coutant <antoine.coutant@smile.fr>
This patch shouldn't be needed I believe. We install
HOST_DIR/bin/pkg-config which properly defines those variables. Why are
you using HOST_DIR/bin/pkgconf directly and not HOST_DIR/bin/pkg-config
?
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] 2+ messages in thread
end of thread, other threads:[~2024-09-14 7:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-13 11:53 [Buildroot] [PATCH 1/1] package/environment-setup: export pkgconf's evironment variables Antoine Coutant via buildroot
2024-09-14 7:49 ` 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