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

To reply to this bug, email your comments to 79801 AT debbugs.gnu.org.

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.




This bug report was last modified 2 days ago.

Previous Next


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