GNU bug report logs - #71036
build failure on Windows with MinGW-w64 GCC 14.1

Previous Next

Package: emacs;

Reported by: Richard Copley <rcopley <at> gmail.com>

Date: Sat, 18 May 2024 11:56:01 UTC

Severity: normal

Merged with 70889, 70890

Found in version 29.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71036 in the body.
You can then email your comments to 71036 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#71036; Package emacs. (Sat, 18 May 2024 11:56:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Richard Copley <rcopley <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 18 May 2024 11:56:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Richard Copley <rcopley <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: build failure on Windows with MinGW-w64 GCC 14.1
Date: Sat, 18 May 2024 12:55:02 +0100
Emacs fails to build on Windows with the current MSYS2 GCC 14.1 toolchain.

TL;DR: -Werror=implicit-function-declaration is now the default.
Please see <https://gcc.gnu.org/gcc-14/porting_to.html>. This breaks
the test for "sys/wait.h" in "./configure".

The error is:
  CC       sysdep.o
sysdep.c: In function 'get_child_status':
sysdep.c:479:13: error: implicit declaration of function 'waitpid'
[-Wimplicit-function-declaration]
  479 |       pid = waitpid (child, status, options);
      |             ^~~~~~~
sysdep.c:479:13: warning: nested extern declaration of 'waitpid'
[-Wnested-externs]
sysdep.c: In function 'child_status_changed':
sysdep.c:525:43: error: 'WNOHANG' undeclared (first use in this function)
  525 |   return get_child_status (child, status, WNOHANG | options, 0);
      |                                           ^~~~~~~
sysdep.c:525:43: note: each undeclared identifier is reported only
once for each function it appears in
sysdep.c:526:1: warning: control reaches end of non-void function
[-Wreturn-type]
  526 | }
      | ^
make[2]: *** [Makefile:452: sysdep.o] Error 1

With the previous GCC 13.2 toolchain the build succeeds. The relevant
parts of the two builds' config.log are below, followed by a diff of
the output of "./configure".
Note that -Werror=implicit-function-declaration is now the default.
Please see <https://gcc.gnu.org/gcc-14/porting_to.html>.

==== GCC 13.2 ====

configure:14931: checking for sys/wait.h that is POSIX.1 compatible
configure:14958: gcc -I ./nt/inc -c -g3 -O2 -gdwarf-2 -mtune=generic
conftest.c >&5
conftest.c: In function 'main':

conftest.c:68:3: warning: implicit declaration of function 'wait'
[-Wimplicit-function-declaration]

   68 |   wait (&s);

      |   ^~~~

configure:14958: $? = 0
configure:14968: result: yes

==== GCC 14.1 ====

configure:14931: checking for sys/wait.h that is POSIX.1 compatible
configure:14958: gcc -I ./nt/inc -c -g3 -O2 -gdwarf-2 -mtune=generic
conftest.c >&5
conftest.c: In function 'main':

conftest.c:69:3: error: implicit declaration of function 'wait'
[-Wimplicit-function-declaration]

   69 |   wait (&s);

      |   ^~~~

configure:14958: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU Emacs"
| #define PACKAGE_TARNAME "emacs"
| #define PACKAGE_VERSION "30.0.50"
| #define PACKAGE_STRING "GNU Emacs 30.0.50"
| #define PACKAGE_BUGREPORT "bug-gnu-emacs <at> gnu.org"
| #define PACKAGE_URL "https://www.gnu.org/software/emacs/"
| #define MAIL_USE_POP 1
| #define HAVE_PDUMPER 1
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_MALLOC_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_PWD_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_DIRENT_H 1
| #define HAVE_SYS_CDEFS_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_STDBOOL_H 1
| #define HAVE_STDCKDINT_H 1
| #define STDC_HEADERS 1
| #define _ALL_SOURCE 1
| #define _DARWIN_C_SOURCE 1
| #define _GNU_SOURCE 1
| #define _HPUX_ALT_XOPEN_SOCKET_API 1
| #define _NETBSD_SOURCE 1
| #define _OPENBSD_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
| #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_DFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_EXT__ 1
| #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
| #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
| #define __STDC_WANT_LIB_EXT2__ 1
| #define __STDC_WANT_MATH_SPEC_FUNCS__ 1
| #define _TANDEM_SOURCE 1
| #define __EXTENSIONS__ 1
| #define _FILE_OFFSET_BITS 64
| #define __USE_MINGW_ANSI_STDIO 1
| #define GCC_LINT 1
| #define SYSTEM_TYPE "windows-nt"
| #define HAVE_MMSYSTEM_H 1
| #define HAVE_SOUND 1
| /* end confdefs.h.  */
| #include <sys/types.h>
| #include <sys/wait.h>
| #ifndef WEXITSTATUS
| # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
| #endif
| #ifndef WIFEXITED
| # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
| #endif
|
| int
| main (void)
| {
|   int s;
|   wait (&s);
|   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
|   ;
|   return 0;
| }
configure:14968: result: no

==== "./configure" output diff ====

--- build.log
+++ build-14.1.0-3.log
@@ -62,7 +62,7 @@
 checking for limits.h... yes
 checking for sys/select.h... no
 checking for stdbool.h... yes
-checking for stdckdint.h... no
+checking for stdckdint.h... yes
 checking for sys/random.h... no
 checking whether it is safe to define __EXTENSIONS__... yes
 checking whether _XOPEN_SOURCE should be defined... no
@@ -87,14 +87,14 @@
 checking whether C compiler handles -Wduplicated-cond... yes
 checking whether C compiler handles -Wextra... yes
 checking whether C compiler handles -Wformat-signedness... yes
-checking whether C compiler handles -Wflex-array-member-not-at-end... no
+checking whether C compiler handles -Wflex-array-member-not-at-end... yes
 checking whether C compiler handles -Winit-self... yes
 checking whether C compiler handles -Winvalid-pch... yes
 checking whether C compiler handles -Wlogical-op... yes
 checking whether C compiler handles -Wmissing-declarations... yes
 checking whether C compiler handles -Wmissing-include-dirs... yes
 checking whether C compiler handles -Wmissing-prototypes... yes
-checking whether C compiler handles -Wmissing-variable-declarations... no
+checking whether C compiler handles -Wmissing-variable-declarations... yes
 checking whether C compiler handles -Wnested-externs... yes
 checking whether C compiler handles -Wnull-dereference... yes
 checking whether C compiler handles -Wold-style-definition... yes
@@ -148,7 +148,7 @@
 checking for _oss_ioctl in -lossaudio... no
 checking for alsa >= 1.0.0... no
 checking for ADDR_NO_RANDOMIZE... no
-checking for sys/wait.h that is POSIX.1 compatible... yes
+checking for sys/wait.h that is POSIX.1 compatible... no
 checking for net/if.h... no
 checking for ifaddrs.h... no
 checking for net/if_dl.h... no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71036; Package emacs. (Sat, 18 May 2024 12:12:01 GMT) Full text and rfc822 format available.

Message #8 received at 71036 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Richard Copley <rcopley <at> gmail.com>
Cc: 71036 <at> debbugs.gnu.org
Subject: Re: bug#71036: build failure on Windows with MinGW-w64 GCC 14.1
Date: Sat, 18 May 2024 15:11:09 +0300
merge 71036 70889
thanks

> From: Richard Copley <rcopley <at> gmail.com>
> Date: Sat, 18 May 2024 12:55:02 +0100
> 
> Emacs fails to build on Windows with the current MSYS2 GCC 14.1 toolchain.

Yes, see bug#70889.




Merged 70889 70890 71036. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 18 May 2024 12:12:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 16 Jun 2024 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 60 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.