unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Gregor Zattler <telegraph@gmx.net>
To: 59064@debbugs.gnu.org
Subject: bug#59064: 29.0.50; build problem git worktree linked to main worktree (repo)
Date: Sun, 06 Nov 2022 00:11:09 +0100	[thread overview]
Message-ID: <87k0492e0i.fsf@no.workgroup> (raw)

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.





             reply	other threads:[~2022-11-05 23:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-05 23:11 Gregor Zattler [this message]
2022-11-06  0:04 ` bug#59064: 29.0.50; build problem git worktree linked to main worktree (repo) 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

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87k0492e0i.fsf@no.workgroup \
    --to=telegraph@gmx.net \
    --cc=59064@debbugs.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).