GNU bug report logs -
#79709
31.0.50; macOS: configure not finding libgccjit unless --with-native-compilation specified
Previous Next
To reply to this bug, email your comments to 79709 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79709; Package
emacs.
(Tue, 28 Oct 2025 14:49:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gerd Möllmann <gerd.moellmann <at> gmail.com>:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org.
(Tue, 28 Oct 2025 14:49:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This is with master on macOS. Haven't checked with emacs-30.
Make sure that libgccjit is installed, for example via Homebrew. In a
terminal, run ./autogen.sh, so that ./configure exists.
1. ./configure
=> libgccjit not found
2. ./configure --with-native-compilation
=> libgccjit is found
I think the reason for this is here:
configure.ac<master>:
5199 if test "${with_native_compilation}" = "default"; then
5200 # Check if libgccjit is available.
5201 AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire],
5202 [], [libgccjit_not_found])
5203 AC_CHECK_HEADERS([libgccjit.h], [], [libgccjit_dev_not_found])
5204 if test "${with_native_compilation}" != "no"; then
5205 # Check if libgccjit really works.
5206 AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken])
5207 fi
5208 fi
I think this misses the special handling of Homebrew and MacPorts
installations of libgccjit that is done a few lines below.
configure.ac<master>:
5218 if test "${opsys}" = "darwin"; then
5219 # Ensure libgccjit installed by Homebrew or macports can be found.
5220 if test -n "$BREW"; then
5221 if test -n "`$BREW --prefix --installed libgccjit 2>/dev/null`"; then
5222 MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \
5223 grep libgccjit.h))"
5224 MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit \
5225 | grep -m1 -E 'libgccjit\.(so|dylib)$'))"
5226 fi
5227 fi
...
I don't understand why with_native_compilation=default is handled the
way it is, and not as "use if available" like for other things, so I'll
leave this code untouched.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79709; Package
emacs.
(Fri, 31 Oct 2025 15:19:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 79709 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, Oct 28, 2025 at 10:49 AM Gerd Möllmann <gerd.moellmann <at> gmail.com>
wrote:
> This is with master on macOS. Haven't checked with emacs-30.
>
> Make sure that libgccjit is installed, for example via Homebrew. In a
> terminal, run ./autogen.sh, so that ./configure exists.
>
> 1. ./configure
> => libgccjit not found
>
> 2. ./configure --with-native-compilation
> => libgccjit is found
>
> I think the reason for this is here:
>
> configure.ac<master>:
> 5199 if test "${with_native_compilation}" = "default"; then
> 5200 # Check if libgccjit is available.
> 5201 AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire],
> 5202 [], [libgccjit_not_found])
> 5203 AC_CHECK_HEADERS([libgccjit.h], [], [libgccjit_dev_not_found])
> 5204 if test "${with_native_compilation}" != "no"; then
> 5205 # Check if libgccjit really works.
> 5206 AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken])
> 5207 fi
> 5208 fi
>
> I think this misses the special handling of Homebrew and MacPorts
> installations of libgccjit that is done a few lines below.
>
> configure.ac<master>:
> 5218 if test "${opsys}" = "darwin"; then
> 5219 # Ensure libgccjit installed by Homebrew or macports can be
> found.
> 5220 if test -n "$BREW"; then
> 5221 if test -n "`$BREW --prefix --installed libgccjit
> 2>/dev/null`"; then
> 5222 MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \
> 5223 grep libgccjit.h))"
> 5224 MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit \
> 5225 | grep -m1 -E
> 'libgccjit\.(so|dylib)$'))"
> 5226 fi
> 5227 fi
> ...
>
> I don't understand why with_native_compilation=default is handled the
> way it is, and not as "use if available" like for other things, so I'll
> leave this code untouched.
>
+my 2 cents, it would be great to handle this on macOS so we can avoid
manually specifying configure options.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79709; Package
emacs.
(Fri, 31 Oct 2025 15:35:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 79709 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Oct 31, 2025 at 11:17 AM Stéphane Marks <shipmints <at> gmail.com> wrote:
> On Tue, Oct 28, 2025 at 10:49 AM Gerd Möllmann <gerd.moellmann <at> gmail.com>
> wrote:
>
>> This is with master on macOS. Haven't checked with emacs-30.
>>
>> Make sure that libgccjit is installed, for example via Homebrew. In a
>> terminal, run ./autogen.sh, so that ./configure exists.
>>
>> 1. ./configure
>> => libgccjit not found
>>
>> 2. ./configure --with-native-compilation
>> => libgccjit is found
>>
>> I think the reason for this is here:
>>
>> configure.ac<master>:
>> 5199 if test "${with_native_compilation}" = "default"; then
>> 5200 # Check if libgccjit is available.
>> 5201 AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire],
>> 5202 [], [libgccjit_not_found])
>> 5203 AC_CHECK_HEADERS([libgccjit.h], [], [libgccjit_dev_not_found])
>> 5204 if test "${with_native_compilation}" != "no"; then
>> 5205 # Check if libgccjit really works.
>> 5206 AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken])
>> 5207 fi
>> 5208 fi
>>
>> I think this misses the special handling of Homebrew and MacPorts
>> installations of libgccjit that is done a few lines below.
>>
>> configure.ac<master>:
>> 5218 if test "${opsys}" = "darwin"; then
>> 5219 # Ensure libgccjit installed by Homebrew or macports can be
>> found.
>> 5220 if test -n "$BREW"; then
>> 5221 if test -n "`$BREW --prefix --installed libgccjit
>> 2>/dev/null`"; then
>> 5222 MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \
>> 5223 grep libgccjit.h))"
>> 5224 MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit \
>> 5225 | grep -m1 -E
>> 'libgccjit\.(so|dylib)$'))"
>> 5226 fi
>> 5227 fi
>> ...
>>
>> I don't understand why with_native_compilation=default is handled the
>> way it is, and not as "use if available" like for other things, so I'll
>> leave this code untouched.
>>
>
> +my 2 cents, it would be great to handle this on macOS so we can avoid
> manually specifying configure options.
>
It seems that homebrew dbus is also ignored. Gerd, is dbus configured
correctly for you on macOS by default?
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79709; Package
emacs.
(Fri, 31 Oct 2025 15:44:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 79709 <at> debbugs.gnu.org (full text, mbox):
Stéphane Marks <shipmints <at> gmail.com> writes:
> On Fri, Oct 31, 2025 at 11:17 AM Stéphane Marks <shipmints <at> gmail.com> wrote:
>
> On Tue, Oct 28, 2025 at 10:49 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
>
> This is with master on macOS. Haven't checked with emacs-30.
>
> Make sure that libgccjit is installed, for example via Homebrew. In a
> terminal, run ./autogen.sh, so that ./configure exists.
>
> 1. ./configure
> => libgccjit not found
>
> 2. ./configure --with-native-compilation
> => libgccjit is found
>
> I think the reason for this is here:
>
> configure.ac<master>:
> 5199 if test "${with_native_compilation}" = "default"; then
> 5200 # Check if libgccjit is available.
> 5201 AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire],
> 5202 [], [libgccjit_not_found])
> 5203 AC_CHECK_HEADERS([libgccjit.h], [], [libgccjit_dev_not_found])
> 5204 if test "${with_native_compilation}" != "no"; then
> 5205 # Check if libgccjit really works.
> 5206 AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken])
> 5207 fi
> 5208 fi
>
> I think this misses the special handling of Homebrew and MacPorts
> installations of libgccjit that is done a few lines below.
>
> configure.ac<master>:
> 5218 if test "${opsys}" = "darwin"; then
> 5219 # Ensure libgccjit installed by Homebrew or macports can be found.
> 5220 if test -n "$BREW"; then
> 5221 if test -n "`$BREW --prefix --installed libgccjit 2>/dev/null`"; then
> 5222 MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \
> 5223 grep libgccjit.h))"
> 5224 MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit \
> 5225 | grep -m1 -E 'libgccjit\.(so|dylib)$'))"
> 5226 fi
> 5227 fi
> ...
>
> I don't understand why with_native_compilation=default is handled the
> way it is, and not as "use if available" like for other things, so I'll
> leave this code untouched.
>
> +my 2 cents, it would be great to handle this on macOS so we can avoid manually specifying configure
> options.
>
> It seems that homebrew dbus is also ignored. Gerd, is dbus configured correctly for you on macOS by default?
Homebrew dbus needs a service to be running. What does this show for
you?
.../emacs/github/igc % brew services list
Name Status User File
dbus other gerd ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79709; Package
emacs.
(Fri, 31 Oct 2025 15:48:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 79709 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Oct 31, 2025 at 11:43 AM Gerd Möllmann <gerd.moellmann <at> gmail.com>
wrote:
> Stéphane Marks <shipmints <at> gmail.com> writes:
>
> > On Fri, Oct 31, 2025 at 11:17 AM Stéphane Marks <shipmints <at> gmail.com>
> wrote:
> >
> > On Tue, Oct 28, 2025 at 10:49 AM Gerd Möllmann <
> gerd.moellmann <at> gmail.com> wrote:
> >
> > This is with master on macOS. Haven't checked with emacs-30.
> >
> > Make sure that libgccjit is installed, for example via Homebrew. In a
> > terminal, run ./autogen.sh, so that ./configure exists.
> >
> > 1. ./configure
> > => libgccjit not found
> >
> > 2. ./configure --with-native-compilation
> > => libgccjit is found
> >
> > I think the reason for this is here:
> >
> > configure.ac<master>:
> > 5199 if test "${with_native_compilation}" = "default"; then
> > 5200 # Check if libgccjit is available.
> > 5201 AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire],
> > 5202 [], [libgccjit_not_found])
> > 5203 AC_CHECK_HEADERS([libgccjit.h], [], [libgccjit_dev_not_found])
> > 5204 if test "${with_native_compilation}" != "no"; then
> > 5205 # Check if libgccjit really works.
> > 5206 AC_RUN_IFELSE([libgccjit_smoke_test], [],
> [libgccjit_broken])
> > 5207 fi
> > 5208 fi
> >
> > I think this misses the special handling of Homebrew and MacPorts
> > installations of libgccjit that is done a few lines below.
> >
> > configure.ac<master>:
> > 5218 if test "${opsys}" = "darwin"; then
> > 5219 # Ensure libgccjit installed by Homebrew or macports can be
> found.
> > 5220 if test -n "$BREW"; then
> > 5221 if test -n "`$BREW --prefix --installed libgccjit
> 2>/dev/null`"; then
> > 5222 MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \
> > 5223 grep
> libgccjit.h))"
> > 5224 MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit \
> > 5225 | grep -m1 -E
> 'libgccjit\.(so|dylib)$'))"
> > 5226 fi
> > 5227 fi
> > ...
> >
> > I don't understand why with_native_compilation=default is handled the
> > way it is, and not as "use if available" like for other things, so I'll
> > leave this code untouched.
> >
> > +my 2 cents, it would be great to handle this on macOS so we can avoid
> manually specifying configure
> > options.
> >
> > It seems that homebrew dbus is also ignored. Gerd, is dbus configured
> correctly for you on macOS by default?
>
> Homebrew dbus needs a service to be running. What does this show for
> you?
>
> .../emacs/github/igc % brew services list
> Name Status User File
> dbus other gerd
> ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
>
I'm looking only to build emacs with dbus support, not necessarily be
running dbus. If I run configure --with-dbus that works fine without the
service running and has for me for ages.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79709; Package
emacs.
(Fri, 31 Oct 2025 16:03:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 79709 <at> debbugs.gnu.org (full text, mbox):
Stéphane Marks <shipmints <at> gmail.com> writes:
> On Fri, Oct 31, 2025 at 11:43 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
>
> Stéphane Marks <shipmints <at> gmail.com> writes:
>
> > On Fri, Oct 31, 2025 at 11:17 AM Stéphane Marks <shipmints <at> gmail.com> wrote:
> >
> > On Tue, Oct 28, 2025 at 10:49 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
> >
> > This is with master on macOS. Haven't checked with emacs-30.
> >
> > Make sure that libgccjit is installed, for example via Homebrew. In a
> > terminal, run ./autogen.sh, so that ./configure exists.
> >
> > 1. ./configure
> > => libgccjit not found
> >
> > 2. ./configure --with-native-compilation
> > => libgccjit is found
> >
> > I think the reason for this is here:
> >
> > configure.ac<master>:
> > 5199 if test "${with_native_compilation}" = "default"; then
> > 5200 # Check if libgccjit is available.
> > 5201 AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire],
> > 5202 [], [libgccjit_not_found])
> > 5203 AC_CHECK_HEADERS([libgccjit.h], [], [libgccjit_dev_not_found])
> > 5204 if test "${with_native_compilation}" != "no"; then
> > 5205 # Check if libgccjit really works.
> > 5206 AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken])
> > 5207 fi
> > 5208 fi
> >
> > I think this misses the special handling of Homebrew and MacPorts
> > installations of libgccjit that is done a few lines below.
> >
> > configure.ac<master>:
> > 5218 if test "${opsys}" = "darwin"; then
> > 5219 # Ensure libgccjit installed by Homebrew or macports can be found.
> > 5220 if test -n "$BREW"; then
> > 5221 if test -n "`$BREW --prefix --installed libgccjit 2>/dev/null`"; then
> > 5222 MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \
> > 5223 grep libgccjit.h))"
> > 5224 MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit \
> > 5225 | grep -m1 -E 'libgccjit\.(so|dylib)$'))"
> > 5226 fi
> > 5227 fi
> > ...
> >
> > I don't understand why with_native_compilation=default is handled the
> > way it is, and not as "use if available" like for other things, so I'll
> > leave this code untouched.
> >
> > +my 2 cents, it would be great to handle this on macOS so we can avoid manually specifying configure
> > options.
> >
> > It seems that homebrew dbus is also ignored. Gerd, is dbus configured correctly for you on macOS by
> default?
>
> Homebrew dbus needs a service to be running. What does this show for
> you?
>
> .../emacs/github/igc % brew services list
> Name Status User File
> dbus other gerd ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
>
> I'm looking only to build emacs with dbus support, not necessarily be running dbus. If I run configure -
> -with-dbus that works fine without the service running and has for me for ages.
Sorry, I misunderstood you. The situation with dbus is a bit different
because the default in configure.ac is "no", i.e. without specifying
--with-dbus no dbus. AFAIK, only --with-native-compilation has this
"default" handling.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79709; Package
emacs.
(Fri, 31 Oct 2025 16:07:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 79709 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Oct 31, 2025 at 12:02 PM Gerd Möllmann <gerd.moellmann <at> gmail.com>
wrote:
> Stéphane Marks <shipmints <at> gmail.com> writes:
>
> > On Fri, Oct 31, 2025 at 11:43 AM Gerd Möllmann <gerd.moellmann <at> gmail.com>
> wrote:
> >
> > Stéphane Marks <shipmints <at> gmail.com> writes:
> >
> > > On Fri, Oct 31, 2025 at 11:17 AM Stéphane Marks <shipmints <at> gmail.com>
> wrote:
> > >
> > > On Tue, Oct 28, 2025 at 10:49 AM Gerd Möllmann <
> gerd.moellmann <at> gmail.com> wrote:
> > >
> > > This is with master on macOS. Haven't checked with emacs-30.
> > >
> > > Make sure that libgccjit is installed, for example via Homebrew. In a
> > > terminal, run ./autogen.sh, so that ./configure exists.
> > >
> > > 1. ./configure
> > > => libgccjit not found
> > >
> > > 2. ./configure --with-native-compilation
> > > => libgccjit is found
> > >
> > > I think the reason for this is here:
> > >
> > > configure.ac<master>:
> > > 5199 if test "${with_native_compilation}" = "default"; then
> > > 5200 # Check if libgccjit is available.
> > > 5201 AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire],
> > > 5202 [], [libgccjit_not_found])
> > > 5203 AC_CHECK_HEADERS([libgccjit.h], [],
> [libgccjit_dev_not_found])
> > > 5204 if test "${with_native_compilation}" != "no"; then
> > > 5205 # Check if libgccjit really works.
> > > 5206 AC_RUN_IFELSE([libgccjit_smoke_test], [],
> [libgccjit_broken])
> > > 5207 fi
> > > 5208 fi
> > >
> > > I think this misses the special handling of Homebrew and MacPorts
> > > installations of libgccjit that is done a few lines below.
> > >
> > > configure.ac<master>:
> > > 5218 if test "${opsys}" = "darwin"; then
> > > 5219 # Ensure libgccjit installed by Homebrew or macports can
> be found.
> > > 5220 if test -n "$BREW"; then
> > > 5221 if test -n "`$BREW --prefix --installed libgccjit
> 2>/dev/null`"; then
> > > 5222 MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \
> > > 5223 grep
> libgccjit.h))"
> > > 5224 MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit \
> > > 5225 | grep -m1 -E
> 'libgccjit\.(so|dylib)$'))"
> > > 5226 fi
> > > 5227 fi
> > > ...
> > >
> > > I don't understand why with_native_compilation=default is handled the
> > > way it is, and not as "use if available" like for other things, so
> I'll
> > > leave this code untouched.
> > >
> > > +my 2 cents, it would be great to handle this on macOS so we can
> avoid manually specifying configure
> > > options.
> > >
> > > It seems that homebrew dbus is also ignored. Gerd, is dbus configured
> correctly for you on macOS by
> > default?
> >
> > Homebrew dbus needs a service to be running. What does this show for
> > you?
> >
> > .../emacs/github/igc % brew services list
> > Name Status User File
> > dbus other gerd
> ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
> >
> > I'm looking only to build emacs with dbus support, not necessarily be
> running dbus. If I run configure -
> > -with-dbus that works fine without the service running and has for me
> for ages.
>
> Sorry, I misunderstood you. The situation with dbus is a bit different
> because the default in configure.ac is "no", i.e. without specifying
> --with-dbus no dbus. AFAIK, only --with-native-compilation has this
> "default" handling.
>
Okay. I'll retain my manual configure scripts.
[Message part 2 (text/html, inline)]
This bug report was last modified 4 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.