All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

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