On 16/04/21 3:08 am, Eli Zaretskii wrote (on bug 47800): > Does the untested patch below fix the problem? That didn't change the outcomes for me. I've just tried some very basic debugging with the attached patch (yours plus some debug output) which gives me the following outputs: $ cd /tmp $ ls emacs ls: cannot access 'emacs': No such file or directory $ emacs --version load_pdump_find_executable: candidate: /home/phil/bin/emacs => file: /home/phil/bin/emacs => (link) realpath: /home/phil/emacs/native-comp/usr/local/bin/emacs-28.0.50 load_pdump: /home/phil/emacs/native-comp/usr/local/bin/emacs-28.0.50 real_filename( /home/phil/emacs/native-comp/usr/local/bin/emacs-28.0.50 ) => realpath: /home/phil/emacs/native-comp/usr/local/bin/emacs-28.0.50 set_invocation_vars: emacs real_filename( emacs ) => realpath: (null) emacs: could not resolve realpath of "emacs": No such file or directory $ mkdir emacs $ emacs --version load_pdump_find_executable: candidate: /home/phil/bin/emacs => file: /home/phil/bin/emacs => (link) realpath: /home/phil/emacs/native-comp/usr/local/bin/emacs-28.0.50 load_pdump: /home/phil/emacs/native-comp/usr/local/bin/emacs-28.0.50 real_filename( /home/phil/emacs/native-comp/usr/local/bin/emacs-28.0.50 ) => realpath: /home/phil/emacs/native-comp/usr/local/bin/emacs-28.0.50 set_invocation_vars: emacs real_filename( emacs ) => realpath: /tmp/emacs emacs: /tmp/../native-lisp/28.0.50-abd7aa58/preloaded/window-0d1b8b93-581f9fcd.eln: cannot open shared object file: No such file or directory $ /home/phil/emacs/native-comp/usr/local/bin/emacs --version load_pdump: /home/phil/emacs/native-comp/usr/local/bin/emacs real_filename( /home/phil/emacs/native-comp/usr/local/bin/emacs ) => realpath: /home/phil/emacs/native-comp/usr/local/bin/emacs-28.0.50 set_invocation_vars: /home/phil/emacs/native-comp/usr/local/bin/emacs real_filename( /home/phil/emacs/native-comp/usr/local/bin/emacs ) => realpath: /home/phil/emacs/native-comp/usr/local/bin/emacs-28.0.50 GNU Emacs 28.0.50 Copyright (C) 2021 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING.