[PATCH] Allow Samba/WAF to have pkg-config path overriden

Uri Simchoni uri at samba.org
Wed Jan 18 06:16:46 UTC 2017


On 01/11/2017 01:16 PM, Uri Simchoni wrote:
> On 01/11/2017 03:36 AM, Zen wrote:
>> I'm cross-compiling for a configuration where the target sysroot is
>> different from the build system.
>>
>> In order for several parts of configure that use pkg-config to verify
>> dependencies to work they need to use the pkg-config from the targets root
>> not the build system.
>>
>> I looked into it and the call to pkg-config is just in a string (which will
>> resolve in the context of the build machine). I looked at the latest
>> version of WAF [1] and it does something a little different and calls
>> find_program(). This will also not work correctly for this configuration
>> because it will still just look on the build systems path.
>>
>> I attached a patch to check PKG_CONFIG environment variable (which is what
>> autoconf uses) first then fallback to using find_program() like the more
>> recent version of WAF does.
>>
>> Thanks!
>>
>> [1] -
>> https://github.com/waf-project/waf/blame/master/waflib/Tools/c_config.py#L236
>>
> 
> I'm OK with the idea. You can call it "honor PKG_CONFIG environment
> variable" which is what autoconf does. However, upstream waf doesn't
> honor PKG_CONFIG - as you show in your link. Can you send it upstream
> first so that it doesn't become an obstacle to upgrading waf? (If
> someone on the Team wants to overrule this judgment please do - it's a
> balance between making Samba useful without private patches and making
> its long-term maintenance possible).
> 
> Beyond that, the patch itself does not apply (seems to have different
> indentation than the source), is not in git-am format, and doesn't have
> a signed-off-by attribution, but we can take care of that once we
> resolve the upstream waf business.
> 
> Thanks,
> Uri.
> 
Hi,

I've seen your pull request to waf and Thomas' response (namely that waf
honors PKGCONFIG but not PKG_CONFIG). I've also verified that
back-porting the upstream behavior would make Samba honor PKGCONFIG
variable. Would such back-porting be sufficient?

Thanks,
Uri.




More information about the samba-technical mailing list