From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 13 09:34:34 2025 Received: (at submit) by debbugs.gnu.org; 13 Jun 2025 13:34:34 +0000 Received: from localhost ([127.0.0.1]:44991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uQ4YE-0001CG-3O for submit@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 ) id 1uQ4YA-0001By-8i for submit@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 ) id 1uQ4Xy-0007Ge-Al for bug-gnu-emacs@gnu.org; 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 ) id 1uQ4Xv-0005EV-82 for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2025 09:34:18 -0400 From: Spencer Baugh To: bug-gnu-emacs@gnu.org 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: 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@janestreet.com; 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 , app-emacs-dev@janestreet.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 13 10:59:05 2025 Received: (at 78783) by debbugs.gnu.org; 13 Jun 2025 14:59:05 +0000 Received: from localhost ([127.0.0.1]:47760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uQ5s1-0007Tc-7B for submit@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 ) 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 ) 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@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#78783: 30.1.50; AOT-compiling site-lisp during the Emacs build doesn't work References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78783 Cc: acorallo@gnu.org, 78783@debbugs.gnu.org, app-emacs-dev@janestreet.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) severity 78783 wishlist thanks > Cc: Andrea Corallo , app-emacs-dev@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" > > > 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? From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 13 11:41:52 2025 Received: (at 78783) by debbugs.gnu.org; 13 Jun 2025 15:41:53 +0000 Received: from localhost ([127.0.0.1]:48492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uQ6XK-0007F4-OU for submit@debbugs.gnu.org; Fri, 13 Jun 2025 11:41:50 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:43001) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uQ6X6-0007CS-TP for 78783@debbugs.gnu.org; Fri, 13 Jun 2025 11:41:41 -0400 From: Spencer Baugh To: Eli Zaretskii Subject: Re: bug#78783: 30.1.50; AOT-compiling site-lisp during the Emacs build doesn't work In-Reply-To: <867c1felht.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 13 Jun 2025 17:58:54 +0300") References: <867c1felht.fsf@gnu.org> Date: Fri, 13 Jun 2025 11:41:27 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1749829287; bh=mvysvRWONlyiZ4QX0p2VP5wvXcvBOzsK2LvW9lwe0bI=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=r/l6vEqcrUJY2wPiG8WGu/rDGwonJREfvxMuDJo7fxw7ssBMYXIAw7jbpB3ZFaiys egzpo1Krb+MfDq7LCqvkIsHMrl80ltjQdQNTWS/Up3e25eVahhjkyJjh8X4+zlQXWy yS65x3FyRjD+NIU1UIDOVkOgX8gh48L9Ej4Kfj0xx3wj2GLfi7DtGBHnSq7axMeTQ9 FqVxGHHXXvAU96NZ27cEoZa7RSCjmUINu//YojQPdiUb5ze2tHeje8dpuIK4c6wwLU 9KEMBIgJbZw9QC2uMAgiBQDAkdUp7h4v8l3qh2SsI1pHriewwte8MCgbZwHm4KnPNZ nBZoMmUy0JkXA== X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78783 Cc: acorallo@gnu.org, 78783@debbugs.gnu.org, app-emacs-dev@janestreet.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > severity 78783 wishlist > thanks > >> Cc: Andrea Corallo , app-emacs-dev@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" >> >> >> 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 13 13:42:07 2025 Received: (at 78783) by debbugs.gnu.org; 13 Jun 2025 17:42:07 +0000 Received: from localhost ([127.0.0.1]:49239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uQ8Pn-0000WQ-5j for submit@debbugs.gnu.org; Fri, 13 Jun 2025 13:42:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40596) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uQ8Pl-0000Vs-6c for 78783@debbugs.gnu.org; Fri, 13 Jun 2025 13:42:05 -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 ) id 1uQ8Pe-0005UE-4f; Fri, 13 Jun 2025 13:41:59 -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=3zAExQrQaogerxoMLBvL8sPS/7FgaEL80n1aI2KIYSE=; b=Tta6rDaO3o7j J7uM/hD2OjiqmBOEcHwGMy4NI/j8r0N4MgeRy5D4YlGjjQrL+Mxte15dJxMAKPw3Hg2U/JueQOvJj 6h/LZSk6o/kb3vudfXH7RjrBDZJ6zVrEV7GAtdAO6r1c/NyAOb88yMwyUwBmE3owRKWeMUthNhPLL 1poGiVNGSFPIqcQr+w+e1xZoqgBDvL+8q8WZmiL06ksjX54HsvV/hCZM0WZJF5+C2L/ZAuAN273F+ vGodQDLORBk0Nykk4nZ13OhKGgPSiInUf7ej+SKW2tel418LDzFpABr+LXnPSgAMAA5qW8kxnT/3w 1M8va/ez5UTI/vCgxHPYKQ==; Date: Fri, 13 Jun 2025 20:41:55 +0300 Message-Id: <86h60jtu70.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Fri, 13 Jun 2025 11:41:27 -0400) Subject: Re: bug#78783: 30.1.50; AOT-compiling site-lisp during the Emacs build doesn't work References: <867c1felht.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78783 Cc: acorallo@gnu.org, 78783@debbugs.gnu.org, app-emacs-dev@janestreet.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Spencer Baugh > Cc: acorallo@gnu.org, 78783@debbugs.gnu.org, app-emacs-dev@janestreet.com > Date: Fri, 13 Jun 2025 11:41:27 -0400 > > Eli Zaretskii writes: > > severity 78783 wishlist > > thanks > > > >> Cc: Andrea Corallo , app-emacs-dev@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" > >> > >> > >> 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.