GNU bug report logs - #57029
macos cannot build emacs after updated gcc and libgccjit to 12.1

Previous Next

Package: emacs;

Reported by: ccqpein <ccqpein <at> protonmail.com>

Date: Sun, 7 Aug 2022 05:59:02 UTC

Severity: normal

Tags: patch

Merged with 57015, 57023, 57028

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57029 in the body.
You can then email your comments to 57029 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#57029; Package emacs. (Sun, 07 Aug 2022 05:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to ccqpein <ccqpein <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 07 Aug 2022 05:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: ccqpein <ccqpein <at> protonmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: macos cannot build emacs after updated gcc and libgccjit to 12.1
Date: Sun, 07 Aug 2022 03:29:47 +0000
[Message part 1 (text/plain, inline)]
I just update the gcc and the libgccjit through `brew` tonight and find building the emacs from source has issue.

after `./autogen.sh`, I ran the `./configure --with-native-compilation` (for simplifying) and got the error message that

```
checking for gcc_jit_context_acquire in -lgccjit... no
configure: error: ELisp native compiler was requested, but libgccjit was not found.
Please try installing libgccjit or a similar package.
If you are sure you want Emacs be compiled without ELisp native compiler,pass the --without-native-compilation option to configure.

```

I add `echo $MAC_CFLAGS` and `echo $MAC_LIBS` after line 4269 in `configure.ac` and I figure out it gives me the right including path of libgccjit 12.

```
-I/usr/local/Cellar/libgccjit/12.1.0/include
-L/usr/local/Cellar/libgccjit/12.1.0/lib/gcc/current /usr/local/Cellar/libgccjit/12.1.0/lib/gcc/12
```

my environment:

macOS 12.5
intel CPU

Thanks.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57029; Package emacs. (Sun, 07 Aug 2022 06:51:02 GMT) Full text and rfc822 format available.

Message #8 received at 57029 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: ccqpein <ccqpein <at> protonmail.com>
Cc: 57029 <at> debbugs.gnu.org
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Sun, 07 Aug 2022 09:50:11 +0300
merge 57029 57015
thanks

> Date: Sun, 07 Aug 2022 03:29:47 +0000
> From:  ccqpein via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> I just update the gcc and the libgccjit through `brew` tonight and find building the emacs from source has
> issue. 
> 
> after `./autogen.sh`, I ran the `./configure --with-native-compilation` (for simplifying) and got the error
> message that 
> 
> ```
> checking for gcc_jit_context_acquire in -lgccjit... no
> configure: error: ELisp native compiler was requested, but libgccjit was not found.
> Please try installing libgccjit or a similar package.
> If you are sure you want Emacs be compiled without ELisp native compiler,
> pass the --without-native-compilation option to configure.
> ```
> 
> I add `echo $MAC_CFLAGS` and `echo $MAC_LIBS` after line 4269 in `configure.ac` and I figure out it gives
> me the right including path of libgccjit 12. 
> 
> ```
> -I/usr/local/Cellar/libgccjit/12.1.0/include
> -L/usr/local/Cellar/libgccjit/12.1.0/lib/gcc/current /usr/local/Cellar/libgccjit/12.1.0/lib/gcc/12
> ```
> 
> my environment:
> 
> macOS 12.5
> intel CPU

Thanks, this is a duplicate of bug#57015.




Merged 57015 57028 57029. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 07 Aug 2022 06:51:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57029; Package emacs. (Sun, 07 Aug 2022 12:59:02 GMT) Full text and rfc822 format available.

Message #13 received at 57029 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Sun, 07 Aug 2022 14:58:14 +0200
Stefan Kangas <stefankangas <at> gmail.com> writes:

>> Is it really a problem to use only libgccjit 12.0 and older for the
>> release branch?
>
> I'm afraid that it's a serious problem.

Yes, I think we have to put a fix for this on the release branch, but as
Eli says, it must be safe.  (And this has been a surprisingly difficult
thing to get right -- it seems so simple, but the differences between
brew/Macports/versions of the basic utilities have led to numerous
breakages here.)






Forcibly Merged 57015 57023 57028 57029. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 07 Aug 2022 13:00:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57029; Package emacs. (Mon, 08 Aug 2022 06:04:02 GMT) Full text and rfc822 format available.

Message #18 received at 57029 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org,
 Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Mon, 08 Aug 2022 08:03:45 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> -          MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit| \
>> -                                            grep -E 'libgccjit\.(so|dylib)$'))"
>> +          MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit | \
>> +                                  grep -E 'current/libgccjit\.(so|dylib)$' | \
>> +                                  head -1))"
>> +          if test "x${MAC_LIBS}" = "x-L"; then

The 'x' is kind of confusing here because MAC_LIBS can't be empty at
this point.

> Is 'dirname' guaranteed to be available?

Yes (POSIX).  And it was used already.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57029; Package emacs. (Mon, 08 Aug 2022 06:24:02 GMT) Full text and rfc822 format available.

Message #21 received at 57029 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 57029 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz <at> gnu.org>, naofumi <at> yasufuku.dev, 57015 <at> debbugs.gnu.org
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Mon, 08 Aug 2022 08:23:39 +0200
Stefan Kangas <stefankangas <at> gmail.com> writes:

> In any case, this seems rather academic to me as our recommendations in
> this regard will have little bearing on what users do in practice.

+1




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57029; Package emacs. (Mon, 08 Aug 2022 08:10:02 GMT) Full text and rfc822 format available.

Message #24 received at 57029 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> suse.de>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Subject: Re: bug#57015: bug#57029: macos cannot build emacs after updated
 gcc and libgccjit to 12.1
Date: Mon, 08 Aug 2022 10:08:49 +0200
On Aug 08 2022, Gerd Möllmann wrote:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> -          MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit| \
>>> -                                            grep -E 'libgccjit\.(so|dylib)$'))"
>>> +          MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit | \
>>> +                                  grep -E 'current/libgccjit\.(so|dylib)$' | \
>>> +                                  head -1))"
>>> +          if test "x${MAC_LIBS}" = "x-L"; then
>
> The 'x' is kind of confusing here because MAC_LIBS can't be empty at
> this point.

This x prefix is not about emptyness, but preventing a pre-POSIX test
utility from being confused by the leading dash.

-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57029; Package emacs. (Mon, 08 Aug 2022 12:59:02 GMT) Full text and rfc822 format available.

Message #27 received at 57029 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Andreas Schwab <schwab <at> suse.de>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Mon, 08 Aug 2022 14:57:52 +0200
Andreas Schwab <schwab <at> suse.de> writes:

> This x prefix is not about emptyness, but preventing a pre-POSIX test
> utility from being confused by the leading dash.

Ah right, I forgot that.  Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57029; Package emacs. (Fri, 19 Aug 2022 07:25:02 GMT) Full text and rfc822 format available.

Message #30 received at 57029 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org, dario.gjorgjevski <at> gmail.com,
 Stefan Kangas <stefankangas <at> gmail.com>, naofumi <at> yasufuku.dev
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Fri, 19 Aug 2022 09:24:27 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> We could, but that won't help our users.

Any objections to a fix in master?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57029; Package emacs. (Fri, 19 Aug 2022 07:39:02 GMT) Full text and rfc822 format available.

Message #33 received at 57029 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org, dario.gjorgjevski <at> gmail.com,
 stefankangas <at> gmail.com, naofumi <at> yasufuku.dev
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Fri, 19 Aug 2022 10:38:21 +0300
> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
> Cc: Stefan Kangas <stefankangas <at> gmail.com>,  57029 <at> debbugs.gnu.org,
>   57015 <at> debbugs.gnu.org,  dario.gjorgjevski <at> gmail.com,
>   naofumi <at> yasufuku.dev
> Date: Fri, 19 Aug 2022 09:24:27 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > We could, but that won't help our users.
> 
> Any objections to a fix in master?

Not on master, no.  My problem is what to do with the release branch.
If you think the solution based on Ruby is fine and safe, please
install that on the release branch (and it will be soon merged to
master).

Otherwise, which of the other solutions proposed here and in related
discussions do you recommend that is safe enough for the release
branch?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57029; Package emacs. (Fri, 19 Aug 2022 09:07:02 GMT) Full text and rfc822 format available.

Message #36 received at 57029 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org, dario.gjorgjevski <at> gmail.com,
 stefankangas <at> gmail.com, naofumi <at> yasufuku.dev
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Fri, 19 Aug 2022 11:05:57 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> If you think the solution based on Ruby is fine and safe, please
> install that on the release branch (and it will be soon merged to
> master).

Thanks!  I've done that on emacs-28.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57029; Package emacs. (Mon, 05 Sep 2022 18:45:02 GMT) Full text and rfc822 format available.

Message #39 received at 57029 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: naofumi <at> yasufuku.dev, 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org,
 dario.gjorgjevski <at> gmail.com, stefankangas <at> gmail.com,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Mon, 05 Sep 2022 20:43:54 +0200
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:

>> If you think the solution based on Ruby is fine and safe, please
>> install that on the release branch (and it will be soon merged to
>> master).
>
> Thanks!  I've done that on emacs-28.

And I guess that fixed this bug?  So I'm closing this bug report now.

(If I misunderstood, please respond to the debbugs address and we'll
reopen.)




bug marked as fixed in version 29.1, send any further explanations to 57029 <at> debbugs.gnu.org and ccqpein <ccqpein <at> protonmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 05 Sep 2022 18:45:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 04 Oct 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 198 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.