From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Corwin Brust Newsgroups: gmane.emacs.devel Subject: Re: Lisp files that load cl-lib in problematical ways Date: Tue, 24 Oct 2023 10:00:55 -0500 Message-ID: References: <83lebyu5yx.fsf@gnu.org> <4684f43123d7dee59461@heytings.org> <835y2xo1a5.fsf@gnu.org> <4684f4312391906f6101@heytings.org> <831qdlo084.fsf@gnu.org> <83msw8n43r.fsf@gnu.org> <87y1fs75mx.fsf@localhost> <837cncmewi.fsf@gnu.org> <87fs209ora.fsf@localhost> <83pm14kwz0.fsf@gnu.org> <87cyx49nt2.fsf@localhost> <83msw8kw2f.fsf@gnu.org> <87a5s89mcy.fsf@localhost> <83jzrcku1t.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ab871c0608779b7c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25768"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Ihor Radchenko , stefankangas@gmail.com, gregory@heytings.org, rms@gnu.org, emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 24 17:02:09 2023 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 1qvIv3-0006Vn-AH for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Oct 2023 17:02:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvIuB-0006Y0-DO; Tue, 24 Oct 2023 11:01:16 -0400 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 1qvIu8-0006Xc-TN for emacs-devel@gnu.org; Tue, 24 Oct 2023 11:01:13 -0400 Original-Received: from mail-ot1-f47.google.com ([209.85.210.47]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvIu5-0007cc-AD; Tue, 24 Oct 2023 11:01:12 -0400 Original-Received: by mail-ot1-f47.google.com with SMTP id 46e09a7af769-6ce327458a6so2333934a34.1; Tue, 24 Oct 2023 08:01:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698159666; x=1698764466; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tpSjVYW7QR/+6YbKoY/DJAA47BT8EqBJmcKzlf03X5Y=; b=tSLrl1HIBy3I3WbPPdXIjGGk3p8knEm/LWdM1hZxDUlAxmgVetl14g2x6657bMJQlT Sx+56LEoL4y1hlDKCkiq38nBHuzir1QckyZ5nN4Ruy3S6pNqON+GYRPxOZsntiw4YDX8 y6Rmw6nr18zKbPaj5QtRmNscVE/U3FfV8eiwKowDIxb4LoTkQ5f+rqIHbQAgjlmVN/Nk lAlddkTo9aFEYXYtBbAIZfnZDzqnflrbaMkMnWc3+2DqSRT/nxoh9dBUBhjPpY+I8Yu7 w29khs6gJq8q567kIMPzVbqrHs4JsVUcL9Nz9R925tcJoqqY6zmuNiR6Y5jGK25jcpJI qiog== X-Gm-Message-State: AOJu0Yx9SGB+NRSGTenWdEk7qWR6V0WxGYvAycCkxKEWvoIc5JtsOmjW V42mosw7v4+03dgc0EXwEPXUMcJbNrsGnnGpt2+Z14MIrqE= X-Google-Smtp-Source: AGHT+IH3jGCrZHwvrH1dkirtjbyEfFrE65rMfd7T4nvW+46vI0VLdNQh8xBFJc9duEZSdHWI3dVVxXTjM1695quzMqc= X-Received: by 2002:a05:6830:1081:b0:6bd:9e1c:93a6 with SMTP id y1-20020a056830108100b006bd9e1c93a6mr8702801oto.0.1698159666099; Tue, 24 Oct 2023 08:01:06 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=209.85.210.47; envelope-from=mplscorwin@gmail.com; helo=mail-ot1-f47.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311798 Archived-At: --000000000000ab871c0608779b7c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Oct 24, 2023 at 9:31=E2=80=AFAM Andrea Corallo w= rote: > Eli Zaretskii writes: > > >> From: Ihor Radchenko > >> Cc: stefankangas@gmail.com, gregory@heytings.org, rms@gnu.org, > >> emacs-devel@gnu.org > >> Date: Tue, 24 Oct 2023 13:33:01 +0000 > >> > >> ----- /tmp/dump.el ----- > >> (require 'cl-lib) > >> (dump-emacs-portable "/tmp/emacs-dumped") > >> -------- end ----------- > >> > >> and got surprised by > >> > >> Error: error ("Trying to dump non fixed-up eln file") > FTR, I tried the same experiment and got the same result. Glad to know I'm not the only person who thought to try this approach :) I then also tried creating a lisp/site-load.el with just (load "emacs-lisp/cl-lib") and got this seemingly circular error, suggesting it might not be so easy to include cl-lib in the dumper. (Or maybe just that I have no idea what I'm doing, which is true.) Loading emacs-lisp/cl-lib (native compiled elisp)... Error: error ("(require cl-macs) while preparing to dump") mapbacktrace(#[1028 "\1\4\203\24\0\301\302!\210\300\4!\210\301\303!\210\202\35\0\301\304!\210\3= \3B\262\1\211\2035\0\300\1@!\210\211A\211\262\2\2035\0\301\305!\210\202!\0\= 301\306!\207" [prin1 princ " " "(" " (" " " ")\n"] 7 "\n\n(fn EVALD FUNC ARGS FLAGS)"]) debug-early-backtrace() debug-early(error (error "(require cl-macs) while preparing to dump")) require(cl-macs) byte-code("\300\301!\210\302\303\304\305#\204\24\0\306\307!\210\306\310!\21= 0\300\207" [provide cl-lib load "cl-loaddefs" noerror quiet require cl-macs cl-seq] 4) load("emacs-lisp/cl-lib") load("loadup.el") (require cl-macs) while preparing to dump make[1]: *** [Makefile:682: emacs.pdmp] Error 127 make[1]: Leaving directory '/h/emacs-dev/emacs-30/src' make: *** [Makefile:554: src] Error 2 > > Yes that's correct, so far we never supported re-dumping Emacs with > elns. > > I think it should be rather easy tho, I'll try to investigate a bit. > > Thanks for looking into this! --000000000000ab871c0608779b7c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Oct 24, 2023 at 9:31=E2=80=AFAM A= ndrea Corallo <acorallo@gnu.org&= gt; wrote:
Eli Zaretskii <eliz@gnu.org> writes:

>> From: Ihor Radchenko <yantar92@posteo.net>
>> Cc: st= efankangas@gmail.com, gregory@heytings.org, rms@gnu.org,
>>=C2=A0 ema= cs-devel@gnu.org
>> Date: Tue, 24 Oct 2023 13:33:01 +0000
>>
>> ----- /tmp/dump.el -----
>> (require 'cl-lib)
>> (dump-emacs-portable "/tmp/emacs-dumped")
>> -------- end -----------
>>
>> and got surprised by
>>
>> Error: error ("Trying to dump non fixed-up eln f= ile")

FTR, I tried the same experi= ment and got the same result.=C2=A0 Glad to know I'm not the only perso= n who thought to try this approach :)

I then also = tried creating a lisp/site-load.el=C2=A0 with just (load "emacs-lisp/c= l-lib") and got this seemingly circular error, suggesting it might not= be so easy to include cl-lib in the dumper.=C2=A0 (Or maybe just=C2=A0that= I have no idea what I'm doing, which is true.)

Loading emacs-lisp/cl-lib (native compiled elisp)...

Error: error = ("(require cl-macs) while preparing to dump")
=C2=A0 mapbacktr= ace(#[1028 "\1\4\203\24\0\301\302!\210\300\4!\210\301\303!\210\202\35\= 0\301\304!\210\3\3B\262\1\211\2035\0\300\1@!\210\211A\211\262\2\2035\0\301\= 305!\210\202!\0\301\306!\207" [prin1 princ " =C2=A0" "(= " " =C2=A0(" " " ")\n"] 7 "\n\n(fn = EVALD FUNC ARGS FLAGS)"])
=C2=A0 debug-early-backtrace()
=C2=A0 = debug-early(error (error "(require cl-macs) while preparing to dump&qu= ot;))
=C2=A0 require(cl-macs)
=C2=A0 byte-code("\300\301!\210\30= 2\303\304\305#\204\24\0\306\307!\210\306\310!\210\300\207" [provide cl= -lib load "cl-loaddefs" noerror quiet require cl-macs cl-seq] 4)<= br>=C2=A0 load("emacs-lisp/cl-lib")
=C2=A0 load("loadup.e= l")
(require cl-macs) while preparing to dump
make[1]: *** [Make= file:682: emacs.pdmp] Error 127
make[1]: Leaving directory '/h/emacs= -dev/emacs-30/src'
make: *** [Makefile:554: src] Error 2
=C2=A0

Yes that's correct, so far we never supported re-dumping Emacs with
elns.

I think it should be rather easy tho, I'll try to investigate a bit.

Thanks for looking into this!
--000000000000ab871c0608779b7c--