Mac pkgconfig
Christian Lohmaier
lohmaier+libreoffice at googlemail.com
Mon Jul 7 14:18:06 UTC 2025
Hi Michael, *,
On Mon, Jul 7, 2025 at 2:16 PM Michael Warner
<michael.warner.ut at gmail.com> wrote:
>
> I’m trying to build master on MacOS 15.5. If I have pkgconf in my $PATH, I get this error from autogen.sh:
>
> checking for bogus pkg-config... configure: error: yes, from unknown origin. This *will* break the build. Please modify your PATH variable so that /opt/homebrew/bin/pkgconf is no longer found by configure scripts.
> Error running configure at ./autogen.sh line 333.
you could still allow it, but if there's pkgconfig available, it will
likely cause homebrew dependencies to be introduced in the build and
that then will (very likey) cause issues.
And for the longest time pkg-config/pkgconf was completely optional on
macOS, but not long ago we added meson as a build tool for harfbuzz,
and that unfortunately insists on running pkgconf/pkg-config and is
not happy with setting FOO_FLAGS / FOO_LIBS to bypass the detection,
so that's why it is no longer optional anymore.
> However, if I remove it from my PATH as it suggests, then after the autogen completes it says this:
>
> * WARNING : please add PKG_CONFIG=/path/to/pkgconf to autogen.input or put it in PATH, pkgconf is required to build harfbuzz
yes, pkgconfig from other locations will be accepted given that it
doesn't know about any libraries/components
search in configure.ac for the line
"dnl pkg-config checks on macOS"
to see the logic
> If I keep pkgconf out of my path and set PKG_CONFIG in autogen.input then the next time I run autogen.sh I get the first error again. What am I supposed to do here? Also, why does it think my pkg-config is bogus?
It is not pkg-config itself that is bogus, but the build-environment
overall. Our configure script expects that you only have XCode and
autoconf/automake, gperf, flex, gettext & make
The homebrew/macports libraries that configure detected used to mess
things up, so that warning was put in there to prevent those issues.
You can allow it using --enable-bogus-pkg-config, but expect to run
into either failures in configure or the actual build/it is still
advised to remove homebrew from $PATH
ciao
Christian
More information about the LibreOffice
mailing list