From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: Current master doesn't build on Win10 Date: Sat, 23 Oct 2021 00:55:36 +0100 Message-ID: <86o87glimf.fsf@gmail.com> References: <86mtn1nkz6.fsf@gnu.org> <838ryl6nff.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16348"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (windows-nt) To: emacs-devel@gnu.org Cancel-Lock: sha1:MQUMTVDcgR/+lafX/7lr3w0TPt8= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 23 01:56:46 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 1me4P0-00043a-DL for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Oct 2021 01:56:46 +0200 Original-Received: from localhost ([::1]:57550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1me4Oy-00017w-O2 for ged-emacs-devel@m.gmane-mx.org; Fri, 22 Oct 2021 19:56:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1me4O8-0008Ed-JD for emacs-devel@gnu.org; Fri, 22 Oct 2021 19:55:52 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:37156) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1me4O5-0000KY-Ke for emacs-devel@gnu.org; Fri, 22 Oct 2021 19:55:51 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1me4O2-0002tw-14 for emacs-devel@gnu.org; Sat, 23 Oct 2021 01:55:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:277591 Archived-At: On Fri 22 Oct 2021, Eli Zaretskii wrote: >> From: Arash Esbati >> Date: Fri, 22 Oct 2021 17:21:49 +0200 >> >> current master (commit f7a2ff3b) doesn't build with Msys2. The message >> is: >> >> --8<---------------cut here---------------start------------->8--- >> make[1]: Entering directory '/z/pathto/emacs/lib-src' >> CC ntlib.o >> RC emacsclient.res >> CC pop.o >> In file included from z:/pathto/msys64/mingw64/x86_64-w64-mingw32/include/guiddef.h:154, >> from z:/pathto/msys64/mingw64/x86_64-w64-mingw32/include/winnt.h:635, >> from z:/pathto/msys64/mingw64/x86_64-w64-mingw32/include/minwindef.h:163, >> from z:/pathto/msys64/mingw64/x86_64-w64-mingw32/include/windef.h:9, >> from z:/pathto/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:69, >> from ntlib.c:23: >> ../lib/string.h:965:1: error: expected ',' or ';' before '_GL_ATTRIBUTE_MALLOC' >> 965 | _GL_FUNCDECL_SYS (strdup, char *, >> | ^~~~~~~~~~~~~~~~ >> make[1]: *** [Makefile:418: ntlib.o] Error 1 >> make[1]: Leaving directory '/z/pathto/emacs/lib-src' >> --8<---------------cut here---------------end--------------->8--- >> >> I'm not sure this is an Emacs issue or not. GCC 11.2 landed also today >> on my HD. Can others reproduce this? > > lib/string.h is a Gnulib header, so I suggest to report this to > bug-gnulib@gnu.org. Or maybe it's some problem with MinGW64 headers > (did that get updated as well recently?). In any case, I just rebuilt > the relevant files, and saw no problem (I'm a happy user of GCC 9.2.0). I see this too. It seems to be an issue with gnulib and GCC 11. Commenting out this hunk from lib/string.in.h L456 works around the problem. # if __GNUC__ >= 11 && !defined strdup /* For -Wmismatched-dealloc: Associate strdup with free or rpl_free. */ _GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); # endif Hopefully Paul Eggert will be along soon to come up with a proper fix in gnulib. AndyM