all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#59064: 29.0.50; build problem git worktree linked to main worktree (repo)
@ 2022-11-05 23:11 Gregor Zattler
  2022-11-06  0:04 ` Matt Armstrong
  2022-11-06 11:30 ` Gregor Zattler
  0 siblings, 2 replies; 11+ messages in thread
From: Gregor Zattler @ 2022-11-05 23:11 UTC (permalink / raw)
  To: 59064

Dear Emacs developers,

building Emacs from sources in a detached linked worktree[1]
linked to a main worktree[1] fails, because necessary
-by.el, -wy.el files are not generated as described in
admin/grammars/Makefile for targets `bovine` and `wisent`.
Instead while these files are generated error messages "Args
out of range: "master", 0, 7" are shown and the respective
files are not generated.

Why this is the case, I have no clue.  The respective code
for generating these files is way above my skills.

But I found out that building instead from sources in a
linked worktree linked to a bare repository[1] works as
expected.

This is what I will do from now on, therefore the
aforementioned failure is no problem for me any more.

If there is a bug in the Emacs build system regarding linked
worktrees linked to main worktrees, though, is up to you.

In order to rule out any misconfiguration on my side, I
installed Emacs build dependencies on a minimal installation
of Debian/bullseye, cloned the emacs git repo with a freshly
created and otherwise unconfigured user.  To trigger the
build process this user then issued only "make V=1 -j 1" to
get the most default build process.  All tests were made
with freshly cloned repos respectively freshly generated git
worktrees created from those pristine git repos.

The difference between a linked worktree and its main
worktree is in the .git directory only, as this diff shows:
$ diff -aNurx.git/* emacs2 emacs2-worktree
File emacs2/.git is a directory while file emacs2-worktree/.git is a regular file


While investigating, I learned that the build process embeds
the repository revision into the Emacs binary.  This is the
case if Emacs is build in a linked worktree linked to a bare
repository, as the template from emacs-report-bug shows.

In case of the linked worktree linked to the main worktree
the build process does *not* fail if one removes the .git
file before.  This destroy the link to the repo, though and
the repository version is not embedded in the
resulting binary accordingly.

Why the existence of the .git file disturbs the production
of the grammar files, I have no clue.

If you have further specific questions, I'm happy to help as
far as my very limited knowledge allows.


Thanks for your attention, Gregor

P.S.: This started with a message on help-gnu-emacs:
https://lists.gnu.org/archive/html/help-gnu-emacs/2022-10/msg00860.html
and helpful answers by Eli:
https://lists.gnu.org/archive/html/help-gnu-emacs/2022-11/msg00002.html
and following messages.

[1] In git parlance a
    - "linked worktree" has no .git directory, but a .git
      *file* which's contents points to either a
      - "main worktree" which contains the .git directory,
        (is a git repo with a checked out worktree of its
        own), or a
      - bare repository, which basically is a directory
        containing the contents of a .git dir but without a
        checked out worktree.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-11-07 17:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-05 23:11 bug#59064: 29.0.50; build problem git worktree linked to main worktree (repo) Gregor Zattler
2022-11-06  0:04 ` Matt Armstrong
2022-11-06 11:30 ` Gregor Zattler
2022-11-06 14:59   ` Gregor Zattler
2022-11-06 18:17     ` Matt Armstrong
2022-11-06 18:38       ` Philip Kaludercic
2022-11-06 19:05         ` Eli Zaretskii
2022-11-07  8:52           ` Philip Kaludercic
2022-11-07 17:24             ` Matt Armstrong
2022-11-06 21:35       ` Gregor Zattler
2022-11-07 17:19         ` Matt Armstrong

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.