Questions tagged [native-comp]
The native-comp tag has no summary.
14 questions
1
vote
1
answer
110
views
Native compiling and running user code
I would like to write some Emacs Lisp code in a .el file, compile it natively to a .eln file, and run it like a script. I managed to compile to .eln but I don't know how to run it (running emacs --...
7
votes
2
answers
1k
views
Why is Emacs recompiling some packages on every startup?
Every time I start Emacs, it creates an *Async-native-compile-log* buffer with the following contents:
Compiling /usr/share/emacs/29.4/lisp/emacs-lisp/cl-loaddefs.el.gz...
uncompressing cl-loaddefs.el....
0
votes
0
answers
606
views
Set path to gcc for native compilation
Is there a way to tell emacs to use a specific path to GCC for native compilation, overriding any GCC found by searching the PATH environment variable?
I've been trying to set up Emacs 29.1 on Windows ...
10
votes
2
answers
4k
views
What is an eln-cache and how do I get rid of it?
I'm using Emacs 28.2 on Debian 12.1 with just some org-mode settings in the init file, and it suddenly produces an eln-cache/ every time I start it and populates it with a lot of files. It's annoying ...
0
votes
2
answers
1k
views
How to prevent Emacs from native-compiling certain packages?
I am trying to prevent emacs-jupyter package from native compilation. There is a known bug that breaks the package when native compiled. [1] I can manually delete the eln files in eln-cache dir and ...
1
vote
1
answer
5k
views
Building emacs 29 from repository on M1 macOS with native compilation
I did brew install libgccjit and then I did make configure="--with-native-compilation" and it died with:
checking for libgccjit.h... yes
configure: error: The installed libgccjit failed to ...
1
vote
1
answer
384
views
Void symbols after enabling native compilation
I updated my Emacs from 25 to 28.1 version (as part of OS update), and now on startup there is an error
Symbol's value as variable is void: kill-region
as well as a lot of comp warnings. On similar ...
2
votes
1
answer
496
views
how often should emacs 28.1 native compile basic emacs files?
I installed 28.1 from source, and when I load emacs in daemon mode, it native-compiles everything under /emacs-28.1/lisp/. Is this normal behaviour? Shouldn't this only need to happen once?
The only ...
1
vote
0
answers
375
views
Getting an error when running the Emacs 28.1 binary that I built from source (--with-native-compilation)
When building Emacs 27.2 from source, I use the following config:
./autogen.sh
./configure --prefix=/home/user/emacs --bindir=/home/user/bin \
--with-json --with-gif --with-jpeg --with-png --with-...
3
votes
3
answers
5k
views
How to prevent Emacs 28 from native-compiling everything?
Not sure what's going on, but suddenly Emacs just started byte-compiling native-compiling everything, all Elisp files. No idea how to get it to stop or what caused this. It's doing all the packages ...
3
votes
2
answers
843
views
‘Error: junk at end of line’ with native-comp
I recently switched to Emacs 28.1 hoping to use the new native-comp support. Being on Windows, I followed these instructions to install libgccjit, copying the resulting libgccjit.dll library to Emacs’...
5
votes
2
answers
7k
views
Is there a way to determine if emacs uses the byte compiled or the natively compiled code of a function?
Say, there is some function and if I do a describe-function on it it says:
x is an interactive compiled Lisp function in x.el
Can I tell somehow if this loaded compiled code is byte compiled or ...
1
vote
1
answer
74
views
Transitive `require`s don't work `--with-native-compilation`?
Consider:
;;; a.el
(defun a () nil)
(provide 'a)
;;; b.el
(require 'a)
(defun b () nil)
(provide 'b)
In traditional Emacs this byte compiles fine:
;;; use.el
(require 'b)
(a) ;This is automatically ...
4
votes
2
answers
2k
views
Set custom location for eln-cache
I would like the eln-cache for natively compiled files (I'm using emacs 29, built from the master branch) to be in a custom location. I have this in the opening of my early-init.el file:
;; Dir for ...