GNU bug report logs - #78783
30.1.50; AOT-compiling site-lisp during the Emacs build doesn't work

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Spencer Baugh <sbaugh@HIDDEN>; dated Fri, 13 Jun 2025 13:35:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 78783 <at> debbugs.gnu.org:


Received: (at 78783) by debbugs.gnu.org; 13 Jun 2025 14:59:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 13 10:59:05 2025
Received: from localhost ([127.0.0.1]:47760 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uQ5s1-0007Tc-7B
	for submit <at> debbugs.gnu.org; Fri, 13 Jun 2025 10:59:05 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56572)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>)
 id 1uQ5rz-0007T5-HP; Fri, 13 Jun 2025 10:59:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1uQ5rt-0008KM-GH; Fri, 13 Jun 2025 10:58:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=XRDycKBFCb3YiZfanwX7Ox3SHysFa61EduojfUqNHEA=; b=eNvHesizoqRx
 8rJPCOT99xOTVuRCp3nkIW9N1N6SM/S0dW2lSwC+eUcHQqPLAXQqVPvAT4PjlSS/ALkz5s2itwCi5
 QqJlPnECYCn1DFbEpuPVDHmxPgQdmm94BU29DAWDIANT+o4BlU8/Xya9PMrAeS+cMNNwr3493+WoR
 Evp81dkttQXjIGf09kYmuUCJKzXuwDvhG/t8BYbssdyAAEGR4y66gm9r2ZxyQ/nVnTv4c5zNjfkHA
 sYLxICigcXH7sr2rGGiWIpPOWh42U9NelxCD9giNdSAMF3DJCtBcWsqRtoCOmGcUxiQOFE4ceZ5sL
 7rT2zRqz4Q0P1svqQPIfRw==;
Date: Fri, 13 Jun 2025 17:58:54 +0300
Message-Id: <867c1felht.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <ier5xgz3gvh.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#78783: 30.1.50;
 AOT-compiling site-lisp during the Emacs build doesn't work
References: <ier5xgz3gvh.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 78783
Cc: acorallo@HIDDEN, 78783 <at> debbugs.gnu.org, app-emacs-dev@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

severity 78783 wishlist
thanks

> Cc: Andrea Corallo <acorallo@HIDDEN>, app-emacs-dev@HIDDEN
> 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@HIDDEN>
> 
> 
> 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#78783; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Jun 2025 13:34:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 13 09:34:34 2025
Received: from localhost ([127.0.0.1]:44991 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uQ4YE-0001CG-3O
	for submit <at> debbugs.gnu.org; Fri, 13 Jun 2025 09:34:34 -0400
Received: from lists.gnu.org ([2001:470:142::17]:50454)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1uQ4YA-0001By-8i
 for submit <at> debbugs.gnu.org; Fri, 13 Jun 2025 09:34:31 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sbaugh@HIDDEN>)
 id 1uQ4Xy-0007Ge-Al
 for bug-gnu-emacs@HIDDEN; Fri, 13 Jun 2025 09:34:20 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sbaugh@HIDDEN>)
 id 1uQ4Xv-0005EV-82
 for bug-gnu-emacs@HIDDEN; Fri, 13 Jun 2025 09:34:18 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.1.50; AOT-compiling site-lisp during the Emacs build doesn't work
X-Debbugs-Cc: 
Date: Fri, 13 Jun 2025 09:34:10 -0400
Message-ID: <ier5xgz3gvh.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1749821650;
 bh=SGDJaMZ9Q2BDUlaSHVI154lz2QZlxhXTh2g4tnwxvmM=;
 h=From:To:Cc:Subject:Date;
 b=DqG4ka9r0A51NFYRVyjzKBZWHIYsDQhguRoXMqx8IEOHgXMI99XJ54QjX+S9FwvSr
 4PkoMjZ1FWSWE722QgpfivcHiaca/yYyTFPztRCmSixRN6+yAjmgN3s6ziE5unCtmT
 MrmjzQUTVZtuxsb/cjEgkcsoZw/VGN2Pw7hTCAi2BymvJOyCGW3Sq7XTFygIVSTfQV
 XveOzR9ERy8VqHE3bS6YILP+80b7yYLQLUI2nAnY1r4hPwvdmBx7enoPWpRWp+AEx3
 mgljw+ioizx4enqegmNSOHaFHieflGa1vCrGAZmLQiKk/kemAM0VAq5cR/VJ8hYgVQ
 kmreaEzgpCgNA==
Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@HIDDEN;
 helo=mxout5.mail.janestreet.com
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
Cc: Andrea Corallo <acorallo@HIDDEN>, app-emacs-dev@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)


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





Acknowledgement sent to Spencer Baugh <sbaugh@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#78783; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 13 Jun 2025 15:15:06 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.