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#64226: 30.0.50; emacs-lisp-native-compile-and-load permission error Date: Thu, 22 Jun 2023 18:34:24 +0300 Message-ID: <83pm5n33zz.fsf@gnu.org> References: <87bkh734u7.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18245"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64226@debbugs.gnu.org To: No Wayman , Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 22 17:35:25 2023 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 1qCMLF-0004V1-BN for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Jun 2023 17:35:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCML1-00062H-Gu; Thu, 22 Jun 2023 11:35:11 -0400 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 1qCMKs-0005zh-HD for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2023 11:35:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qCMKs-0007qT-7X for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2023 11:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qCMKr-0000EV-M1 for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2023 11:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jun 2023 15:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64226 X-GNU-PR-Package: emacs Original-Received: via spool by 64226-submit@debbugs.gnu.org id=B64226.1687448065837 (code B ref 64226); Thu, 22 Jun 2023 15:35:01 +0000 Original-Received: (at 64226) by debbugs.gnu.org; 22 Jun 2023 15:34:25 +0000 Original-Received: from localhost ([127.0.0.1]:36516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCMKH-0000DR-Bq for submit@debbugs.gnu.org; Thu, 22 Jun 2023 11:34:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCMKF-0000DE-Ea for 64226@debbugs.gnu.org; Thu, 22 Jun 2023 11:34:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCMK9-0007RO-NI; Thu, 22 Jun 2023 11:34:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nHWGys8zszAR7NFDKCfWDIcjagJ4tHSsbrOL6oqEk8Y=; b=XCzeD6uJ/l1o D9gWMR8H+ln3MyUMbIYHv+v6V3DGWJ1reD1x8O5By65NRmfIiHolQneUyfeLjgmYXUPtiVdrnOLl6 DGcI5/cz0/ccrccz0vElC/9Re+5/qBKNEm5i88Zz8rZeODkeECSSqKG2WA9H0Vv6F+0yEMP4kRyzr Ljwyxy6Jn7fWZYuY2IHEsNW3sRhlYrb7JjY5Iu8ZJ1j4aA6z8xYzen6QuTVTUFHy90xv2dy7NyT+D rYcP117HVI+fnFhZllIDGXRJkPkKJcPN9yjSiLJMjIpd2xKsNLqWsaNt1sV96GwdJLCzg1tNuNfb3 g8kr62Fa5UVGZRER5tp4sg==; Original-Received: from [87.69.77.57] (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 1qCMK5-0001Oa-6J; Thu, 22 Jun 2023 11:34:16 -0400 In-Reply-To: <87bkh734u7.fsf@gmail.com> (message from No Wayman on Wed, 21 Jun 2023 12:58:40 -0400) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263886 Archived-At: > From: No Wayman > Date: Wed, 21 Jun 2023 12:58:40 -0400 > > > To reproduce: > > 1. Find an elisp file located in $DIR which user has permission to > write to. > (in the following backtrace, the file being compiled was located > at $HOME/.emacs.d/elpaca/builds/elpaca/elpaca.el) > 2. M-x emacs-lisp-native-compile-and-load > 3. Observer the following error: > > Error: permission-denied (\"Creating file with prefix\" > \"Permission denied\" > \"/usr/lib/emacs/30.0.50/native-lisp/30.0.50-58a66af6/elpaca-0646d6fc-1256ece5\") > mapbacktrace(#f(compiled-function (evald func args flags) > #)) > debug-early-backtrace() > debug-early(error (permission-denied \"Creating file with > prefix\" \"Permission denied\" > \"/usr/lib/emacs/30.0.50/native-lisp/30.0.50-58a66af6/elpaca-0646d6fc-1256ece5\")) > make-temp-file(\"/usr/lib/emacs/30.0.50/native-lisp/30.0.50-58a66af6/elpaca-0646d6fc-1256ece5\" > nil \".eln.tmp\" nil) > comp--compile-ctxt-to-file(\"/usr/lib/emacs/30.0.50/native-lisp/30.0.50-58a66af6/elpaca-0646d6fc-1256ece5.eln\") > comp-compile-ctxt-to-file(\"/usr/lib/emacs/30.0.50/native-lisp/30.0.50-58a66af6/elpaca-0646d6fc-1256ece5.eln\") > comp-final1() > load-with-code-conversion(\"/tmp/emacs-int-comp-elpaca-0646d6fc-1256ece5-73Dpd0.el\" > \"/tmp/emacs-int-comp-elpaca-0646d6fc-1256ece5-73Dpd0.el\" nil > t) > command-line-1((\"-l\" > \"/tmp/emacs-int-comp-elpaca-0646d6fc-1256ece5-73Dpd0.el\")) > command-line() > normal-top-level() > > I would expect compiling this to not signal an error for a file I > have permission to write. Is this in "emacs -Q"? If not, please see if "emacs -Q" reproduces the problem. I also don't understand why the backtrace above seems to imply that you invoked Emacs like this: emacs -l /tmp/emacs-int-comp-elpaca-0646d6fc-1256ece5-73Dpd0.el IOW, the backtrace doesn't show invocation of emacs-lisp-native-compile-and-load, it shows the attempt to load an already-compiled .eln file. What am I missing? I added Andrea to this discussion. If, in "emacs -Q", you visit the source file, that is $HOME/.emacs.d/elpaca/builds/elpaca/elpaca.el and then type M-: (native-compile buffer-file-name) RET what file name do you see in the echo-area after the compilation finishes?