From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#64226: 30.0.50; emacs-lisp-native-compile-and-load permission error Date: Sun, 25 Jun 2023 10:44:09 -0400 Message-ID: References: <87bkh734u7.fsf@gmail.com> <83pm5n33zz.fsf@gnu.org> <87bkh7ts5r.fsf@gmail.com> <83o7l7327u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11400"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: No Wayman , 64226@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 25 16:45:11 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 1qDQzH-0002oW-AJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Jun 2023 16:45:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDQzA-0003SA-B4; Sun, 25 Jun 2023 10:45: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 1qDQz8-0003Rk-0b for bug-gnu-emacs@gnu.org; Sun, 25 Jun 2023 10:45:02 -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 1qDQz7-0008OJ-NE for bug-gnu-emacs@gnu.org; Sun, 25 Jun 2023 10:45:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qDQz7-0002GZ-JP for bug-gnu-emacs@gnu.org; Sun, 25 Jun 2023 10:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Jun 2023 14:45: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.16877042718659 (code B ref 64226); Sun, 25 Jun 2023 14:45:01 +0000 Original-Received: (at 64226) by debbugs.gnu.org; 25 Jun 2023 14:44:31 +0000 Original-Received: from localhost ([127.0.0.1]:43223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDQyb-0002FX-CP for submit@debbugs.gnu.org; Sun, 25 Jun 2023 10:44:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDQyW-0002FH-MG for 64226@debbugs.gnu.org; Sun, 25 Jun 2023 10:44:28 -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 1qDQyH-0008KG-Gt; Sun, 25 Jun 2023 10:44:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=ZBYt5v2+mf/SvgMy4Kch4tNJGCxUVsJT3riILelBMHI=; b=P/rmIcb9+yCnF2JRvEhD dOy88F1/gtXCi7R6ycLujGfuZMEGsuvJlnAWph+t7Si4Amcvk6ys1DZKQiyNZH/jSnytHbDy0kN7x gFM3Eib8v8YIgJZGpM1URRrIINRqKmBDBPR1SEGnv9mlYIwYw9BW2JlAV+ytBYVm414SN4gyBv4/F WDCcLkIBWfEH/9hCAEwMCnJBAvg3Yj4piyHxpQiYjsJCUo343KOOZ/QCFYt3y0YW1w+of0nGmm0BK X6WFXeIwY4hsu79B5Ovv2CvjL/9WbiUZZqzaVWC56OZBBTSEITMVvkbHp3vQ7FaZYLcHhOWjTQ0Sh j3YhgtNpQSihyA==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1qDQyH-0000L4-87; Sun, 25 Jun 2023 10:44:09 -0400 In-Reply-To: <83o7l7327u.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Jun 2023 19:12:53 +0300") 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:264048 Archived-At: Eli Zaretskii writes: >> From: No Wayman >> Cc: Andrea Corallo , 64226@debbugs.gnu.org >> Date: Thu, 22 Jun 2023 11:44:33 -0400 >> >> 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? > > No, I don't think so, not with emacs-lisp-native-compile-and-load. > Andrea, am I right? We always invoke libgccjit in a subprocess, the difference between sync and async is: - in sync compilation we run all our compiler *but* libgccjit in process (libgccjit runs in a subprocess) - in async all the compilation computation is done in a sub process. The reason for running libgccjit always in a subprocess is that unfortunatelly it leaks memory. Best Regards Andrea