Bug #5042
closedInjecting PKG_CONFIG_PATH in os.environ doesn't work
100%
Description
The trick implemented in #2178 that adds /usr/local/lib/pkgconfig
to PKG_CONFIG_PATH
doesn't work anymore: the changes to os.environ
don't have any effect on pkg-config processes spawned by waf.
I initially noticed this problem several months ago on FreeBSD, but I thought it was a BSD-specific behavior so I didn't give it much attention. However, the same now occurs on CentOS 8 (and likely on RHEL, Fedora, and similar distros). It could be a change in behavior between python2 and python3 (I was using python3 on CentOS), or simply a regression in waf when pre-forked worker processes were introduced. I filed an issue with the waf project about this.
There is a much simpler way to implement #2178 trick though: pass pkg_config_path=...
to the check_cfg
function.