1

I'm building emacs from source (the feature/native-comp branch) on Ubuntu inside WSL 2. This was working a couple weeks ago, but today it stopped (I hadn't used it in some time though).

I've cloned emacs from git://git.savannah.gnu.org/emacs.git.

I build with this:

$ ./autogen.sh
$ ./configure --prefix=$HOME/.local --with-native-compilation
$ make -j12
$ make install

I end up with the following files in the bin directory:

$ ls -lh
-rwxr-xr-x 1 gregg gregg 198K Apr 16 18:49 ctags
lrwxrwxrwx 1 gregg gregg   13 Apr 16 18:49 emacs -> emacs-28.0.50
-rwxr-xr-x 1 gregg gregg 7.2M Apr 16 18:49 emacs-28.0.50
-rwxr-xr-x 1 gregg gregg  37K Apr 16 18:49 emacsclient
-rwxr-xr-x 1 gregg gregg 194K Apr 16 18:49 etags

I know it's on the path because:

$ which emacs
/home/gregg/.local/bin/emacs

I've also manually verified that /home/gregg/.local/bin is on the PATH.

When I try to run emacs from any directory except /home/gregg/.local/bin:

$ emacs
emacs: could not resolve realpath of "emacs": No such file or directory

If I'm inside the bin directory emacs works normally calling it either relative to the current location or from the path (./emacs or emacs).

Drew
  • 75,699
  • 9
  • 109
  • 225
gregghz
  • 133
  • 5
  • If you are using `bash`, try `hash -r` to forget all the remembered locations where bash found an executable before. Then try `emacs` again. – NickD Apr 17 '21 at 18:06
  • 1
    The shell is not the root of the problem here. In fact, this problem corresponds to a bug [recently introduced in emacs-native-comp](http://emacs.1067599.n8.nabble.com/bug-47800-native-comp-could-not-resolve-realpath-of-quot-emacs-quot-td533016.html#a533074). – rien333 Apr 21 '21 at 17:40

0 Answers0