I used the following instructions to build GNU Emacs 28 source.
./autogen.sh
./configure --with-cairo --with-modules --with-x-toolkit=lucid --without-compress-install --with-x-toolkit=no --with-gnutls --without-gconf --without-xwidgets --without-toolkit-scroll-bars --without-xaw3d --without-gsettings --with-mailutils --with-native-compilation --with-json --with-harfbuzz --with-imagemagick --with-jpeg --with-png --with-rsvg --with-tiff --with-wide-int --with-xft --with-xml2 --with-xpm --with-gif --with-threads --with-included-regex --with-zlib --without-sound --without-pop CFLAGS="-O3 -mtune=native -march=native -fomit-frame-pointer" prefix=/usr/local
make -j2 NATIVE_FULL_AOT=1
sudo make install
For some reason which I do not understand yet, the issue describe persists if I try to run Emacs from /usr/local/bin
, that is, run the last line sudo make install
.
The issue does not appear when I run Emacs from the emacs-28.0.91/src
directory. All the packages work as expected with this scheme. This per-usage location is a reasonable workaround for me now.
UPDATE: April 18, 2022
I posted the question on Oct 24, and I must have encountered the issue sometime around September 2021. The workaround I had posted seemed unsatisfying, until I came across this post today.
https://www.reddit.com/r/emacs/comments/rcg4r2/help_transitioning_to_emacs_28.
It seems the issue is because of a bug with find-file-visit-truename
. Setting (setq find-file-visit-truename nil)
resolves the error, and my config works as expected.
There is a bug report with Emacs: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52292
There is more discussion available in the following links if you are interested.
https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg00780.html https://github.com/raxod502/straight.el/issues/701