Mac OS X and pkg-config

Norbert Thiebaud nthiebaud at gmail.com
Wed Jun 10 09:17:42 PDT 2015


On Wed, Jun 10, 2015 at 8:06 AM, Michael Stahl <mstahl at redhat.com> wrote:
> On 10.06.2015 11:43, Khaled Hosny wrote:
>> On Tue, Jun 09, 2015 at 12:36:41PM +0300, Tor Lillqvist wrote:
>>>> Some of us work on other opensource projects on our Mac machines which
>>>> happen to need MacPorts or HomeBrew.
>>>>
>>>> Having LibreOffice simply say "I refuse to build on this machine because
>>>> you've already installed some other stuff" is not very friendly.
>>>>
>>>
>>> But neither is it very useful to have the already small set of OS X -based
>>> developers split into those who use a pure upstream way to build, those who
>>> use HomeBrew libjpeg but bundled Python, those who use MacPorts Python and
>>> libjpeg, etc.
>>
>> No, that what I want to achieve, what I want is to make sure LibreOffice
>> builds the same way regardless of the presence or absence of pkg-config
>> on Mac OS X, so that is no longer needs to stop the build if one is
>> found.
>
> i've slightly improved the error message now to "Please modify your PATH
> variable so that $PKG_CONFIG is no longer found by configure scripts."
> with commit
> ada6281a5bd74d0ff6ae578d57f39f65b7c25103 so it's at least obvious what
> to do.
>
> but since we already have PATH in config_host.mk it would perhaps be
> possible to detect which directory the pkg-config is found in and
> automatically filter that out of $PATH (unless it's something that
> cannot be removed like /usr/bin).  would that be an improvement for you,
> and/or would anybody object to that?

Actually, yesterday, working with a colunteer to solve a 'python on
mac' problem, I prepared a patch that does just that:
on mac it santized the PATH to leave only what is normally on factory
default and the path to find git (which may not be in /usr/bin)
I made that patch contingent to using LODE to not impose it on
everybod.. as I suppose someone out-there will have
a legitimate reason to have a more complex PATH
I could alter my patch to make it the default for all mac with a
--disable-sanitize-path option for people that really want to shoot
themselves in the foot.

Norbert


More information about the LibreOffice mailing list