I'm getting
alloc.c:213: error: undefined reference to 'malloc_set_state'
alloc.c:238: error: undefined reference to 'malloc_get_state'
All dependencies are there. I'm looking where those would be defined and so far no luck.
Git Clone URL: | https://aur.archlinux.org/emacs-native-comp-git.git (read-only, click to copy) |
---|---|
Package Base: | emacs-native-comp-git |
Description: | GNU Emacs. Development native-comp branch. |
Upstream URL: | http://www.gnu.org/software/emacs/ |
Licenses: | |
Conflicts: | |
Provides: | |
Replaces: | |
Submitter: | flatwhatson |
Maintainer: | flatwhatson |
Last Packager: | flatwhatson |
Votes: | 15 |
Popularity: | 1.46 |
First Submitted: | 2020-04-14 04:11 |
Last Updated: | 2020-09-11 11:41 |
I'm getting
alloc.c:213: error: undefined reference to 'malloc_set_state'
alloc.c:238: error: undefined reference to 'malloc_get_state'
All dependencies are there. I'm looking where those would be defined and so far no luck.
@mars Yes, the last update to the PKGBUILD was to handle that change.
In the commit you linked, notice NATIVE_SKIP_NONDUMP
is enabled by default unless NATIVE_FULL_AOT
is set. We still mention NATIVE_FAST_BOOT
in the PKGBUILD, but it's superfluous.
NATIVE_FAST_BOOT
has been replaced by NATIVE_SKIP_NONDUMP
, see https://github.com/emacs-mirror/emacs/commit/3c58403b0f9b732e045230ce34f1b5a8460630ac
@zackteo The "enhanced" package is not doing a NATIVE_FULL_AOT
build, so it skips pre-compiling all the built-in Elisp (and thereby skipping your error). You can do the same by editing this PKGBUILD, search for FAST_BOOT=
and change it to FAST_BOOT="YES"
.
Am getting the same error as @cenhpp , I did force a clean build but to no avail. Strangely, the emacs-native-comp-git-enhanced package worked for me ... but require this one which still uses X11 so that I can use EXWM
note that this will break magit (which is going to be a blocker for a lot of people) tracked at https://github.com/magit/magit/issues/4209#issuecomment-703217843
If starting the daemon via systemd service throws an error similar to this:
emacs[977939]: emacs: ../native-lisp/28.0.50-x86_64-pc-linux-gnu-<many chars>/lisp-mode-<many chars>.eln: cannot open shared object file: No such file or directory
Then you can fix it by manually adding the following to /usr/lib/systemd/user/emacs.service
(or whatever your service file is) under [Service]
:
WorkingDirectory=/usr/lib/emacs/28.0.50/x86_64-pc-linux-gnu/
Make sure the path /usr/lib/emacs/28.0.50/native-lisp/
exists. If it doesn't, then find the native-lisp
path in your system and replace the parent directory of the path above with the path you found. Here's an fd
command to find the path:
fd native-lisp /
Native-comp emacs can take a while to compile, especially if you're only using 1 core. Make sure you have customized MAKEFLAGS
in /etc/makepkg.conf
to use all your cores: https://wiki.archlinux.org/index.php/Makepkg#Parallel_compilation
This package builds with make NATIVE_FULL_AOT=1
by default, which native-compiles all the built-in Elisp. Edit the PKGBUILD
, search for FAST_BOOT=
and make it FAST_BOOT="YES"
to get a shorter build time, at the cost of lazily native-compiling core Elisp at runtime.
I get the same issues as @cenhpp where compilation stops at progmodes/js.elc
even after trying rm -rf ~/.cache/yay/emacs-native-comp-git/{src,pkg}
. I came across this reddit thread and might try that instead.
The libgccjit package is now up-to-date, and includes a dependency on gcc-libs so that it won't silently break next time GCC is updated. I'm now maintaining that package and will do my best to handle updates ASAP.
I also recommend checking out emacs-pgtk-native-comp-git
, this combines native compilation with a new rendering engine for an even faster Emacs.
Pinned Comments
flatwhatson commented on 2020-09-22 00:01
Native-comp emacs can take a while to compile, especially if you're only using 1 core. Make sure you have customized
MAKEFLAGS
in/etc/makepkg.conf
to use all your cores: https://wiki.archlinux.org/index.php/Makepkg#Parallel_compilationThis package builds with
make NATIVE_FULL_AOT=1
by default, which native-compiles all the built-in Elisp. Edit thePKGBUILD
, search forFAST_BOOT=
and make itFAST_BOOT="YES"
to get a shorter build time, at the cost of lazily native-compiling core Elisp at runtime.