GNU bug report logs - #64226
30.0.50; emacs-lisp-native-compile-and-load permission error

Previous Next

Package: emacs;

Reported by: No Wayman <iarchivedmywholelife <at> gmail.com>

Date: Thu, 22 Jun 2023 15:17:01 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 64226 <at> debbugs.gnu.org (full text, mbox):

From: No Wayman <iarchivedmywholelife <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Andrea Corallo <acorallo <at> gnu.org>, 64226 <at> debbugs.gnu.org
Subject: Re: bug#64226: 30.0.50; emacs-lisp-native-compile-and-load
 permission error
Date: Thu, 22 Jun 2023 11:44:33 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: No Wayman <iarchivedmywholelife <at> gmail.com>
>> 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) 
>>   #<bytecode 0x835cf36bbae8692>))
>>   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) 
 #<bytecode 0x70d6f07f3ae8645>))
 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.





This bug report was last modified 1 year and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.