all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lynn Winebarger <owinebar@gmail.com>
Cc: akrl@sdf.org, michael.albinus@gmx.de, emacs-devel@gnu.org,
	monnier@iro.umontreal.ca
Subject: Re: Native-compilation build process (was Re: Loading tramp for dump goes into infinite regress)
Date: Wed, 03 Aug 2022 19:15:26 +0300	[thread overview]
Message-ID: <831qtx5mn5.fsf@gnu.org> (raw)
In-Reply-To: <CAM=F=bAOR7j0Pq_MesHKwdPjsRXH0r9yX_2TzwBoL_WJEk3q1g@mail.gmail.com> (message from Lynn Winebarger on Wed, 3 Aug 2022 10:53:12 -0400)

> From: Lynn Winebarger <owinebar@gmail.com>
> Date: Wed, 3 Aug 2022 10:53:12 -0400
> Cc: Andrea Corallo <akrl@sdf.org>, Michael Albinus <michael.albinus@gmx.de>, 
> 	emacs-devel <emacs-devel@gnu.org>, Stefan Monnier <monnier@iro.umontreal.ca>
> 
> > Why are you running "make" only in 'src'?  Some necessary parts of the
> > build must also run "make" in 'lisp' and in other places.
> 
> I'm replicating the 3 stage build process Stefan Monnier (added to the
> cc list) described by invoking a shell script from site-load, when
> dump-mode is set to pdump.

Well, Stefan definitely didn't mean for you to shoot yourself in the
foot.  Isn't it possible to run these 2 stages from the top-level
Makefile?

Alternatively, say "make BINDESTDIR=..." etc.

Or, as I suggested, copy the default values of these two variables
from the top-level Makefile.in to src/Makefile.in.  Then it should
probably work from 'src' as well, provided that the other variables
these two reference are also defined there.

>                           The shell script produces the second stage
> build - the one with a dump containing just the files loaded directly
> from loadup - then uses it to compile the files loaded by site-load.
> It explicitly builds the emacs.pdmp target in src, moves emacs and
> emacs.pdmp to emacs-1 and emacs-1.pdmp, then invokes:
> make -C ../lisp EMACS=../src/emacs-1 compile-target
> TARGETS="${SL_TARGETS}" BYTE_COMPILE_EXTRA_FLAGS="--eval '(setq
> comp-file-preloaded-p t)'"
> where SL_TARGETS has been extracted from site-load.el using the same
> procedure used in constructing lisp.mk

You could add BIN_DESTDIR= and ELN_DESTDIR= settings to those
commands.

> > The final installation _must_ be specified, yes.  Using the build
> > directory won't help because Emacs already does that internally.  IOW,
> > it only needs help in knowing where the stuff _will_ be installed
> 
> That is true for the dump that is going to be installed, yes, but for
> intermediate stages in the build that knowledge is not required for
> the resulting dump to be useful.

The Emacs build always produces binaries that can be invoked either
way.  So if you use our Makefiles, you need to play by their rules.

> In any case, once loadup determines there are native compile units
> loaded while preparing for the dump, either they all should have the
> names fixed up, or an error should be signaled.

The names cannot be fixed up, because the build doesn't know how.
These two variables get their values from the configure script, where
the user specifies where the package will be installed.  Without that,
the build cannot know their values.

> It's not clear to me, though, why the pdmp loading process should
> refuse to work if the compilation units recorded in the dump file are
> just strings.

Because it needs to record in the binary where to look for those *.eln
files.  Emacs can be installed in a variety of ways, using all kinds
of "tricks" like symlinks and such, so the names need to include
directories to allow Emacs to find these files quickly at startup.  If
startup is delayed because Emacs looks hight and low for its files,
users will be annoyed.

> It seems to me the "dual location" is more of a "nice
> to have" feature than a real requirement.

No, it's a requirement.  If nothing else, the just-built Emacs binary
is run as part of the build, so it needs to be able to do that.

> There could be a flag to
> dump an image with only the (relative) final installation paths
> recorded, or it could just be a build that will always be run in place
> (e.g. an ordinary user build).

Many users never install Emacs, or at least never install some of its
versions.

Anyway, this is a non-starter: we won't give up this useful
functionality.

> For user dumps, recording the absolute paths would presumably work
> fine, no?

No, because then you cannot relocate the Emacs tree to a different
top-level directory, and have it still work.

There are good reasons behind all these features, they aren't
arbitrary nor redundant.



  reply	other threads:[~2022-08-03 16:15 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-24  0:47 Loading tramp for dump goes into infinite regress Lynn Winebarger
2022-07-24  7:55 ` Michael Albinus
2022-07-24 12:05   ` Lynn Winebarger
2022-07-24 12:23     ` Eli Zaretskii
2022-07-24 13:30       ` Lynn Winebarger
2022-07-24 13:34         ` Eli Zaretskii
2022-07-24 14:05           ` Lynn Winebarger
2022-07-24 14:09             ` Eli Zaretskii
2022-07-24 14:28               ` Lynn Winebarger
2022-07-24 16:00             ` Lynn Winebarger
2022-07-24 16:20               ` Lynn Winebarger
2022-07-24 16:31                 ` Eli Zaretskii
2022-07-25 12:49                   ` Lynn Winebarger
2022-07-25 13:56                     ` Eli Zaretskii
2022-07-26 11:24                       ` Lynn Winebarger
2022-07-27  0:58                         ` Lynn Winebarger
2022-07-27  2:48                           ` Lynn Winebarger
2022-07-27  8:31                             ` Lynn Winebarger
2022-08-09 12:29                       ` Lynn Winebarger
2022-08-09 12:36                         ` Po Lu
2022-08-09 13:22                           ` Lynn Winebarger
2022-08-09 13:42                             ` Po Lu
2022-08-09 15:55                               ` Lynn Winebarger
2022-07-25 16:54                     ` Stefan Monnier
2022-07-25 17:05                       ` Stefan Monnier
2022-07-26  0:28                       ` Lynn Winebarger
2022-07-26  1:10                         ` Lynn Winebarger
2022-08-06  6:07                       ` Lynn Winebarger
2022-08-06 12:57                         ` Lynn Winebarger
2022-08-06 15:39                           ` Lynn Winebarger
2022-08-06 20:23                             ` Working fully native-compiled "mega dump" (was Re: Loading tramp for dump goes into infinite regress) Lynn Winebarger
2022-08-06 20:52                               ` Lynn Winebarger
2022-07-25 20:11                     ` Loading tramp for dump goes into infinite regress Andrea Corallo
2022-07-31 20:22                       ` Lynn Winebarger
2022-08-03  9:58                         ` Lynn Winebarger
2022-08-03 12:22                           ` Eli Zaretskii
2022-08-03 14:53                             ` Native-compilation build process (was Re: Loading tramp for dump goes into infinite regress) Lynn Winebarger
2022-08-03 16:15                               ` Eli Zaretskii [this message]
2022-08-04  3:33                                 ` Lynn Winebarger
2022-08-05  1:57                                   ` Lynn Winebarger
2022-07-24 16:23               ` Loading tramp for dump goes into infinite regress Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=831qtx5mn5.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=akrl@sdf.org \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@iro.umontreal.ca \
    --cc=owinebar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.