From: Eli Zaretskii <eliz@gnu.org>
To: Alan Third <alan@idiocy.org>
Cc: eggert@cs.ucla.edu, dancol@dancol.org, emacs-devel@gnu.org
Subject: Re: pdumper bootstrap error
Date: Mon, 21 Jan 2019 22:33:22 +0200 [thread overview]
Message-ID: <83a7jtagz1.fsf@gnu.org> (raw)
In-Reply-To: <20190121194306.GA61684@breton.holly.idiocy.org> (message from Alan Third on Mon, 21 Jan 2019 19:43:06 +0000)
> Date: Mon, 21 Jan 2019 19:43:06 +0000
> From: Alan Third <alan@idiocy.org>
> Cc: eggert@cs.ucla.edu, dancol@dancol.org, emacs-devel@gnu.org
>
> > Anyway, is this really TRT? Both emacs$(EXEEXT) and
> > bootstrap-emacs$(EXEEXT) are (or should be) identical, so why do you
> > need to copy one over the other? It should be a no-op.
>
> The existing code copies the pdmp file. In Makefile.in, just above the
> code I added is the comment:
>
> ## The dumped Emacs is as functional and more efficient than
> ## bootstrap-emacs, so we replace the latter with the former.
>
> I can see the unexec code path replacing bootstrap-emacs, but the
> pdumper code doesn’t.
That's expected: with unexec, the dumped Emacs executable is different
from bootstrap-emacs, but with pdumper they are identical. That
comment is only correct for the unexec case.
> Then below that is this:
>
> ifeq ($(DUMPING),pdumper)
> $(pdmp): emacs$(EXEEXT)
> LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=pdump
> cp -f $@ $(bootstrap_pdmp)
> endif
>
> which looks very much to me like bootstrap-emacs.pdmp is being replaced
> with the new one, which was built using the new temacs. Here’s the output:
>
> Dumping under the name emacs.pdmp
> dumping fingerprint: bc058dbc261d383930761d6e2df83fee5bba2b36bab3d69333b2f5c09c6bfc64
> Dump complete
> Byte counts: header=80 hot=10523232 discardable=117216 cold=4485912
> Reloc counts: hot=587886 discardable=4552
> Adding name emacs-27.0.50.71
> Adding name emacs-27.0.50.71.pdmp
> cp -f emacs.pdmp bootstrap-emacs.pdmp
>
> There is no corresponding copy of (t)emacs over bootstrap-emacs, even
> though bootstrap-emacs.pdmp has now been built by temacs.
Right, because they are (or should be) identical, so the copy would be
a waste of cycles.
> > I guess I'm saying we should step back and understand better why you
> > have a mismatch of the fingerprint. Can you show the last part of the
> > build, starting from "CCLD temacs" and all the way till the end,
> > without this change? I'd like to understand better how the
> > fingerprints come out different (they are identical on my system).
>
> Here’s the output (the whole thing is in the attachment in the first email
> I sent):
Thanks. I think I see the problem. Your build lacks one crucial
step:
> CCLD temacs
> [ld warnings elided]
> ../build-aux/install-sh -c -d ../etc
> rm -f emacs && cp -f temacs emacs
> LC_ALL=C ./temacs -batch -l loadup --temacs=pdump
> Loading loadup.el (source)...
> dump mode: pdump
What is missing here is invocation of temacs with --temacs=pbootstrap.
Here's how it looks on my system:
CCLD temacs.exe
/bin/mkdir -p ../etc
cp -f temacs.exe bootstrap-emacs.exe
rm -f bootstrap-emacs.pdmp
./temacs --batch -l loadup --temacs=pbootstrap
Loading loadup.el (source)...
dump mode: pbootstrap
[...]
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name bootstrap-emacs.pdmp
dumping fingerprint: 2b248756260d5de08810b0b41d60e6f7411fb4ae16995fa3f7fcfb49907a3a9e
Dump complete
Byte counts: header=80 hot=6817180 discardable=107200 cold=4235996
Reloc counts: hot=399276 discardable=4862
[...]
rm -f emacs.exe && cp -f temacs.exe emacs.exe
LC_ALL=C ./temacs -batch -l loadup --temacs=pdump
Loading loadup.el (source)...
dump mode: pdump
The "cp -f temacs.exe bootstrap-emacs.exe" part comes from this rule
in src/Makefile:
bootstrap-emacs$(EXEEXT): temacs$(EXEEXT)
$(MAKE) -C ../lisp update-subdirs
ifeq ($(DUMPING),unexec)
$(RUN_TEMACS) --batch $(BUILD_DETAILS) -l loadup --temacs=bootstrap
ifneq ($(PAXCTL_dumped),)
$(PAXCTL_dumped) emacs$(EXEEXT)
endif
mv -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT)
@: Compile some files earlier to speed up further compilation.
$(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
else
@: In the pdumper case, make compile-first after the dump
cp -f temacs$(EXEEXT) bootstrap-emacs$(EXEEXT) <<<<<<<<<<<<<<<<<
endif
and since we have just produced a new temacs, this rule is expected to
fire, and produce a new bootstrap-emacs. But on your system, it
doesn't. My first suspicion is that this has something to do with
time granularity of the filesystem on which you run this: Make doesn't
notice that temacs is newer than bootstrap-emacs, so it doesn't remake
the latter. Is it possible that the time stamps of temacs and
bootstrap-emacs are such that this happens? If so, what kind of
filesystem is that?
> make[3]: Circular bootstrap-emacs <- temacs dependency dropped.
This warning is also worrisome: I don't get it, and I fail to see any
such circular dependency in my Makefile. Maybe it's because macuvs.h
depends on bootstrap-emacs, and on macOS macuvs.h is indeed used?
> Perhaps successful builds are simply ones where it doesn’t need to use
> bootstrap-emacs?
_Every_ build that rebuilds temacs should also rebuild
bootstrap-emacs. That this doesn't happen for you is IMO part of the
problem.
next prev parent reply other threads:[~2019-01-21 20:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-19 22:25 pdumper bootstrap error Alan Third
2019-01-19 22:38 ` Philipp Stephani
2019-01-19 22:52 ` Paul Eggert
2019-01-20 10:57 ` Alan Third
2019-01-21 16:53 ` Alan Third
2019-01-21 17:18 ` Eli Zaretskii
2019-01-21 19:07 ` Eli Zaretskii
2019-01-21 19:50 ` Alan Third
2019-01-21 19:43 ` Alan Third
2019-01-21 20:33 ` Eli Zaretskii [this message]
2019-01-21 21:20 ` Alan Third
2019-01-22 3:31 ` Eli Zaretskii
2019-01-22 16:49 ` Eli Zaretskii
2019-01-22 23:20 ` Alan Third
2019-01-23 16:24 ` Eli Zaretskii
2019-01-23 19:47 ` Alan Third
2019-01-23 19:56 ` Eli Zaretskii
2019-01-25 22:17 ` Alan Third
2019-01-22 17:14 ` Alan Third
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=83a7jtagz1.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=alan@idiocy.org \
--cc=dancol@dancol.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
/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.