Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 540576 - ~app-editors/emacs-24.4: Error: Searching for program: no such file or directory, /bin/zsh (seen with app-emacs/auctex-11.88)
Summary: ~app-editors/emacs-24.4: Error: Searching for program: no such file or direct...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-18 21:13 UTC by Juergen Rose
Modified: 2018-02-21 19:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,107.90 KB, text/plain)
2015-02-18 21:13 UTC, Juergen Rose
Details
/var/tmp/portage/app-emacs/auctex-11.88/work/auctex-11.88/config.status (config.status,26.23 KB, application/x-shellscript)
2015-02-21 08:16 UTC, Juergen Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2015-02-18 21:13:11 UTC
Created attachment 396882 [details]
build.log

'MAKEOPTS=-j1 emerge -v1 app-emacs/auctex' fails with:
...
/usr/bin/emacs -batch -q -no-site-file -no-init-file -l lpath.el -f batch-byte-compile tex-buf.el ...
...
   style/cleveref.el tex-jp.el

In toplevel form:
tex.el:606:41:Warning: reference to free variable `Info-file-list-for-emacs'
tex.el:606:41:Warning: assignment to free variable `Info-file-list-for-emacs'

In TeX-set-mode-name:
tex.el:881:69:Warning: reference to free variable `TeX-mode-p'
tex.el:887:22:Warning: reference to free variable `TeX-PDF-mode'
...
tex.el:5601:13:Warning: assignment to free variable `TeX-global-input-files'
tex.el:5602:13:Warning: assignment to free variable `LaTeX-global-class-files'

In TeX-doc:
tex.el:5928:12:Warning: `interactive-p' is an obsolete function (as of 23.2);
    use `called-interactively-p' instead.
tex.el:5949:7:Warning: assignment to free variable `ispell-enable-tex-parser'

In end of data:
tex.el:6072:1:Warning: the following functions might not be defined at
    runtime: dbus-ping, dbus-introspect-get-method, dbus-call-method,
    dbus-register-signal
tex.el:6072:1:Warning: the following functions are not known to be defined:
    TeX-output-extension, TeX-active-master, LaTeX-environment-list,
    TeX-active-mark, TeX-activate-region, spell-buffer
Wrote /var/tmp/portage/app-emacs/auctex-11.88/work/auctex-11.88/tex.elc

In toplevel form:
tex-buf.el:31:1:Error: Searching for program: no such file or directory, /bin/zsh
Wrote /var/tmp/portage/app-emacs/auctex-11.88/work/auctex-11.88/tex-style.elc
...
style/hyperref.el:230:2:Warning: reference to free variable `LaTeX-dialect'

In end of data:
style/hyperref.el:237:1:Warning: the following functions are not known to be
    defined: TeX-add-style-hook, TeX-run-style-hooks, TeX-add-symbols,
    TeX-read-key-val
...
style/cleveref.el:104:1:Warning: the following functions are not known to be
    defined: TeX-argument-prompt, LaTeX-label-list, TeX-argument-insert,
    TeX-add-style-hook, TeX-add-symbols, TeX-declare-expert-macros
Wrote /var/tmp/portage/app-emacs/auctex-11.88/work/auctex-11.88/style/cleveref.elc

In toplevel form:
tex-jp.el:35:1:Error: Searching for program: no such file or directory, /bin/zsh
Makefile:158: recipe for target 'lisp' failed
make: *** [lisp] Error 1
 ^[[31;01m*^[[0m ERROR: app-emacs/auctex-11.88::gentoo failed (compile phase):




sysresccd scipy # emerge --info '=app-emacs/auctex-11.88::gentoo'
Portage 2.2.17 (python 3.3.5-final-0, default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.20-r2, 3.4.66-std381-amd64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.4.66-std381-amd64-x86_64-Intel-R-_Core-TM-_i7-4770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16112292 total,   1684000 free
KiB Swap:   62498808 total,  62494768 free
Timestamp of repository gentoo: Wed, 18 Feb 2015 16:00:01 +0000
sh bash 4.3_p33-r1
ld GNU ld (Gentoo 2.25 p1.0) 2.25
app-shells/bash:          4.3_p33-r1::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.3.5-r1::gentoo
dev-util/cmake:           3.1.0::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.9::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.13.4::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.7.3-r1::gentoo, 4.8.3::gentoo, 4.9.2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

g-cpan
    location: /var/lib/cpan
    masters: gentoo
    priority: 1

g-octave
    location: /var/lib/g-octave
    masters: gentoo
    priority: 2

sage-on-gentoo
    location: /var/lib/layman/sage-on-gentoo
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

sunrise
    location: /var/lib/layman/sunrise
    masters: gentoo
    priority: 50

x11
    location: /var/lib/layman/x11
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core-avx2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 atlas automount berkdb bindist bluetooth branding bzip2 cairo cdda cdr clamav cli consolekit cracklib crypt cups cxx dbus doc dot dri dts dvd dvdr emacs emboss encode examples exif extra fam firefox flac fontconfig fortran fortran95 gdbm gfortran gif glamor gmp gpm gtk iconv icu ipv6 jadetex jpeg lapack latex lcms ldap libav libkms libnotify mad mkl mmx mng modules mp3 mp4 mpeg mpi multilib ncurses nls nptl octave ogg opengl openmp pam pango pcre pdf png policykit ppds preview-latex python qt3support qt4 readline romio sage sdl session spell sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd szip tcpd tex tex4ht texmacs threads tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xa xcb xetex xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de fr ru" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON



sysresccd scipy # emerge -pqv '=app-emacs/auctex-11.88::gentoo'
[ebuild  N    ] app-emacs/auctex-11.88  USE="preview-latex"
Comment 1 Juergen Rose 2015-02-18 23:09:37 UTC
After exporting SHELL=/bin/bash the issue disappeared.
Comment 2 Ulrich Müller gentoo-dev 2015-02-19 11:15:48 UTC
Can you attach config.status please?
Where does your /bin/sh point to, and what value has the SHELL environment variable?
Comment 3 Juergen Rose 2015-02-21 08:15:22 UTC
(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.
Comment 4 Juergen Rose 2015-02-21 08:16:23 UTC
Created attachment 397114 [details]
/var/tmp/portage/app-emacs/auctex-11.88/work/auctex-11.88/config.status
Comment 5 Ulrich Müller gentoo-dev 2015-02-22 22:49:11 UTC
I have tried emergeing auctex after doing "export SHELL=/bin/zsh" here, but I cannot reproduce the problem.
Comment 6 Ulrich Müller gentoo-dev 2015-02-23 07:12:43 UTC
Presumably, this is a stupid question, but is there a /bin/zsh in your /mnt/gentoo?
Comment 7 Juergen Rose 2015-02-23 10:08:46 UTC
(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.
Comment 8 Ulrich Müller gentoo-dev 2015-02-23 10:46:19 UTC
(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.
Comment 9 Ulrich Müller gentoo-dev 2018-02-21 19:12:49 UTC
(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.