bug#41877: Bug: feature/native-comp on MacOs Catalina w.r.t. subr-x.eln

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#41877: Bug: feature/native-comp on MacOs Catalina w.r.t. subr-x.eln

Gregor Eeckels
Hello. I am experiencing a weird error.

Native elisp load failed: "/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/eln-x86_64-apple-darwin19.5.0-0d5d423ea4500a50/subr-x.eln", "dlopen(/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/eln-x86_64-apple-darwin19.5.0-0d5d423ea4500a50/subr-x.eln, 1): no suitable image found.  Did find:
/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/eln-x86_64-apple-darwin19.5.0-0d5d423ea4500a50/subr-x.eln: file too short
/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/eln-x86_64-apple-darwin19.5.0-0d5d423ea4500a50/subr-x.eln: file too short"

I built emacs using this guide carefully: https://github.com/shshkn/emacs.d/blob/master/docs/nativecomp.md

Everything worked out, but now this causes errors during the first run and then emacs fails to load because of the same error after rebooting. The mentioned file subr-x.eln is empty.

I did create the symbolic link from Resources/elisp to elisp in the Emacs.app directory.
Thank you for your assistance.
Reply | Threaded
Open this post in threaded view
|

bug#41877: Bug: feature/native-comp on MacOs Catalina w.r.t. subr-x.eln

Nicolas Bértolo
Hi,

I have seen empty .eln files created in Windows. This usually happens when
libgccjit cannot find the correct GCC installation to run the final steps.

I am not a Mac user either, but AFAIK, launching an .app is not the same as
running it from the console. The PATH variable will not have all your
customizations, for example.

A wild guess is that Emacs didn't compile subr-x.eln during the bootstrap
process because NATIVE_FAST_BOOT was enabled. Then, you opened Emacs.app and it
kickstarted the deferred compilation process. This was run in an environment
without the correct PATH, so it could not find GCC and the empty file was
created.

Try deleting subr-x.eln and start Emacs again. You may have to delete other
empty files too. Then run (executable-find "gcc"). Check that this is the same
as `which gcc` in the shell you used to compile Emacs.

You could also check the "*Async-native-compile-log*" buffer for any error
messages.

Nico.