jimeh / emacs-builds

Self-contained Emacs.app builds for macOS, with native-compilation support.
https://github.com/jimeh/emacs-builds/releases
321 stars 7 forks source link

Enable relative path for Emacs.app #8

Closed liambresnahan closed 3 years ago

liambresnahan commented 3 years ago

I use Doom and seem to be running into an issue when running doom sync which I believe generates the autoload files that emacs needs to start. Seems that there are some hardcoded items from the build machine:

doom doctorWarning: arch-dependent data dir '/Users/runner/work/emacs-builds/emacs-builds/sources/emacs-mirror-emacs-5784b42/nextstep/Emacs.app/Contents/MacOS/libexec/': No such file or directoryWarning: arch-independent data dir '/Users/runner/work/emacs-builds/emacs-builds/sources/emacs-mirror-emacs-5784b42/nextstep/Emacs.app/Contents/Resources/etc/': No such file or directoryWarning: Lisp directory '/Users/runner/work/emacs-builds/emacs-builds/sources/emacs-mirror-emacs-5784b42/nextstep/Emacs.app/Contents/Resources/lisp': No such file or directoryError: /Users/runner/work/emacs-builds/emacs-builds/sources/emacs-mirror-emacs-5784b42/nextstep/Emacs.app/Contents/Resources/etc/charsets: No such file or directoryEmacs will not function correctly without the character map files.Please check your installation!\

Could these be turned into relative paths to enable items requiring these locations to run as expected please?

liambresnahan commented 3 years ago

BTW - I validated that the build itself if built locally works as expected (using your script). I can generate the autoloads files as expected when running doom sync

jimeh commented 3 years ago

@liambresnahan there's a change your local build works cause you still have the workdir used to build Emacs in sources/, as the original Emacs.app would still be in there. Try moving that out of the way and see if doom sync still works.

liambresnahan commented 3 years ago

ah ha! Yes, that breaks it with the same error as above

jimeh commented 3 years ago

Awesome, that should make things slightly easier to debug, thanks :)

jimeh commented 3 years ago

@liambresnahan I'm afraid I haven't been able to reproduce this issue myself. But after a bit of digging online, I suspect it might be related to how you're making emacs available as a command in your shell. Are you by chance symlinking /Applications/Emacs.app/Contents/MacOS/Emacs to /usr/local/bin/emacs or something similar?

If that is the case, would you mind trying the alias-based method from the readme of my build script? https://github.com/jimeh/build-emacs-for-macos#use-self-contained-emacsapp-as-emacs-cli-tool

liambresnahan commented 3 years ago

So, it turns out I wasn't, but I am now :). Looks like the alias based method works - thanks!