From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.emacs.devel Subject: Re: Loading tramp for dump goes into infinite regress Date: Mon, 25 Jul 2022 21:10:09 -0400 Message-ID: References: <8735erhrlg.fsf@gmx.de> <83wnc2g0n8.fsf@gnu.org> <83sfmqfxcb.fsf@gnu.org> <83a68yfp6j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f397c905e4aaf6a6" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25573"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Michael Albinus , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 26 03:13:13 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oG98L-0006Rw-BQ for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jul 2022 03:13:13 +0200 Original-Received: from localhost ([::1]:60026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oG98K-0007CV-7A for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jul 2022 21:13:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oG95e-0005rc-A6 for emacs-devel@gnu.org; Mon, 25 Jul 2022 21:10:26 -0400 Original-Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:46751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oG95c-0004wf-5j; Mon, 25 Jul 2022 21:10:25 -0400 Original-Received: by mail-pf1-x429.google.com with SMTP id c3so11898151pfb.13; Mon, 25 Jul 2022 18:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sjWHULnvpIo6eYahDHsVVBwtz8ova+oV9b43OGF3GSw=; b=PxNJ4gkejikU0SpPbIZdieIHzjRI5hscmf0mMRqDeTVoRF14Rdi47ceuUmI2V5BRnS SEMJ5O2Hcrv3SCWqF1WkLrPoaicOIlha/jv2fT0DuxzQFgN6IgdT8daUPbastTOvbUB+ omJxcurX/e6XFtioFX8jAgXf0Qjdsn9lpzuWBGNf8bC/jnx6DCKOFQtaUv7U79+Q9nkb HOUXup6Lomh05PE+w5B1m0bE7UftG6JAP1BvuRP8rMPQTuJc8I7rFXr90qbDqlVCHeRO eL04d3s4rY1S314JX2DZ9hSt/Wi7mOaB+UMPEsrWin9eQQpDeYK1N5twDaYZ2CKfugVr J0+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sjWHULnvpIo6eYahDHsVVBwtz8ova+oV9b43OGF3GSw=; b=OaXSzQQ3XJpJJFeLfXJO47tOSP44Sn7PUUADtO4QHHUrnqqx5Q+C5BffGHozbkAo4y M88Hfaukapy7vfJKL88JejwZIgXiudluEdjFspfV6MZXkHPxvx59c/dQGyVZq7EyZkMG +MgTJClmdyZ/wwUYVCO+tdvKFuoGvNQS2c4k+V29jOFatlmyBRYxZd06/FNqM6j18XQ5 0sZCLuuTaCbf6PvsaGQB+3NrhADFZIIOvZyVXMNdHHwExFLeS9Kb6bSe46mHIfxtCqkB 4i/cK5FVNoFxZ9U/yKUd2Avdbs3EuswPjC0xUShtWq0DK2ZXIERBDVfJ8nbbj+9JQZcZ o3og== X-Gm-Message-State: AJIora/o7uwZd44FFhATIJs5qmiszFaAonZ+CH8tBd9XcowXXwAQ1W3N L9beQnEK0i3hDbKrd/sWUAR3ZtQm6qus+WgdXWk= X-Google-Smtp-Source: AGRyM1tcLjV1MIOWLJi4nauaekmCuUevVohAb6++jm0pwD8LLNG1/pc7own368zNQH9ZiKVpXrkw9xubnn4CsGca4Oo= X-Received: by 2002:a63:2bc1:0:b0:412:706e:73ad with SMTP id r184-20020a632bc1000000b00412706e73admr12624210pgr.488.1658797822284; Mon, 25 Jul 2022 18:10:22 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=owinebar@gmail.com; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:292659 Archived-At: --000000000000f397c905e4aaf6a6 Content-Type: text/plain; charset="UTF-8" On Mon, Jul 25, 2022, 8:28 PM Lynn Winebarger wrote: > On Mon, Jul 25, 2022, 12:54 PM Stefan Monnier > wrote: > >> > Otherwise, I was able to resolve the various issues (including some >> > extensive surgery on vc/ediff-X files to stamp out the circular >> loading). >> > I am going to have to do a real bootstrap to avoid the "incoherent eln" >> > error, though, and somehow force native compilation for all the >> libraries >> > loaded in the dump (that are not on the compiler's "forbidden" list, >> > anyway). >> >> BTW, I don't really understand why you're bumping into circularity issue >> with things like ediff. I do know it has circularity issues, but they >> only affect compilation, AFAIK. >> > > The C code for the require form hits the panic button if it has to load > something when dump-mode is non-nil. Something similar happens when an > autoload is invoked during dump-mode, but I haven't looked for the exact > piece of code that does it so I don't know if it's C or lisp. > > So, I'm wondering: do you include "the world" in both dumps (the >> first, done to build `src/bootstrap-emacs.pdmp`, and the second to >> build the final `src/emacs.pdmp`) or do you include it only >> in the second dump? >> > > I initially was trying to just run the second one, but I got the > "incoherent ELN" error. So I set up a new build directory, did a fresh > configure followed by "make bootstrap". I had to further refine the > site-load.el to explicitly load everything required at compile time, wrap > every instance of any expression requiring a generated file with "unless > dump-mode" (since in dump-mode the site-load or loadup file must load all > the required files to work anyway). That fails when site-load starts > loading bits of cc-mode for the second dump since none of the files in > site-load are even byte-compiled with the bootstrap emacs. So I generated > a list of .elc targets from site-load (same method used for lisp.mk), > then put together a hacked Makefile in BUILD/lisp that ran the > bootstrap-emacs executable with the suffix rule from the standard > Makefile. That also failed with the incoherent ELN message. Then I > noticed the rule that uses the "byte-compile-refresh-preloaded" function, > so I'm trying that in the Makefile. However, I'm still waiting for the > preloaded files to finish native compiling. > > I'd be happy to follow the 3 step path to dumping, but I thought the whole > "no redumping support" prevented that approach. > Even native compiling using the bootstrap emacs with byte-compile-refresh-preloaded is failing. I might try redoing the bootstrap, then run the native compiler on the site-load files sequentially. That will take several hours at least, though. Lynn --000000000000f397c905e4aaf6a6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Jul 25, 2022, 8:28 PM Lynn Winebarger <owinebar@gmail.com> wrote:
On Mon, Jul 25, 2022, 12:54 P= M Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Otherwise, I was able to resolve the v= arious issues (including some
> extensive surgery on vc/ediff-X files to stamp out the circular loadin= g).
> I am going to have to do a real bootstrap to avoid the "incoheren= t eln"
> error, though, and somehow force native compilation for all the librar= ies
> loaded in the dump (that are not on the compiler's "forbidden= " list,
> anyway).

BTW, I don't really understand why you're bumping into circularity = issue
with things like ediff.=C2=A0 I do know it has circularity issues, but they=
only affect compilation, AFAIK.

The C code for the require form hits the pan= ic button if it has to load something when dump-mode is non-nil.=C2=A0 Some= thing similar happens when an autoload is invoked during dump-mode, but I h= aven't looked for the exact piece of code that does it so I don't k= now if it's C or lisp.

So, I'm wo= ndering: do you include "the world" in both dumps (the
first, done to build `src/bootstrap-emacs.pdmp`, and the second to
build the final `src/emacs.pdmp`) or do you include it only
in the second dump?

I initially was trying to just run the second one, but I= got the "incoherent ELN" error.=C2=A0 So I set up a new build di= rectory, did a fresh configure followed by "make bootstrap".=C2= =A0 I had to further refine the site-load.el to explicitly load everything = required at compile time, wrap every instance of any expression requiring a= generated file with "unless dump-mode" (since in dump-mode the s= ite-load or loadup file must load all the required files to work anyway).= =C2=A0 That fails when site-load starts loading bits of cc-mode for the sec= ond dump since none of the files in site-load are even byte-compiled with t= he bootstrap emacs.=C2=A0 So I generated a list of .elc targets from site-l= oad (same method used for lisp.mk), then put together a hacked Makefile in BUILD/= lisp that ran the bootstrap-emacs executable with the suffix rule from the = standard Makefile.=C2=A0 That also failed with the incoherent ELN message.= =C2=A0 Then I noticed the rule that uses the "byte-compile-refresh-pre= loaded" function, so I'm trying that in the Makefile.=C2=A0 Howeve= r, I'm still waiting for the preloaded files to finish native compiling= .=C2=A0=C2=A0

I'd be= happy to follow the 3 step path to dumping, but I thought the whole "= no redumping support" prevented that approach.

Even native compiling = using the bootstrap emacs with byte-compile-refresh-preloaded is failing.= =C2=A0 I might try redoing the bootstrap, then run the native compiler on t= he site-load files sequentially. That will take several hours at least, tho= ugh.

Lynn

--000000000000f397c905e4aaf6a6--