From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: MinGW build on master fails with Error 127 Date: Sat, 24 Dec 2022 18:08:10 +0100 Message-ID: <87cz8820hx.fsf@telefonica.net> References: <83wn6wr5oz.fsf@gnu.org> <0c9519c9-add7-9fb1-ac7f-2f20e1916d65@bluewin.ch> <83tu20r4y7.fsf@gnu.org> <01b7362d-7d60-3054-5590-d4dbbcda76d7@bluewin.ch> <83r0x4r490.fsf@gnu.org> <837cyh71ft.fsf@gnu.org> <832966a5-bd27-76f9-4757-a8c246eca416@bluewin.ch> <835ye06ex7.fsf@gnu.org> <87sfh424ya.fsf@telefonica.net> <83y1qw4x8w.fsf@gnu.org> <87o7rs22yn.fsf@telefonica.net> <83v8m04un9.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="9153"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 24 18:09:20 2022 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 1p981P-00029k-Nt for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Dec 2022 18:09:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p980R-0003zh-Og; Sat, 24 Dec 2022 12:08:19 -0500 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 1p980P-0003zS-F7 for emacs-devel@gnu.org; Sat, 24 Dec 2022 12:08:17 -0500 Original-Received: from relayout04-redir.e.movistar.es ([86.109.101.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p980N-0005cB-K4; Sat, 24 Dec 2022 12:08:17 -0500 Original-Received: from sky (91.red-81-39-16.dynamicip.rima-tde.net [81.39.16.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: 981711563@telefonica.net) by relayout04.e.movistar.es (Postfix) with ESMTPSA id 4NfVqZ4dz0zygt; Sat, 24 Dec 2022 18:08:10 +0100 (CET) In-Reply-To: <83v8m04un9.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Dec 2022 18:46:18 +0200") X-TnetOut-Country: IP: 81.39.16.91 | Country: ES X-TnetOut-Information: AntiSPAM and AntiVIRUS on relayout04 X-TnetOut-MsgID: 4NfVqZ4dz0zygt.A32DC X-TnetOut-SpamCheck: no es spam, clean X-TnetOut-From: ofv@wanadoo.es X-TnetOut-Watermark: 1672506491.00601@FwLRUxgidF5Ztibh7KWHew Received-SPF: softfail client-ip=86.109.101.204; envelope-from=ofv@wanadoo.es; helo=relayout04-redir.e.movistar.es X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301867 Archived-At: [Resending because messages posted through gmane take several hours to appear on the mailing list. Sorry for the duplicate.] Eli Zaretskii writes: > And as long as I have your attention: what about the switch to UCRT64? > Does Emacs need something in its Makefile's to specify linking against > MSVCRT, even though UCRT64 is the default? The information at > > https://www.msys2.org/news/#2022-10-29-changing-the-default-environment-from-mingw64-to-ucrt64 > > doesn't provide any details about that. See https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-emacs There is a patch specific for UCRT support. It's quite simple although the workaround for close_stream doesn't inspire confidence, hints that there might be subtle differences on the behavior of C runtime functions. This is the relevant commit message: commit 01be90ce74e3b69e7b03ab886d5f4ac59da0f646 Author: Christoph Reiter Date: Thu Jun 23 21:34:12 2022 +0200 emacs: some hacky patches to make it work on ucrt64 for both stdout and stderr fclose fail during atexit as if they were already closed. the function in theory has a workaround for that in that it will continue if errno is EBADF, but fclose doesn't set that on Windows. This shows at least what is missing/broken if upstream wants to have a look. Of course the Emacs UCRT build lacks the real-world testing that the Mingw-w64 one has, so we need to wait for bug reports. BTW, there is a patch for building with Clang on Windows.