GNU bug report logs - #79801
31.0.50; Build fails for invalid SHELL in the environment

Previous Next

Package: emacs;

Reported by: Ulrich Müller <ulm <at> gentoo.org>

Date: Sun, 9 Nov 2025 15:08:01 UTC

Severity: normal

Found in version 31.0.50

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

To reply to this bug, email your comments to 79801 AT debbugs.gnu.org.
There is no need to reopen the bug first.

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#79801; Package emacs. (Sun, 09 Nov 2025 15:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ulrich Müller <ulm <at> gentoo.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 09 Nov 2025 15:08:02 GMT) Full text and rfc822 format available.

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

From: Ulrich Müller <ulm <at> gentoo.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Build fails for invalid SHELL in the environment
Date: Sun, 09 Nov 2025 16:07:00 +0100
Forwarding Gentoo bug <https://bugs.gentoo.org/965834>:

Building of Emacs fails when the SHELL environment variable points to a
non-existent file:

   '../src/emacs' -batch --no-site-file --no-site-lisp --eval "(setq load-prefer-newer t byte-compile-warnings 'all)" --eval "(setq org--inhibit-version-check t)"  -f batch-byte-compile org/org-timer.el

   In toplevel form:
   org/org-timer.el:42:11: Error: Searching for program: No such file or directory, /usr/bin/nonexistent
   make[3]: *** [Makefile:336: org/org-timer.elc] Error 1
   make[3]: Leaving directory '/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/lisp'
   make[2]: *** [Makefile:366: compile-main] Error 2
   make[2]: Leaving directory '/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/lisp'
   make[1]: *** [Makefile:529: lisp] Error 2
   make[1]: Leaving directory '/tmp/portage/app-editors/emacs-31.0.9999/work/emacs'

Of course, SHELL should normally point to something valid. Nevertheless,
it shouldn't leak into the build, especially when all Makefiles set the
variable to something well defined.

AFAICS the problem is triggered by this code in org/org-clock.el:

(defvar org-x11idle-exists-p
  ;; Check that x11idle exists.  But don't do that on DOS/Windows,
  ;; since the command definitely does NOT exist there, and invoking
  ;; COMMAND.COM on MS-Windows is a bad idea -- it hangs.
  (and (null (memq system-type '(windows-nt ms-dos)))
       (eq 0 (call-process-shell-command
              (format "command -v %s" org-clock-x11idle-program-name)))
       ;; Check that x11idle can retrieve the idle time
       ;; FIXME: Why "..-shell-command" rather than just `call-process'?
       (eq 0 (call-process-shell-command org-clock-x11idle-program-name))))

I wonder if the first call-process-shell-command could be replaced by
executable-find, and the second one by call-process (as the comment
above it says)?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79801; Package emacs. (Sun, 09 Nov 2025 15:21:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ulrich Müller <ulm <at> gentoo.org>
Cc: 79801 <at> debbugs.gnu.org
Subject: Re: bug#79801: 31.0.50;
 Build fails for invalid SHELL in the environment
Date: Sun, 09 Nov 2025 17:20:46 +0200
> From: Ulrich Müller <ulm <at> gentoo.org>
> Date: Sun, 09 Nov 2025 16:07:00 +0100
> 
> Forwarding Gentoo bug <https://bugs.gentoo.org/965834>:
> 
> Building of Emacs fails when the SHELL environment variable points to a
> non-existent file:
> 
>    '../src/emacs' -batch --no-site-file --no-site-lisp --eval "(setq load-prefer-newer t byte-compile-warnings 'all)" --eval "(setq org--inhibit-version-check t)"  -f batch-byte-compile org/org-timer.el
> 
>    In toplevel form:
>    org/org-timer.el:42:11: Error: Searching for program: No such file or directory, /usr/bin/nonexistent
>    make[3]: *** [Makefile:336: org/org-timer.elc] Error 1
>    make[3]: Leaving directory '/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/lisp'
>    make[2]: *** [Makefile:366: compile-main] Error 2
>    make[2]: Leaving directory '/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/lisp'
>    make[1]: *** [Makefile:529: lisp] Error 2
>    make[1]: Leaving directory '/tmp/portage/app-editors/emacs-31.0.9999/work/emacs'
> 
> Of course, SHELL should normally point to something valid. Nevertheless,
> it shouldn't leak into the build, especially when all Makefiles set the
> variable to something well defined.
> 
> AFAICS the problem is triggered by this code in org/org-clock.el:
> 
> (defvar org-x11idle-exists-p
>   ;; Check that x11idle exists.  But don't do that on DOS/Windows,
>   ;; since the command definitely does NOT exist there, and invoking
>   ;; COMMAND.COM on MS-Windows is a bad idea -- it hangs.
>   (and (null (memq system-type '(windows-nt ms-dos)))
>        (eq 0 (call-process-shell-command
>               (format "command -v %s" org-clock-x11idle-program-name)))
>        ;; Check that x11idle can retrieve the idle time
>        ;; FIXME: Why "..-shell-command" rather than just `call-process'?
>        (eq 0 (call-process-shell-command org-clock-x11idle-program-name))))
> 
> I wonder if the first call-process-shell-command could be replaced by
> executable-find, and the second one by call-process (as the comment
> above it says)?

This is an Org-specific problem, so please report it to the Org
developers first.  It should be reported here only if the Org
developers say their analysis concludes this is a core Emacs problem.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79801; Package emacs. (Sat, 15 Nov 2025 08:27:01 GMT) Full text and rfc822 format available.

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

From: Ulrich Müller <ulm <at> gentoo.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Ulrich Müller <ulm <at> gentoo.org>, 79801 <at> debbugs.gnu.org
Subject: Re: bug#79801: 31.0.50; Build fails for invalid SHELL in the
 environment
Date: Sat, 15 Nov 2025 09:25:51 +0100
>>>>> On Sun, 09 Nov 2025, Eli Zaretskii wrote:

> This is an Org-specific problem, so please report it to the Org
> developers first.  It should be reported here only if the Org
> developers say their analysis concludes this is a core Emacs problem.

Reported to orgmode ML:
https://lists.gnu.org/archive/html/emacs-orgmode/2025-11/msg00221.html

Patch provided here:
https://lists.gnu.org/archive/html/emacs-orgmode/2025-11/msg00235.html

One week and one org release later, no reply to either. So, could this
be added to Emacs (as the bug breaks the Emacs build), or should I add
it as a distro specific patch?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79801; Package emacs. (Sat, 15 Nov 2025 11:25:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ulrich Müller <ulm <at> gentoo.org>, Ihor Radchenko
 <yantar92 <at> posteo.net>
Cc: 79801 <at> debbugs.gnu.org
Subject: Re: bug#79801: 31.0.50; Build fails for invalid SHELL in the
 environment
Date: Sat, 15 Nov 2025 13:24:32 +0200
> From: Ulrich Müller <ulm <at> gentoo.org>
> Cc: Ulrich Müller <ulm <at> gentoo.org>,  79801 <at> debbugs.gnu.org
> Date: Sat, 15 Nov 2025 09:25:51 +0100
> 
> >>>>> On Sun, 09 Nov 2025, Eli Zaretskii wrote:
> 
> > This is an Org-specific problem, so please report it to the Org
> > developers first.  It should be reported here only if the Org
> > developers say their analysis concludes this is a core Emacs problem.
> 
> Reported to orgmode ML:
> https://lists.gnu.org/archive/html/emacs-orgmode/2025-11/msg00221.html
> 
> Patch provided here:
> https://lists.gnu.org/archive/html/emacs-orgmode/2025-11/msg00235.html
> 
> One week and one org release later, no reply to either. So, could this
> be added to Emacs (as the bug breaks the Emacs build), or should I add
> it as a distro specific patch?

Let's first ping Ihor and ask him what would he prefer us to do in
this matter.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 15 Nov 2025 17:10:01 GMT) Full text and rfc822 format available.

Notification sent to Ulrich Müller <ulm <at> gentoo.org>:
bug acknowledged by developer. (Sat, 15 Nov 2025 17:10:01 GMT) Full text and rfc822 format available.

Message #19 received at 79801-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: ulm <at> gentoo.org
Cc: 79801-done <at> debbugs.gnu.org
Subject: Re: bug#79801: 31.0.50;
 Build fails for invalid SHELL in the environment
Date: Sat, 15 Nov 2025 19:09:23 +0200
> Cc: 79801 <at> debbugs.gnu.org
> Date: Sun, 09 Nov 2025 17:20:46 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > From: Ulrich Müller <ulm <at> gentoo.org>
> > Date: Sun, 09 Nov 2025 16:07:00 +0100
> > 
> > Forwarding Gentoo bug <https://bugs.gentoo.org/965834>:
> > 
> > Building of Emacs fails when the SHELL environment variable points to a
> > non-existent file:
> > 
> >    '../src/emacs' -batch --no-site-file --no-site-lisp --eval "(setq load-prefer-newer t byte-compile-warnings 'all)" --eval "(setq org--inhibit-version-check t)"  -f batch-byte-compile org/org-timer.el
> > 
> >    In toplevel form:
> >    org/org-timer.el:42:11: Error: Searching for program: No such file or directory, /usr/bin/nonexistent
> >    make[3]: *** [Makefile:336: org/org-timer.elc] Error 1
> >    make[3]: Leaving directory '/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/lisp'
> >    make[2]: *** [Makefile:366: compile-main] Error 2
> >    make[2]: Leaving directory '/tmp/portage/app-editors/emacs-31.0.9999/work/emacs/lisp'
> >    make[1]: *** [Makefile:529: lisp] Error 2
> >    make[1]: Leaving directory '/tmp/portage/app-editors/emacs-31.0.9999/work/emacs'
> > 
> > Of course, SHELL should normally point to something valid. Nevertheless,
> > it shouldn't leak into the build, especially when all Makefiles set the
> > variable to something well defined.
> > 
> > AFAICS the problem is triggered by this code in org/org-clock.el:
> > 
> > (defvar org-x11idle-exists-p
> >   ;; Check that x11idle exists.  But don't do that on DOS/Windows,
> >   ;; since the command definitely does NOT exist there, and invoking
> >   ;; COMMAND.COM on MS-Windows is a bad idea -- it hangs.
> >   (and (null (memq system-type '(windows-nt ms-dos)))
> >        (eq 0 (call-process-shell-command
> >               (format "command -v %s" org-clock-x11idle-program-name)))
> >        ;; Check that x11idle can retrieve the idle time
> >        ;; FIXME: Why "..-shell-command" rather than just `call-process'?
> >        (eq 0 (call-process-shell-command org-clock-x11idle-program-name))))
> > 
> > I wonder if the first call-process-shell-command could be replaced by
> > executable-find, and the second one by call-process (as the comment
> > above it says)?
> 
> This is an Org-specific problem, so please report it to the Org
> developers first.  It should be reported here only if the Org
> developers say their analysis concludes this is a core Emacs problem.

The problem was fixed in Org, so I'm closing this bug.




This bug report was last modified 21 days ago.

Previous Next


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