Bug 109333

Summary: mesa, meson: Need ability to remember PKG_CONFIG_PATH
Product: Mesa Reporter: Jan Vesely <jv356>
Component: OtherAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 109323    

Description Jan Vesely 2019-01-12 20:38:50 UTC
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.
Comment 1 Dylan Baker 2019-02-14 18:50:00 UTC
I've submitted a PR to fix this here: https://github.com/mesonbuild/meson/pull/4931
Comment 2 Jan Vesely 2019-02-14 21:59:29 UTC
(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)
Comment 3 Dylan Baker 2019-02-15 00:05:33 UTC
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.
Comment 4 Jan Vesely 2019-02-15 15:50:05 UTC
(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.
Comment 5 Emil Velikov 2019-02-15 17:07:14 UTC
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/
Comment 6 Dylan Baker 2019-04-08 18:20:05 UTC
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.