From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.bugs Subject: bug#48497: 28.0.50; Native compile: excessive recompilation Date: Tue, 18 May 2021 09:25:00 -0400 Message-ID: <87sg2kjhsj.fsf@md5i.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31812"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: 48497@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 18 15:28:41 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lizlz-00080R-P0 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 15:28:41 +0200 Original-Received: from localhost ([::1]:52654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lizly-000816-M0 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 09:28:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lizja-00068h-2I for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 09:26:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43115) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lizjW-0005ou-FF for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 09:26:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lizjW-0007Lo-A4 for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 09:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Welsh Duggan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 May 2021 13:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48497 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162134431528188 (code B ref -1); Tue, 18 May 2021 13:26:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 May 2021 13:25:15 +0000 Original-Received: from localhost ([127.0.0.1]:54660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lizij-0007KZ-8i for submit@debbugs.gnu.org; Tue, 18 May 2021 09:25:15 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:49508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lizie-0007KK-LB for submit@debbugs.gnu.org; Tue, 18 May 2021 09:25:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lizie-0004cM-9L for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 09:25:08 -0400 Original-Received: from md5i.com ([75.151.244.229]:57746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liziX-00058I-TT for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 09:25:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=md5i.com; s=dkim; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:Sender: Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=SIkCdocaP9GVm+LD3/yaQkCB/mZXiL7E1jllwiZIKls=; b=ZkbQj0GWKFpzk8tcqftk0eUE8s hf2S6aMn1+9frJ3BL9QjCLWx2czjq2UFVou9skIdgN4yg33iwuFnm8zqZGCloYuHvkKnv8TuQ/YgA 806cgXIfN4SP8GDoJDoocrorU; Original-Received: from abode.md5i.com ([192.168.177.1] helo=miko) by md5i.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1liziW-007LXd-NA for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 09:25:00 -0400 Received-SPF: pass client-ip=75.151.244.229; envelope-from=mwd@md5i.com; helo=md5i.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206775 Archived-At: The problem is that it seems as if standard Emacs lisp files from the installed base Emacs lisp library are getting recompiled in the user's emacs eln cache despite there being an existing native-compiled version installed. First, I did a fresh out-of-tree build from master using the following procedure: The git worktree is in a directory called "master". cd master ./autogen.sh mkdir ../build cd ../build mkdir -p ~/tmp/emacs/config ../master/configure --without-toolkit-scroll-bars --with-x-toolkit=lucid \ --with-native-compilation --prefix=~/tmp/emacs make -j 32 NATIVE_FULL_AOT=1 bootstrap make NATIVE_FULL_AOT=1 install I verified that there was a directoy, ~/tmp/emacs/lib/emacs/28.0.50/native-lisp/28.0.50-6152138a, which contained 1382 .eln entries. I then started emacs like this, after first making sure there is no "~/.emacs.d" directory or symlink in my home directory: XDG_CONFIG_HOME=~/tmp/emacs/config ~/tmp/emacs/bin/emacs -Q At this point, ~/tmp/emacs/config was empty. I then typed `C-h i', starting info. This started some native compilation in the background. After waiting for the compilation (viewed in top) to settle, there was a directory, ~/tmp/emacs/config/emacs/eln-cache/28.0.50-6152138a, which contained the following .eln files: bytecomp-12882072-1f232d0e.eln comp-cstr-ef162ef7-c492cd97.eln byte-opt-9c5f25f5-26e670d7.eln gv-e0cf7478-ce8290a8.eln cconv-3b1f1f98-ac4628a4.eln help-mode-d4dbae3d-034e8cf5.eln cl-extra-d7051cba-ff815ded.eln info-ce12c0ca-3d2b00fd.eln cl-lib-8b938900-fbcee53d.eln rx-627d8c83-18b6598f.eln cl-macs-7ae82f81-bc4ef696.eln seq-c314b42f-4e726806.eln cl-seq-f464c4e2-95d0eb23.eln subr-x-02dfef32-04f2924b.eln comp-7672a6ed-d617b299.eln warnings-28e75f4d-c98d4e00.eln I verified that versions of these files existed in ~/tmp/emacs/lib/emacs/28.0.50/native-lisp/28.0.50-6152138a, which they did, but the first hash differs in each case, and the file sizes are completely different. Hopefully this is enough information to recreate the behavior. I first encountered this with a build that was installed without --prefix (in /usr/local) and with a setup that used ~/.emacs.d/. I changed these portions for this report in order to make sure I was testing a fresh build without, hopefully, introducing any of my existing setup into the test (and without possibly mucking up my existing work environment). In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0) of 2021-05-17 built on miko Repository revision: f572735c5105a84da3175ae6cdad807fa103dfe1 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure --without-toolkit-scroll-bars --with-x-toolkit=lucid --with-native-compilation --prefix=/home/md5i/tmp/emacs' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF X11 XAW3D XDBE XIM XPM LUCID ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix -- Michael Welsh Duggan (md5i@md5i.com)