From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74382: `compile-first` Make rule is no longer using `load-prefer-newer` Date: Sat, 16 Nov 2024 18:27:14 +0200 Message-ID: <86y11jf8kd.fsf@gnu.org> References: <6bc3a410f0857c3e3433070ac19deaf7eae88c63.camel@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23055"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 74382@debbugs.gnu.org To: Konstantin Kharlamov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 16 17:28:26 2024 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 1tCLer-0005kw-2E for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Nov 2024 17:28:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCLeW-0003KM-LN; Sat, 16 Nov 2024 11:28:04 -0500 Original-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 1tCLeV-0003K5-Tp for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 11:28:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tCLeU-0005t1-Kw for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 11:28:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=OnZh1KzOsb3cQFd75mXlwVi2UJxMskkhLxe02ZMxAuM=; b=TctbpUda7T37VoLiQ46yj/aES4/kpVGtQNLia0PFTqrzCjG4NLVUYlr3lI7sHnxbuvQBlVYhE/hsAxuwC6WdDKwegap3oPTUCUbNNCP362e0HOFxT+8LWBdBIplAQ5gUNpwsUTryiQmJdC9b3RiIUxpNH8WJOtsAVk/5ruYNMkKOT82pKYs7LElpW+7k9a+fAfIeGLWKHOU6fMC0mXTF6E4CDdRX2xMP25WMIDQQ1jpmsf4j9nzzppcXdsSJfSUi5cdvUK78wlghNjBoM2FH31Kncf0la/SRZry1MBPoAK8i61FqskE+AYaGqHkeynFgyB7DE/zkVT0JgetqiUu1MA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCLeU-0003Eh-Ew for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 11:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Nov 2024 16:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74382 X-GNU-PR-Package: emacs Original-Received: via spool by 74382-submit@debbugs.gnu.org id=B74382.173177444812389 (code B ref 74382); Sat, 16 Nov 2024 16:28:02 +0000 Original-Received: (at 74382) by debbugs.gnu.org; 16 Nov 2024 16:27:28 +0000 Original-Received: from localhost ([127.0.0.1]:54492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCLdv-0003Dk-Ml for submit@debbugs.gnu.org; Sat, 16 Nov 2024 11:27:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCLdt-0003DU-AW for 74382@debbugs.gnu.org; Sat, 16 Nov 2024 11:27:26 -0500 Original-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 1tCLdl-00051C-6d; Sat, 16 Nov 2024 11:27:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=OnZh1KzOsb3cQFd75mXlwVi2UJxMskkhLxe02ZMxAuM=; b=LrfukZJt420Ljzu43Syr gd9iOvrvf0o/H3EmWU54p3B7lemhxSZj439mY3BZJBHjR4KQuFbYh17kdZ/G6FwENv8wC34TNyI7S mR/W+gfzLSO8GszNMTEHZgO3p1bZuyyZt93j0RYsf7vHai7loSM0yCNlbu9zOVHHsWN/NvO8qClZS mBj8ghZgZK5lEp4KPI4eNPWRvKFeQ96GXcnVqoRJ3poCYyyv6ymecXRW7f5jDDpJh+8Ba8P6+AbXu syLfogFEcAUrnh82GX4GplSSL6Y6LYAPapLyTcCciJhwEtkeBu6rLy4GN7Nv9L+OqgkiXZhAE2h3R uNwEPXdkesW9Ig==; In-Reply-To: <6bc3a410f0857c3e3433070ac19deaf7eae88c63.camel@yandex.ru> (message from Konstantin Kharlamov on Sat, 16 Nov 2024 18:11:01 +0300) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295470 Archived-At: > Cc: Alan Mackenzie > From: Konstantin Kharlamov > Date: Sat, 16 Nov 2024 18:11:01 +0300 > > CC: Alan Mackenzie, author of the change in 10083e788f7349fa363d100687dc3d94bea88f57 > > I've seen for a long time Emacs master builds fail from time to time in spectacular > ways after updating the repo, sometimes so badly that `make clean` doesn't help. > > I never dug into that though, but I'm attributing this to the occasional build > messages similar to: > > Source file ‘/home/constantine/Projects/emacs/lisp/emacs-lisp/comp.el’ newer than byte-compiled file; using older file > Source file ‘/home/constantine/Projects/emacs/lisp/emacs-lisp/bytecomp.el’ newer than byte-compiled file; using older file > Source file ‘/home/constantine/Projects/emacs/lisp/emacs-lisp/comp-cstr.el’ newer than byte-compiled file; using older file > > …which makes sense, because if the repo changed `comp.el` API and Emacs during the > build of newer files is trying to make use of older `.elc` file and hence the older > API, it may result in failure. > > Got some spare time today, dug into one of the messages. From what I understand it's > caused by this line `lisp/Makefile.in`: > > # ... but we must prefer .elc files for those in the early bootstrap. > compile-first: BYTE_COMPILE_FLAGS = $(BYTE_COMPILE_EXTRA_FLAGS) > > >From what I understand, this rewrites BYTE_COMPILE_FLAGS to be an empty variable, > which results in `(setq load-prefer-newer t)` being stripped off of the build. They are supposed to be stripped only while processing the compile-first target, and that is on purpose. See the section "Target-specific" in the GNU Make manual, where this feature is documented.