Message ID | 20240913115319.169625-1-antoine.coutant@smile.fr |
---|---|
State | New |
Headers | show |
Series | [1/1] package/environment-setup: export pkgconf's evironment variables | expand |
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
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" \