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.bugs Subject: bug#49118: 28.0.50; Error: File error Opening output file Date: Sat, 19 Jun 2021 17:55:39 +0300 Message-ID: <838s35x5sk.fsf@gnu.org> References: <83a6nlx6uo.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6407"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49118@debbugs.gnu.org To: Manuel Uberti , Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 19 16:56:10 2021 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 1lucOH-0001Ua-VX for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Jun 2021 16:56:09 +0200 Original-Received: from localhost ([::1]:45836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lucOH-000466-1K for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Jun 2021 10:56:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lucOA-00045t-TR for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2021 10:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48717) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lucOA-00080I-Ln for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2021 10:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lucOA-0005Go-He for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2021 10:56: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: Sat, 19 Jun 2021 14:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49118 X-GNU-PR-Package: emacs Original-Received: via spool by 49118-submit@debbugs.gnu.org id=B49118.162411454120228 (code B ref 49118); Sat, 19 Jun 2021 14:56:02 +0000 Original-Received: (at 49118) by debbugs.gnu.org; 19 Jun 2021 14:55:41 +0000 Original-Received: from localhost ([127.0.0.1]:60263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucNp-0005GC-1h for submit@debbugs.gnu.org; Sat, 19 Jun 2021 10:55:41 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucNn-0005Fx-Bb for 49118@debbugs.gnu.org; Sat, 19 Jun 2021 10:55:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37692) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lucNg-0007dW-1U; Sat, 19 Jun 2021 10:55:32 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3096 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 1lucNf-0008Uy-M8; Sat, 19 Jun 2021 10:55:32 -0400 In-Reply-To: (message from Manuel Uberti on Sat, 19 Jun 2021 16:34:41 +0200) 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:208749 Archived-At: > Cc: 49118@debbugs.gnu.org > From: Manuel Uberti > Date: Sat, 19 Jun 2021 16:34:41 +0200 > > On 19/06/21 16:32, Eli Zaretskii wrote: > > What happens if you invoke the native-compilation like this: > > > > $ emacs -batch -l comp -f batch-native-compile /usr/local/share/emacs/28.0.50/lisp/time.el.gz > > > > Does this also fail, and if so, what error message(s) do you see? > > This is what I get: > > manuel@hathaway:~$ emacs -batch -l comp -f batch-native-compile > /usr/local/share/emacs/28.0.50/lisp/time.el.gz > uncompressing time.el.gz... > uncompressing time.el.gz...done > Debugger entered--Lisp error: (file-error > "/usr/local/share/emacs/28.0.50/lisp/time.el.gz" "Opening output file" "Cannot > overwrite file" "/usr/local/share/emacs/28.0.50/lisp/time.elc") > signal(file-error ("/usr/local/share/emacs/28.0.50/lisp/time.el.gz" "Opening > output file" "Cannot overwrite file" > "/usr/local/share/emacs/28.0.50/lisp/time.elc")) > comp--native-compile("/usr/local/share/emacs/28.0.50/lisp/time.el.gz") > batch-native-compile() > command-line-1(("-l" "comp" "-f" "batch-native-compile" > "/usr/local/share/emacs/28.0.50/lisp/time.el.gz")) > command-line() > normal-top-level() Thanks. Andrea, this means bug#48978 was not entirely fixed: we are still trying to write the *.elc files when native-compiling. Your last change prevented Emacs from trying to create a temporary file under /usr/share/emacs, but it didn't prevent the rest of byte-compile-file from trying to overwrite the original .elc file, which here causes us to signal an error. We need to avoid writing the .elc file entirely in this case, I think.