From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#71036: build failure on Windows with MinGW-w64 GCC 14.1 Date: Sat, 18 May 2024 12:55:02 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8427"; mail-complaints-to="usenet@ciao.gmane.io" To: 71036@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 18 13:56:25 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s8Ifo-0001zT-Pj for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 May 2024 13:56:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8IfR-0003ah-Sp; Sat, 18 May 2024 07:56:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8IfP-0003Yn-R1 for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 07:56:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s8IfP-0007SX-Fu for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 07:55:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8IfR-00058K-QN for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 07:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 May 2024 11:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71036 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171603334119722 (code B ref -1); Sat, 18 May 2024 11:56:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 May 2024 11:55:41 +0000 Original-Received: from localhost ([127.0.0.1]:33065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8If7-000582-4R for submit@debbugs.gnu.org; Sat, 18 May 2024 07:55:41 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8If4-00057w-0t for submit@debbugs.gnu.org; Sat, 18 May 2024 07:55:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8Iez-0003J2-VD for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 07:55:34 -0400 Original-Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s8Iey-0007NW-1M for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 07:55:33 -0400 Original-Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-43e4020db92so9540871cf.0 for ; Sat, 18 May 2024 04:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716033330; x=1716638130; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=bqZH0FLMKubEQECq7pDqbgoMEuu8WhmMHRrHP7AEQos=; b=Zn/nULP155Ri8bpc1MsUS2Uy10oEbeHLpQeo1V7cz2RKB7mB+d2/q21tI4Kwkp6K/a bESXRD4pd+pjFBTnF1Y2R13txw5ob7m6zFGoIkHEwZoJO+60+MbhOfvCTLCDcgzdHklJ MKgHN5u5aKJ9lNKdQOT4IDVeLDXYsKirXU5tNOH4a3d9iph+O7M1zhRWMT9+UEBjsVkW o1XmBaD9+KDr+0daQieOnMhv5CB0fR3tkQwGifLKj21WzcwzxANeUhYkIXSio9aD0wVc 9TCyQCQTDXff4C1jbBDqduSc+faTo6knJy7d21B88qoYX6eh3HjKcN2GUzN6tChdXJiv jbQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716033330; x=1716638130; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=bqZH0FLMKubEQECq7pDqbgoMEuu8WhmMHRrHP7AEQos=; b=Cax9kHYfZW2lJvh8UefhNtLN1IRAB9DRbM6VfK+/prQjFC+izJJUTM4o71R/usBMNU Zvb/bhj+QKxjVyueTtESCf0zbpRmxOlKAkoOfBzF1o9NU3wh86asUJ82CgGnhY8fLrTt MRP3enqMMrzKJi84PYKxQHq3/lqn8iGsz5xt7U7dR+LupmhGCGsWHKWo3ykgba9SLMkn e9DxZMJ2cfEiSc7MlzFJV5kmiG3DITcz8QZARnw0XygTa6Psc3fMxQryLporWTqTCNd6 B19ESYls9VsB1vpQlV4scbbOwvaL3zOXagw7GKs6pBw2s2791iO3wbYA6AERK6mQ9rb/ wnEA== X-Gm-Message-State: AOJu0Yzu5hgquuxvjzaLNYx0BCh2QWGcinW34rEv8pHYxoqeoNESSFDf K4CTOA2SfsIckFvGnkpvcSif5c9Kcn0aV4HA5quFbTFITyBWWliO9seWKktOq/ud/y88Ek+wyNo 95PHLKh0j6PqwcIYbuXa2nl5OuafHUA== X-Google-Smtp-Source: AGHT+IFDV4wtUu7TPdyUP7oHjGuz/q6U0MENzGQSjHLYA2mnC9KTecthVCHJ03kSsgiBRSlpAHTOg/IgvcqdlYJEAMU= X-Received: by 2002:ac8:5783:0:b0:43d:ea13:4331 with SMTP id d75a77b69052e-43dfdaabde4mr241240221cf.18.1716033330208; Sat, 18 May 2024 04:55:30 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::836; envelope-from=rcopley@gmail.com; helo=mail-qt1-x836.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285328 Archived-At: 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 . 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 . ==== 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@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 | #include | #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