From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Building latest on Windows: error in unistd.h Date: Wed, 22 Sep 2021 20:33:15 +0300 Message-ID: <834kacwm5g.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27982"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Gary Oberbrunner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 22 19:35:02 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mT697-000718-FY for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Sep 2021 19:35:01 +0200 Original-Received: from localhost ([::1]:38738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mT695-0001Rv-PU for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Sep 2021 13:34:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mT67R-0007t3-Dj for emacs-devel@gnu.org; Wed, 22 Sep 2021 13:33:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44580) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mT67Q-0001Fd-Mt; Wed, 22 Sep 2021 13:33:16 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2186 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mT67Q-0001pe-9l; Wed, 22 Sep 2021 13:33:16 -0400 In-Reply-To: (message from Gary Oberbrunner on Wed, 22 Sep 2021 13:01:22 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275326 Archived-At: > From: Gary Oberbrunner > Date: Wed, 22 Sep 2021 13:01:22 -0400 > > I just updated to the latest master (eb42c4b099c171) and did make bootstrap in my mingw64 terminal > (Windows 10), but I get the following "Please include config.h first" error: > > make[2]: Entering directory '/c/Users/garyo/src/emacs/emacs/lib-src' > CC ntlib.o > In file included from ../lib/time.h:44, > from ntlib.c:26: > ../lib/unistd.h:660:3: error: #error "Please include config.h first." > 660 | #error "Please include config.h first." > | ^~~~~ > ../lib/unistd.h:662:24: error: expected ';' before 'extern' > 662 | _GL_INLINE_HEADER_BEGIN > | ^ > | ; > In file included from ../lib/time.h:47, > from ntlib.c:26: > C:/msys64/mingw64/x86_64-w64-mingw32/include/time.h:24:9: error: expected '=', ',', ';', 'asm' or > '__attribute__' before '#pragma' > 24 | #pragma pack(push,_CRT_PACKING) > | ^~~~ > make[2]: *** [Makefile:418: ntlib.o] Error 1 > > My configure line looks like this: > > ./configure --with-jpeg --with-xpm --with-png --with-tiff --with-rsvg --with-xml2 --with-gnutls > --without-imagemagick --prefix=c:/emacs/emacs-trunk-2021 > > Something missing/misconfigured on my end I guess? How come lib/unistd.h is at all generated and used in your MinGW build? It isn't supposed to be, we use unistd.h that comes with MinGW. Please try to figure out why configure decided to generate lib/unistd.h. Crystal ball says you updated your MinGW64 headers not long ago, and something there causes that.