From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: Lisp files that load cl-lib in problematical ways Date: Tue, 24 Oct 2023 14:05:39 -0400 Message-ID: References: <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: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19946"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Ihor Radchenko , stefankangas@gmail.com, gregory@heytings.org, rms@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 24 20:06:37 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 1qvLnZ-0004zV-Gr for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Oct 2023 20:06:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvLmt-0005Ty-RX; Tue, 24 Oct 2023 14:05:55 -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 1qvLmn-0005Tb-3d for emacs-devel@gnu.org; Tue, 24 Oct 2023 14:05:49 -0400 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 1qvLml-0003N8-Ls; Tue, 24 Oct 2023 14:05:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=O59Px40Cud8I+Xmns58FYM3SNdtBcpfVXbQTdhZKplA=; b=XkAa2qxW95nhFqYk9zKV VnlrYPUUI2vN41URrJ80H+SqHyeArJCYAe3oGtiRUnElkNnRAQpT/rQOJpTmqb7nOUj47ebOxGmMb +XaimffOyA4q/xf6LqvcADwHlBckCkdjUeyFL93Pf+D9xEU0VzEhXs4KGjlQskOi+U+kkX7K4q09y CCNtDMKcO9ClOZ82Z26V0GUvKk3aE587i9+2R8oWjSuWWjagFc2DAA5xCR2dyWmPrFZIZpc1ndtlA Xn0fDm/CkOPK4Z6zElVaMS+1JAxGX4zBii87lhnFT9qE1tjhcp+Lf3OYuLYHt6KKbU18F8P04SS4/ r8YtS7tl/vm4TQ==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1qvLmd-0000b3-KT; Tue, 24 Oct 2023 14:05:39 -0400 In-Reply-To: (Andrea Corallo's message of "Tue, 24 Oct 2023 10:31:33 -0400") 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:311811 Archived-At: Andrea Corallo writes: > 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 >>> >>> > ./src/emacs -Q --batch -l /tmp/dump.el >>> Dumping fingerprint: 83db7cb9b32874a4c4a0b923b2ca94f0d08a9a22ff41e18a2f92290276ef7d07 >>> >>> Error: error ("Trying to dump non fixed-up eln file") >>> mapbacktrace(#f(compiled-function (evald func args flags) #)) >>> debug-early-backtrace() >>> debug-early(error (error "Trying to dump non fixed-up eln file")) >>> dump-emacs-portable("/tmp/emacs-dumped") >>> eval-buffer(# nil "/tmp/dump.el" nil t) >>> load-with-code-conversion("/tmp/dump.el" "/tmp/dump.el" nil t) >>> load("/tmp/dump.el" nil t) >>> command-line-1(("-l" "/tmp/dump.el")) >>> command-line() >>> normal-top-level() >>> Trying to dump non fixed-up eln file >>> >>> Is it a bug? Or do I miss something important? >> >> I think you are trying to do something that isn't supported. Andrea, >> am I right? >> >> Your original idea was to add stuff to loadup, not to dump an already >> dumped Emacs, and with AOT *.eln stuff on top of that. Preloaded >> *.eln files are handled specially by loadup.el during the dumping >> process, and you tried doing that without observing the protocol of >> *.eln dumping. > > > 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. Okay with f7d88f4a047 on master I'm now able to re-dump a native compiled Emacs! I followed essentially what Ihor attemped so I loaded cl-lib before re-dumping as well. Not 100% sure loadup.el is the best place to host the definition of the the function and the two new variables I've introduced. Happy to move things around if necessary. Thanks Andrea