Similar to llvm-config, PKG_CONFIG_PATH impacts what dependencies are used. The current approach of printing a warning is not enough. If remembering PKG_CONFIG_PATH is not viable, then a way to turn the warning into build failure would be nice. The goal is to avoid (near) silently switching different deps.
I've submitted a PR to fix this here: https://github.com/mesonbuild/meson/pull/4931
(In reply to Dylan Baker from comment #1) > I've submitted a PR to fix this here: > https://github.com/mesonbuild/meson/pull/4931 thanks! While PKG_CONFIG_PATH is enough for my usecase, it might be useful to have a generic way to specify a custom environment for a build (something like -EVAR=foo)
What exactly are you wanting? We (meson) have been trying not to use environment variables when possible because they are so awful to use on Windows. Our goal has been to make config files more comprehensive (which is something I'm working on) so that you can define an entire test setup through the file.
(In reply to Dylan Baker from comment #3) > What exactly are you wanting? We (meson) have been trying not to use > environment variables when possible because they are so awful to use on > Windows. Our goal has been to make config files more comprehensive (which is > something I'm working on) so that you can define an entire test setup > through the file. it's not required for my setup. It was just an idea to have a way to configure the state of the environment explicitly in meson. It could scrub the existing environment (similar to sudo), and only allow -E options to explicitly set it up. It'd enable cleaner, more controlled environment, for better reproducibility and isolation of builds. I guess it goes against the design principle of ignoring env so feel free to ignore so feel free to ignore the suggestion.
Food for though: AFAICT the concept of reproducible builds relies heavily of having consistent environment. It even suggests to explicitly set SOURCE_DATE_EPOCH although there could be others. Be that explicitly required by the initiative or implicitly via the tools used during the process. https://reproducible-builds.org/docs/source-date-epoch/
Closed via: https://github.com/mesonbuild/meson/pull/4931#event-2257813181 PKG_CONFIG_PATH will be read in during meson setup, and can be configured using -Dpkg_config_path and -Dcross_pkg_config_path. It is remembered across invocations
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.