GNU bug report logs -
#78783
30.1.50; AOT-compiling site-lisp during the Emacs build doesn't work
Previous Next
To reply to this bug, email your comments to 78783 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78783
; Package
emacs
.
(Fri, 13 Jun 2025 13:35:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Spencer Baugh <sbaugh <at> janestreet.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 13 Jun 2025 13:35:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Native compilation of site-lisp directories during the Emacs build
(e.g. --with-native-compilation=aot) produces .eln files which are
unused when installed.
The reason is that the absolute file name of the site-lisp directory
differs between build-time and install-time, and therefore
comp-el-to-eln-rel-filename computes a different path hash for the files
contained in site-lisp at build-time and at install-time.
The same issue would affect AOT native compilation of all Lisp in Emacs,
except that there's a workaround built into comp-el-to-eln-rel-filename,
as explained by this comment:
As installing .eln files compiled during the build changes their
absolute path we need an hashing mechanism that is not sensitive
to that. For this we replace if match PATH_DUMPLOADSEARCH or
*PATH_REL_LOADSEARCH with '//' before computing the hash.
In other words, file names containing e.g. "30.1.50/lisp", like
"/usr/local/share/emacs/30.1.50/lisp/foo.el", are transformed to
"//foo.el" before the path hash is computed.
I suggest the same should be done for file names containing
"30.1.50/site-lisp". That would resolve the problem and allow site-lisp
to actually be AOT-compiled.
In GNU Emacs 30.1.50 (build 19, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.15.12, Xaw scroll bars) of 2025-05-26 built on
igm-qws-u22796a
Repository revision: 1743ab3d48bedae367ca6a1deb3faf8f902e7d5c
Repository branch: emacs-30
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Rocky Linux 8.10 (Green Obsidian)
Configured using:
'configure --config-cache --with-x-toolkit=lucid --without-gpm
--without-gconf --without-selinux --without-imagemagick --with-modules
--with-gif=no --with-cairo --with-rsvg --without-compress-install
--with-tree-sitter --with-native-compilation=aot
PKG_CONFIG_PATH=/usr/local/home/garnish/libtree-sitter/0.22.6-1/lib/pkgconfig/'
Configured features:
CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSYSTEMD
LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM
XINPUT2 XPM LUCID ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78783
; Package
emacs
.
(Fri, 13 Jun 2025 15:00:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 78783 <at> debbugs.gnu.org (full text, mbox):
severity 78783 wishlist
thanks
> Cc: Andrea Corallo <acorallo <at> gnu.org>, app-emacs-dev <at> janestreet.com
> Date: Fri, 13 Jun 2025 09:34:10 -0400
> From: Spencer Baugh via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
>
> Native compilation of site-lisp directories during the Emacs build
> (e.g. --with-native-compilation=aot) produces .eln files which are
> unused when installed.
Why are you compiling files in site-lisp during the build? This is
not supported, and I see no reason why we should extend our build
processes to support it.
Why cannot you compile site-lisp files after Emacs is built and
installed?
Severity set to 'wishlist' from 'normal'
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 13 Jun 2025 15:00:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78783
; Package
emacs
.
(Fri, 13 Jun 2025 15:42:04 GMT)
Full text and
rfc822 format available.
Message #13 received at 78783 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> severity 78783 wishlist
> thanks
>
>> Cc: Andrea Corallo <acorallo <at> gnu.org>, app-emacs-dev <at> janestreet.com
>> Date: Fri, 13 Jun 2025 09:34:10 -0400
>> From: Spencer Baugh via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>>
>> Native compilation of site-lisp directories during the Emacs build
>> (e.g. --with-native-compilation=aot) produces .eln files which are
>> unused when installed.
>
> Why are you compiling files in site-lisp during the build? This is
> not supported, and I see no reason why we should extend our build
> processes to support it.
>
> Why cannot you compile site-lisp files after Emacs is built and
> installed?
If a site-lisp file is built (whether as part of Emacs or not) and
subsequently installed into the site-lisp directory, its file name will
change. That changes the path_hash computed by
comp-el-to-eln-rel-filename which will cause this issue.
This is a general problem with AOT-compiling files which are
subsequently installed somewhere else. It applies both for core Emacs
files and for site-lisp.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78783
; Package
emacs
.
(Fri, 13 Jun 2025 17:43:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 78783 <at> debbugs.gnu.org (full text, mbox):
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Cc: acorallo <at> gnu.org, 78783 <at> debbugs.gnu.org, app-emacs-dev <at> janestreet.com
> Date: Fri, 13 Jun 2025 11:41:27 -0400
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
> > severity 78783 wishlist
> > thanks
> >
> >> Cc: Andrea Corallo <acorallo <at> gnu.org>, app-emacs-dev <at> janestreet.com
> >> Date: Fri, 13 Jun 2025 09:34:10 -0400
> >> From: Spencer Baugh via "Bug reports for GNU Emacs,
> >> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >>
> >>
> >> Native compilation of site-lisp directories during the Emacs build
> >> (e.g. --with-native-compilation=aot) produces .eln files which are
> >> unused when installed.
> >
> > Why are you compiling files in site-lisp during the build? This is
> > not supported, and I see no reason why we should extend our build
> > processes to support it.
> >
> > Why cannot you compile site-lisp files after Emacs is built and
> > installed?
>
> If a site-lisp file is built (whether as part of Emacs or not) and
> subsequently installed into the site-lisp directory, its file name will
> change. That changes the path_hash computed by
> comp-el-to-eln-rel-filename which will cause this issue.
>
> This is a general problem with AOT-compiling files which are
> subsequently installed somewhere else. It applies both for core Emacs
> files and for site-lisp.
No, core Emacs files are okay and supported.
It's compiling site-lisp files in this way is not supported. And you
still haven't answered my question: why do you need that?
The supported way of compiling site-lisp files is after they are
installed in site-lisp.
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.