emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failure building Emacs master on MSYS2 [MSYS2 PKG]


From: Eli Zaretskii
Subject: Re: Failure building Emacs master on MSYS2 [MSYS2 PKG]
Date: Wed, 07 May 2025 14:54:01 +0300

> From: Collin Funk <collin.funk1@gmail.com>
> Cc: Angelo Graziosi <angelo.g0@libero.it>,  Eli Zaretskii <eliz@gnu.org>,
>   Paul Eggert <eggert@cs.ucla.edu>,  emacs-devel@gnu.org
> Date: Tue, 06 May 2025 19:43:34 -0700
> 
> However, I can reproduce the original error. It happens because in
> /usr/include/sys/_types.h there is:
> 
>     #define __need_size_t
>     #define __need_wint_t
>     #include <stddef.h>
> 
> And then in Gnulib's stddef.h.in, we do:
> 
>     #if (defined __need_wchar_t || defined __need_size_t                \
>          || defined __need_ptrdiff_t || defined __need_NULL             \
>          || defined __need_wint_t)                                      \
>         /* Avoid warning triggered by "gcc -std=gnu23 -Wsystem-headers" \
>            in GCC 13.3 and 14.2                                         \
>            <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114870>.  */   \
>         && !@STDDEF_NOT_IDEMPOTENT@
> 
> Before doing #include_next <stddef.h>. On this platform
> @STDDEF_NOT_IDEMPOTENT@ is replaced with a 1. Therefore, the
> #include_next does not occur when it should.
> 
> I can confirm manually replacing it with a 0 allows Emacs to build.
> 
> Let me look through the commit history and that GCC bug report and see
> if I can think of a reasonable fix for this in Gnulib.

Please be very careful with this.  There are quite a few platforms
which need __need_wint_t, and they all have their own idiosyncrasies.
(MinGW also uses it, but I see that in my build
@STDDEF_NOT_IDEMPOTENT@ is replaced with zero.)  So any changes here
could affect other platforms, which currently have no problem there.
Given that the MSYS2 build of Emacs is not officially supported, we
should be very careful with changes in this fragile place.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]