Subject: Re: bug#48804: 27.2; compilation emacs on macOS

From: Niels Søndergaard <[email-masked]>
Date: Fri, 4 Jun 2021 14:19:54 +0200

Thanks,
I’ve gcc 10.2.0_4 installed by Homebrew on my new iMac 24” (with M1), and can’t get a newer version, so I’ll properly have to wait ….. 

but thanks

mvh
Niels 

> Den 4. jun. 2021 kl. 13.52 skrev Konrad Podczeck <[email-masked]>:
> 
> 
> 
>> Am 04.06.2021 um 08:00 schrieb Eli Zaretskii <[email-masked] <mailto:[email-masked]>>:
>> 
>>> Date: Thu, 3 Jun 2021 22:34:44 +0100
>>> From: Alan Third <[email-masked] <mailto:[email-masked]>>
>>> Cc: [email-masked] <mailto:[email-masked]>, [email-masked] <mailto:[email-masked]>
>>> 
>>>> in addition to libgccjit, you need to install gcc-11, and to insert somethin like the following into your .bash_profile
>>>> 
>>>> export CC="/usr/local/Cellar/gcc/11.1.0/bin/gcc-11”
>>>> 
>>>> (assuming you use homebrew to install additional unix tools).
>>> 
>>> FYI GCC is unable to build GUI emacs on macOS (or at least the native
>>> GUI). And there's no requirement to build Emacs with GCC for native
>>> compilation to work, as long as libgccjit was installed with Homebrew,
>>> Emacs configure should be able to find it.
>> 
>> That is true, but AFAIK libgccjit invokes gcc as part of the native
>> compilation, so GCC does need to be installed, even if Emacs is built
>> with another compiler.
> 
> 
> For this reason, I mailed to the homebrew people, and got this response:
> 
> "What compiler are you using? Do you have Homebrew gcc installed?"
> 
> After installing gcc-11 from homebrew, and inserting the line
> 
> export CC="/usr/local/Cellar/gcc/11.1.0/bin/gcc-11”
> 
> in my .bash_profile, the “smoke test" error message (about which this disussion started) was gone and I could build Emacs with the native compile option.
>> 
>> (And maybe we should ping the GCC developers to finish the work on the
>> features needed to build Emacs -- there's a Bugzilla PR, where, last
>> time I checked, there was some work being done).
>