From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#42095: 28.0.50; Build fails on Windows/MinGW64 Date: Sun, 28 Jun 2020 18:48:42 +0300 Message-ID: <83bll32ntx.fsf@gnu.org> References: <878sg819n2.fsf@klingenberg.no> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="12954"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Peder O. Klingenberg" , 42095@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 28 17:50:15 2020 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 1jpZZP-0003Gk-3P for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Jun 2020 17:50:15 +0200 Original-Received: from localhost ([::1]:50040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpZZO-0000Vw-3p for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Jun 2020 11:50:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpZZD-0000Vi-3c for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2020 11:50:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35259) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jpZZC-00011C-Qk for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2020 11:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jpZZC-0004N8-Oa for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2020 11:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jun 2020 15:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42095 X-GNU-PR-Package: emacs Original-Received: via spool by 42095-submit@debbugs.gnu.org id=B42095.159335934516703 (code B ref 42095); Sun, 28 Jun 2020 15:50:02 +0000 Original-Received: (at 42095) by debbugs.gnu.org; 28 Jun 2020 15:49:05 +0000 Original-Received: from localhost ([127.0.0.1]:46799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpZYH-0004LK-60 for submit@debbugs.gnu.org; Sun, 28 Jun 2020 11:49:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpZYE-0004Kp-4J for 42095@debbugs.gnu.org; Sun, 28 Jun 2020 11:49:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44167) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpZY7-0000vZ-Lr; Sun, 28 Jun 2020 11:48:55 -0400 Original-Received: from [176.228.60.248] (port=2971 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jpZY6-0006m5-Qy; Sun, 28 Jun 2020 11:48:55 -0400 In-Reply-To: <878sg819n2.fsf@klingenberg.no> (peder@klingenberg.no) 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" Xref: news.gmane.io gmane.emacs.bugs:182462 Archived-At: > From: "Peder O. Klingenberg" > Date: Sat, 27 Jun 2020 23:28:17 +0200 > > I wanted to refresh my Windows Emacs build tonight, for the first time > in some months. I pulled up to > 5ce5cf643840cd6efd25d987bc5b6f12478c50a6 by Paul Eggert and ran make -j4 > as usual. The build failed. Likewise make bootstrap. The error: > > CC open.o > open.c: In function 'sys_open': > open.c:127:48: error: 'O_CLOEXEC' undeclared (first use in this function) > 127 | flags & ~(have_cloexec < 0 ? O_CLOEXEC : 0), mode); > | ^~~~~~~~~ > open.c:127:48: note: each undeclared identifier is reported only once for each function it appears in > > That line was changed a few hours ago, in commit > 118c07e02e939c9f52688091509d4bff2a897032, also by Paul. Thanks for reporting this. lib/open.c should not be compiled in the MinGW build. Paul, this problem should be solved in Gnulib, because its open.m4 unconditionally forces lib/open.c to be compiled in the MinGW build: case "$host_os" in mingw* | pw*) REPLACE_OPEN=1 ;; The latest changes made this code run even in the MinGW build, not sure why (perhaps because 'getrandom' uses 'open'?). Emacs cannot use Gnulib's 'open' (or any other function that takes file names and operates on files), because Gnulib on Windows doesn't support UTF-8 encoded file names, which Emacs needs. We have our own replacements for 'open' and its ilk. That is why nt/gnulib-cfg.mk says OMIT_GNULIB_MODULE_open = true But this is no longer enough, since these latest changes. Please provide a way to reliably avoid compiling lib/open.c on Windows. I needed to hack configure to make it build here. Thanks. P.S. The 'getrandom' module had other MinGW-related problems, some of which I fixed in master, and others were reported to the Gnulib mailing list: https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00059.html