GNU bug report logs - #54766
[PATCH] 28.1.0; Native comp: Inherit working directory for sub processes (MS Windows)

Previous Next

Package: emacs;

Reported by: Robin Putters <robin.putters <at> keronic.com>

Date: Thu, 7 Apr 2022 14:59:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54766 in the body.
You can then email your comments to 54766 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#54766; Package emacs. (Thu, 07 Apr 2022 14:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robin Putters <robin.putters <at> keronic.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 07 Apr 2022 14:59:02 GMT) Full text and rfc822 format available.

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

From: Robin Putters <robin.putters <at> keronic.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: [PATCH] 28.1.0; Native comp: Inherit working directory for sub
 processes (MS Windows) 
Date: Thu, 7 Apr 2022 14:35:57 +0000
[Message part 1 (text/plain, inline)]
On MS Windows systems, where the Emacs executable is typically not in the PATH, creating the async sub processes for the native compiler will fail because they are started in a random working directory. The included patch will inherit the working directory from the parent emacs process by setting default-directory before creating the sub process.    

Robin Putters
[Pat2409.diff (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54766; Package emacs. (Thu, 07 Apr 2022 16:09:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robin Putters <robin.putters <at> keronic.com>
Cc: 54766 <at> debbugs.gnu.org
Subject: Re: bug#54766: [PATCH] 28.1.0;
 Native comp: Inherit working directory for sub processes (MS Windows)
Date: Thu, 07 Apr 2022 19:08:29 +0300
> From: Robin Putters <robin.putters <at> keronic.com>
> Date: Thu, 7 Apr 2022 14:35:57 +0000
> 
> On MS Windows systems, where the Emacs executable is typically not in the PATH, creating the async sub processes for the native compiler will fail because they are started in a random working directory. The included patch will inherit the working directory from the parent emacs process by setting default-directory before creating the sub process.    

Please tell more about the failure and its reasons.  The compilation
command does this:

                   (process (make-process
                             :name (concat "Compiling: " source-file)
                             :buffer (with-current-buffer
                                         (get-buffer-create
                                          comp-async-buffer-name)
                                       (setf buffer-read-only t)
			               (current-buffer))
                             :command (list
                                       (expand-file-name invocation-name
                                                         invocation-directory)
                                       "--batch" "-l" temp-file)

So the program we invoked already has its executable file name
expanded relative to invocation-directory, and we shouldn't need PATH
at all.  What am I missing?




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 08 Apr 2022 13:47:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54766; Package emacs. (Sat, 23 Apr 2022 17:17:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Robin Putters <robin.putters <at> keronic.com>, 54766 <at> debbugs.gnu.org
Subject: Re: bug#54766: [PATCH] 28.1.0; Native comp: Inherit working
 directory for sub processes (MS Windows) 
Date: Sat, 23 Apr 2022 19:16:04 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> So the program we invoked already has its executable file name
> expanded relative to invocation-directory, and we shouldn't need PATH
> at all.  What am I missing?

I don't understand either -- using nativecomp Emacs without having the
Emacs executable in PATH works just fine for me.

Robin, what was the actual error messages you were seeing?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54766; Package emacs. (Sun, 22 May 2022 11:28:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Robin Putters <robin.putters <at> keronic.com>, 54766 <at> debbugs.gnu.org
Subject: Re: bug#54766: [PATCH] 28.1.0; Native comp: Inherit working
 directory for sub processes (MS Windows) 
Date: Sun, 22 May 2022 13:27:22 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I don't understand either -- using nativecomp Emacs without having the
> Emacs executable in PATH works just fine for me.
>
> Robin, what was the actual error messages you were seeing?

More information was requested, but no response was given within a
month, so I'm closing this bug report.  If the problem still exists,
please respond to this email and we'll reopen the bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 54766 <at> debbugs.gnu.org and Robin Putters <robin.putters <at> keronic.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 22 May 2022 11:28:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 20 Jun 2022 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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