Summary: | ~app-editors/emacs-24.4: Error: Searching for program: no such file or directory, /bin/zsh (seen with app-emacs/auctex-11.88) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Juergen Rose <rose> |
Component: | Current packages | Assignee: | GNU Emacs project <gnu-emacs> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | tex |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
/var/tmp/portage/app-emacs/auctex-11.88/work/auctex-11.88/config.status |
Description
Juergen Rose
2015-02-18 21:13:11 UTC
After exporting SHELL=/bin/bash the issue disappeared. Can you attach config.status please? Where does your /bin/sh point to, and what value has the SHELL environment variable? (In reply to Ulrich Müller from comment #2) > Can you attach config.status please? > Where does your /bin/sh point to, and what value has the SHELL environment > variable? I booted with systemrescuecd and changerooted to /mnt/gentoo (with 'chroot /mnt/gentoo /bin/bash'). So SHELL=/bin/zsh comes from systemrescuecd: In the changerooted environment I have: sysresccd boot # ls -l /bin/sh lrwxrwxrwx 1 root root 4 Feb 20 20:36 /bin/sh -> bash sysresccd boot # echo $SHELL /bin/zsh sysresccd boot # find /var/tmp/portage/app-emacs/ -name config.status /var/tmp/portage/app-emacs/auctex-11.88/work/auctex-11.88/config.status /var/tmp/portage/app-emacs/auctex-11.88/work/auctex-11.88/preview/config.status sysresccd boot # grep zsh /var/tmp/portage/app-emacs/auctex-11.88/work/auctex-11.88/config.status # but without wasting forks for bash or zsh. sysresccd boot # grep zsh /var/tmp/portage/app-emacs/auctex-11.88/work/auctex-11.88/preview/config.status # but without wasting forks for bash or zsh. Created attachment 397114 [details]
/var/tmp/portage/app-emacs/auctex-11.88/work/auctex-11.88/config.status
I have tried emergeing auctex after doing "export SHELL=/bin/zsh" here, but I cannot reproduce the problem. Presumably, this is a stupid question, but is there a /bin/zsh in your /mnt/gentoo? (In reply to Ulrich Müller from comment #6) > Presumably, this is a stupid question, but is there a /bin/zsh in your > /mnt/gentoo? No, I do not have a /mnt/gentoo/bin/zsh. I have only /bin/zsh. (In reply to Juergen Rose from comment #7) > No, I do not have a /mnt/gentoo/bin/zsh. I have only /bin/zsh. So in your changeroot, SHELL does not point to a valid executable. Emacs initialises the variable "shell-file-name" from SHELL, in order to later use it for inferior shells. This is done in lines 1657 and following of src/callproc.c: sh = getenv ("SHELL"); Vshell_file_name = build_string (sh ? sh : "/bin/sh"); Does it even qualify as a bug if things fail with an invalid SHELL? However, adding a basic sanity check wouldn't be complicated, like testing if the variable points to an executable: if (NILP (Ffile_executable_p (Vshell_file_name))) { /* somehow handle the error */ } Not sure what should go into the { } though. Emit a warning and fall back to /bin/sh? Also the test won't cover other problems, like SHELL pointing to an executable that is not a shell. So, can you report this to Emacs upstream please? Let them decide if they consider it a bug and how to handle it. (In reply to Ulrich Müller from comment #8) > So, can you report this to Emacs upstream please? Let them decide if they > consider it a bug and how to handle it. Closing. |