From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: No Wayman Newsgroups: gmane.emacs.bugs Subject: bug#64226: 30.0.50; emacs-lisp-native-compile-and-load permission error Date: Thu, 22 Jun 2023 11:44:33 -0400 Message-ID: <87bkh7ts5r.fsf@gmail.com> References: <87bkh734u7.fsf@gmail.com> <83pm5n33zz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10178"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.11.6; emacs 30.0.50 Cc: Andrea Corallo , 64226@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 22 17:49:15 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 1qCMYc-0002Og-Rs for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Jun 2023 17:49:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCMYS-0000Do-Bt; Thu, 22 Jun 2023 11:49:04 -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 1qCMYQ-0000DY-Tw for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2023 11:49:03 -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 1qCMYQ-0002rJ-Li for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2023 11:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qCMYQ-0000hk-HA for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2023 11:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: No Wayman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jun 2023 15:49:02 +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.16874488932498 (code B ref 64226); Thu, 22 Jun 2023 15:49:02 +0000 Original-Received: (at 64226) by debbugs.gnu.org; 22 Jun 2023 15:48:13 +0000 Original-Received: from localhost ([127.0.0.1]:36535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCMXd-0000eB-8O for submit@debbugs.gnu.org; Thu, 22 Jun 2023 11:48:13 -0400 Original-Received: from mail-qt1-f180.google.com ([209.85.160.180]:58671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCMXb-0000dT-FH for 64226@debbugs.gnu.org; Thu, 22 Jun 2023 11:48:11 -0400 Original-Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-3fdec2ed972so44814721cf.1 for <64226@debbugs.gnu.org>; Thu, 22 Jun 2023 08:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687448886; x=1690040886; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=4KdKjmAl8UwpAFuTii8sH0pyV23/NeR4OYxgaU3DGSQ=; b=jjZGu2AsK7KYaN9YQBGwT1huknW+3OVoaZVDOnQKCukyysSctMUjXb8EH1uhW/8POt bA5lVadXIE1fUwmCSDzv5xK/OtcdOiQjU3wOOR7XQd5EzEanAc8YKE3e5Ib5jU2tHQCD pgzc0YaTdQV4DK1OUwA7I2e/Sc/vf7FGs9H0cNEz4T2MCWURHgfAyAVx6HIPpgvzJgAH FNEzCoGmWpt/8mrMJMhqmASNI57uH+m9Yxf6j79bZ1/Tpne8X2rfPbZ6ybtu+eZaaxTq 8VoQup927wJPL0ffQjty7o1n1Juav5QMoNXEHU6WZA4/zdGsuySJJyQJt3kMVCpWfWg0 SG4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687448886; x=1690040886; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4KdKjmAl8UwpAFuTii8sH0pyV23/NeR4OYxgaU3DGSQ=; b=DCrpy5EHcmmEtJpZ2bF5sJTJQAslhvtXr9NJrSAQcOVB1rMBUi9Xj1Ko1r2NvNUyic qwBZ7M0jdoNdWNdCewMyg7KfYjml1S1yCeKXgx8H13geWHH42BXI2jPrx16Hud1c6vCF Q82p3p6cN5a83AH7hWAlK9QE8WbBqIkYydg1cCL8feFqGqnssZVL6UCOBH2hbt90uXel Ak9JTBnbRdvy00bUrDCNOqG6eaq8rlk3eFDACHBHO+rXfDfgl+cye5pgHYiOAxzJJMAH 95gYIC81SyTG5onx1P91XifmzWPrgyJtsVISuC4rsj/3X9IG8XL5iJDvjsyT3cdiw9BK y19Q== X-Gm-Message-State: AC+VfDwebgtIY48Q8A8qnYlKNMvicjvLyqmPnxA37P7D/o1S1bd0Ot81 3KND3xXWuaS12Rb96A51oOOqpVgSNIJNGg== X-Google-Smtp-Source: ACHHUZ6pzOXtQSHyfiVKMRmzFWC8gSwtjwTfj2jM9qY9JaWx2PDfrwW1Yozxa0MfHSoKWVpimUKkkw== X-Received: by 2002:a05:622a:1d4:b0:3f3:97c9:dff0 with SMTP id t20-20020a05622a01d400b003f397c9dff0mr24017707qtw.12.1687448885572; Thu, 22 Jun 2023 08:48:05 -0700 (PDT) Original-Received: from laptop ([2601:84:847f:c697:2d4:9eff:feb6:970c]) by smtp.gmail.com with ESMTPSA id fg26-20020a05622a581a00b003f86bc1753bsm3728282qtb.80.2023.06.22.08.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 08:48:05 -0700 (PDT) In-reply-to: <83pm5n33zz.fsf@gnu.org> 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:263888 Archived-At: Eli Zaretskii writes: >> 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 have reproduced from emacs -Q as well. Same error as above: Compiling /home/n/.emacs.d/elpaca/repos/elpaca/elpaca.el...done comp--native-compile: Native compiler error: "/home/n/.emacs.d/elpaca/repos/elpaca/elpaca.el", "Compiling /usr/lib/emacs/30.0.50/native-lisp/30.0.50-58a66af6/elpaca-0646d6fc-1256ece5.eln... Creating file with prefix: Permission denied, /usr/lib/emacs/30.0.50/native-lisp/30.0.50-58a66af6/elpaca-0646d6fc-1256ece5 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-oSdhiB.el\" \"/tmp/emacs-int-comp-elpaca-0646d6fc-1256ece5-oSdhiB.el\" nil t) command-line-1((\"-l\" \"/tmp/emacs-int-comp-elpaca-0646d6fc-1256ece5-oSdhiB.el\")) command-line() normal-top-level() > 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. The compilation takes place in a subprocess, no? That's probably how the subprocess is invoked.