Subject: bug#28601: 26.0.50; configure: error: Emacs does not support 'x86_64-pc-msys' systems.

From: Eli Zaretskii <[email-masked]>
Date: Wed, 08 Nov 2017 20:13:24 +0200

> From: Noam Postavsky <[email-masked]>
> Date: Wed, 8 Nov 2017 12:42:29 -0500
> Cc: Vincent Belaïche <[email-masked]>, 
> 	Glenn Morris <[email-masked]>, [email-masked], Francis Wright <[email-masked]>, 
> 	Stephen Leake <[email-masked]>, Phillip Lord <[email-masked]>, 
> 	Fabrice Popineau <[email-masked]>
> 
> > (Btw, on my system, "type gcc" from Bash says "/d/usr/bin/gcc", and
> > there's nothing wrong with my installation.  So this advice could be
> > okay for the newbies, but if the value is different, it doesn't yet
> > mean the installation is wrong.  I'm just saying.)
> 
> But you have MSYS (1), right?

Yes, but it doesn't matter.  MSYS2 didn't (and couldn't) change the
basic facts that I'll try explaining below.

> The issue here, is that with MSYS2 there are 3 possible gcc's that
> can be installed. The mingw64 one should be active. If the user
> launched C:\msys64\msys2.exe instead of C:\msys64\mingw64.exe, they
> would get "/usr/bin/gcc", which is not the right gcc (it would
> result in the "Emacs does not support 'x86_64-pc-msys' systems"
> error mentioned in the bug title).

All of this is only true if your installation is the "canonical" one,
in which case MinGW and MSYS are installed under the same common
parent, but in sibling subdirectories.  But that's not the only valid
installation.  The only important thing is that the MinGW programs,
including GCC, are on the Windows PATH, because then they can be
invoked both from MSYS Bash and from anywhere else on the system
(including from Emacs which was run via anything except Bash).  There
are no other requirements for a healthy MinGW installation.  If
someone installed MSYS gcc (why did they? it's not needed, and they
are shooting themselves in the foot), they just need to make sure it's
mentioned on PATH after the MinGW one, or even doesn't appear at all
on the Windows PATH, only on the MSYS PATH set by .bashrc and friends.

IOW, what we are advertising here is only one particular setup, which
just happens to be what the MSYS2 crowd decided for you.  It is
incorrect to say that any other setup is wrong.

> >> +** Check your MSYS2 fstab file
> >
> > I don't understand why this part is necessary.  AFAIR, fstab is set up
> > by the MSYS installer, and if it doesn't have the correct entries,
> > nothing will really work.  So I think this problem can only happen if
> > someone manually tinkers with their fstab, and if so, they should know
> > what they are doing.  Asking people to look there runs the risk of
> > them deciding that the value is somehow incorrect, and editing it to
> > completely ruin their MSYS installation.  FWIW, I have _never_ needed
> > to look at that file, in all the years I have an actively maintained
> > and used MSYS installation.
> >
> > So I think this is best skipped.
> 
> Maybe we should title the section "If your name is Vincent, Check your
> MSYS2 fstab file" ;)

Fine with me.

Thanks.