tag 1041415 - upstream thanks Ultimately this fails because /proc is not available in the chroot.
The version of libc in use *emulates* fchmodat() using /proc/self/fd rather than using the fchmodat system call. When /proc is provided in the chroot, the fchmodat emulation works successfully and emacs is happy. zarquon% sudo chroot /var/lib/machines/debian-sid root@zarquon:/# mount mount: failed to read mtab: No such file or directory root@zarquon:/# /usr/bin/emacs --no-init-file --no-site-file -batch -f batch-byte-compile /usr/share/emacs/site-lisp/debian-startup.el >>Error occurred processing /usr/share/emacs/site-lisp/debian-startup.el: File >>error (("Doing chmod" "Operation not supported" >>"/usr/share/emacs/site-lisp/debian-startup.elcGBDJRw")) root@zarquon:/# mount -t proc /proc /proc root@zarquon:/# mount /proc on /proc type proc (rw,relatime) root@zarquon:/# /usr/bin/emacs --no-init-file --no-site-file -batch -f batch-byte-compile /usr/share/emacs/site-lisp/debian-startup.el root@zarquon:/# exit zarquon% So, not an upstream bug, and not really a bug at all. -- We're deep in discussion, the party's on mute.