Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew libgccjit 12.1.0

From: Dario Gjorgjevski <[email-masked]>
Date: Tue, 16 Aug 2022 15:28:26 +0200

On Thu, Aug 11, 2022 at 6:20 PM Eli Zaretskii <[email-masked]> wrote:
>
> But does this problem only happen when building Emacs under Homebrew?

Yes, this happens only with Homebrew and it started happening when
Homebrew upgraded libgccjit (and gcc) to version 12.

Previously, Homebrew was installing the libgccjit libraries in

    $HOMEBREW_PREFIX/opt/libgccjit/lib/gcc/${major_version}

Whereas it now installs them in

    $HOMEBREW_PREFIX/opt/libgccjit/lib/gcc/current
    $HOMEBREW_PREFIX/opt/libgccjit/lib/gcc/${major_version}

with the latter being a symlink to the former.  This breaks the
configure script which expects only a single libdir to be found; it
now finds two and ends up with an erroneous invocation (i.e.
`-L${libdir1} ${libdir2}' as opposed to `-L${libdir}').

Best regards,
Dario