Subject: bug#70889: closed (Re: bug#70889: 29.3; GCC14.1 MinGW compilation error)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 19 May 2024 10:25:02 +0000

Your bug report

#70889: 29.3; GCC14.1 MinGW compilation error

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
70889: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70889
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#70889: 29.3; GCC14.1 MinGW compilation error
From: Eli Zaretskii <[email-masked]>
To: Cyril Arnould <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Sun, 19 May 2024 13:24:29 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Sun, 19 May 2024 12:06:19 +0200
> Cc: [email-masked], [email-masked]
> From: Cyril Arnould <[email-masked]>
> 
>  > Now done on the master branch.  People who use GCC 14 on Windows
>  > please test and report any problems you see.
> 
> Just updated, the following builds with no issues:
> 
> ./autogen.sh
> ./configure
> make

Thanks for testing, I'm therefore closing this bug.

Subject: 29.3; GCC14.1 MinGW compilation error
From: Cyril Arnould <[email-masked]>
To: [email-masked]
Date: Sun, 12 May 2024 09:29:02 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

I wanted to check how the MinGW related issues #63365 and #63752 behave
under GCC 14.1, however I did not get that far. Running the following:

git clone https://git.savannah.gnu.org/git/emacs.git
cd emacs
./autogen.sh
./configure
make

I get the error:

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
make[2]: Leaving directory '/e/git/emacs-debug-gcc14/emacs/src'
make[1]: *** [Makefile:554: src] Error 2
make[1]: Leaving directory '/e/git/emacs-debug-gcc14/emacs'
make[1]: Entering directory '/e/git/emacs-debug-gcc14/emacs'
***
*** "make all" failed with exit status 2.
***
*** You could try to:
*** - run "make bootstrap", which might fix the problem
*** - run "make V=1", which displays the full commands invoked by make,
***   to further investigate the problem
***
make[1]: *** [Makefile:418: advice-on-failure] Error 2
make[1]: Leaving directory '/e/git/emacs-debug-gcc14/emacs'
make: *** [Makefile:374: all] Error 2

Currently I'm on commit 67b1da215c9. According to the GCC 14 porting
page "It is no longer possible to call a function that has not been
declared", so I guess that's the issue here. I've noticed that in
src/syswait.c, <sys/wait.h> is only included if HAVE_SYS_WAIT_H is
defined, which it isn't. If I do include <sys/wait.h> nonetheless in
this file, the compilation continues.

For the record, I run into an internal compiler issue in thread.c
after that, but that's not on emacs to solve I guess.