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: Collin Funk
Subject: Re: Failure building Emacs master on MSYS2 [MSYS2 PKG]
Date: Tue, 06 May 2025 19:43:34 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Bruno Haible <bruno@clisp.org> writes:

> Now, how about doing the same thing, in a different directory, with a
> corrected configure command?
>
> ./configure --build=x86_64-w64-mingw32

This fails with an unsupported platform message from Emacs configure.ac.

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.

Collin



reply via email to

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