Subject: bug#59340: 29.0.50; Latest Emacs from master gives various native compilation errors

From: Eli Zaretskii <[email-masked]>
Date: Thu, 17 Nov 2022 22:04:32 +0200

> Date: Fri, 18 Nov 2022 01:08:36 +0600
> From:  Akib Azmain Turja via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> I tried to upgrade to the commit
> 1772d88c1fa811eee235ba9b8b7584bb000ac293 (made yesterday).  But after
> installing it, I tried to run to and got various sorts of native
> compilation errors.  I can at least use it the terminal, but starting
> with EXWM makes it crash (I don't who is the culprit: EXWM or GTK+).
> 
> This also happened to me before when I tried to upgrade, but I didn't do
> anything, because I'm lazy.
> 
> I have reverted to my old Emacs (this) after I encountered the bug.
> 
> I clearly remember two things appearing repeatedly in the *Warning*
> buffer (in terminal), the first one "libgccjit.so: error: error invoking
> gcc driver", and second one "FILE: Error: Internal native compiler error
> failed to compile."
> 
> The *Async-native-compile-log* buffer says that ld can't find
> crtbeginS.o, -lgcc, -lgcc_s and -lgcc_s again.  And the message again:
> "libgccjit.so: error: error invoking gcc driver".

Does this happen _after_ you build Emacs?  That is, you are saying
that the *.eln files produced as part of the Emacs build were compiled
successfully, but when you then start the Emacs you built, it is
unable to perform any native compilation?

In any case, I don't see it here.

Could it be that there was some change in your GCC/Binutis/libgccjit
installation in parallel with updating from the Emacs Git repository?
That's what the error messages seem to convey.