From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregor Zattler Newsgroups: gmane.emacs.bugs Subject: bug#59064: 29.0.50; build problem git worktree linked to main worktree (repo) Date: Sun, 06 Nov 2022 00:11:09 +0100 Message-ID: <87k0492e0i.fsf@no.workgroup> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39053"; mail-complaints-to="usenet@ciao.gmane.io" To: 59064@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 06 00:12:13 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1orSKi-0009vP-Ey for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Nov 2022 00:12:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orSKZ-0004VV-Vx; Sat, 05 Nov 2022 19:12:04 -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 1orSKY-0004Ut-Ck for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 19:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1orSKY-000552-4W for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 19:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1orSKX-0007Nz-Vb for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 19:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregor Zattler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Nov 2022 23:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59064 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166768988628347 (code B ref -1); Sat, 05 Nov 2022 23:12:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Nov 2022 23:11:26 +0000 Original-Received: from localhost ([127.0.0.1]:58307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orSJy-0007N8-1S for submit@debbugs.gnu.org; Sat, 05 Nov 2022 19:11:26 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orSJv-0007N0-DM for submit@debbugs.gnu.org; Sat, 05 Nov 2022 19:11:25 -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 1orSJv-0004AJ-6V for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 19:11:23 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orSJt-00051H-Bo for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 19:11:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1667689877; bh=OEMt8/D0pqVWCi1CLizfABEyZ4k30C8NbkSGJr11384=; h=X-UI-Sender-Class:From:To:Subject:Date; b=TP0FYoRFiPeUXlyy5XDjxTqNMRHmS3OZxoMAXXiPP5oQ+yt2uVd4pmNDG5T0iWTbP LSTQonfxD2rojjRVhD1RU+hsLg0o5SosdLRJBavk7bNvXNpcjovT28V7VaV+KCR2B1 BjJlTqb8Q1sg0IdmZwuKr8rlldv4fkqfIjjmgNXoN1Bie1gx3PhrgGi74FdPBJaW+L VyLx5OfDxeXgym9cKd0hUAXmZBGxt7he9AY91wjyHg5uWYFmhrWAtDkFjCl075AUFP 3/5Dj4GW8K/kcLUWRzZneQYBBJmtujhzmQfK0BcPOo/nQx/z5UQGkJVnuXLmmzJT+0 gbUy5i5kUT8sA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from localhost ([95.90.239.135]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mq2jC-1pLYDH1wig-00n6Ms; Sun, 06 Nov 2022 00:11:17 +0100 X-Provags-ID: V03:K1:2Ke3454UN6ju1CFNuxgLX7EwvvjkPK+ACkmRBpsyql/+LVz7/tM C7bX32Y+M8J5YUqwPlGjmq+hxPRdHe8S5BMJ2oHzKiHgvVcgxZF/xfRT2mYEIVuBT5DY6rv bxGM5yaHVkNkoMbCEznIkcxG4X3syb+MkUWiYicO4oP8QarDFEbmvbBLIsd4/C95up58OlB UUsvTYomFMPiQPTMuPc7Q== UI-OutboundReport: notjunk:1;M01:P0:ck43BS4ikKk=;PNhWe+ZQmke2Or8ooRc+0dTkZBp Ur0dEfRK878DODOfU2z6OZriCn2USKWqKH/F43m4VAe0vy3p8rksHMC5Wvr6PuCHS2OHOuYIS 4fC7o7xK7Lmk47fwntzP5S74U2kxN4WtPSAr4BI+Qgch/NdEeRAqACjb4h5V/NYcdThCBiNtk 3Agpht30uC3WibhxXqal3YdQloi5PQuc22I0kYkN6VyB7kxscPw7STXuguUMZd/BkUlVn9+v0 jRClr/1K2kGhX2C3BgtjwEUZmo9owemAOqmgVIt4RZO977nBvzsgai7yy5SdYM0EkiwnrYiUo qAexonA0SZODkDQp2ApatQ8qzC68/ZMEGN22PNL554he7zpHshpNpoTlZzkBFncL1iOZclKZk Jx53e2SgaXax7f5VyGN2wD71NusSmbEuig66IG1hD+KfOXdUqhrX74I+tRi25ArvgIJWL2WAQ YgSqL62eNEE9Zakg9WcaRw4e66Rlr6XPE8uC70sxzYsF4oVP0vNaxVs4OUDvE9zlFty7ykwOA XxMXPL7Dgnp5csZyZ5uuiIrPXyf8RCJmSnjQ53/g4ErT9F0xjEQJcUpg1QBnMbqWMqmq/IBt8 ww+5rplGDwTA5/rCCWWcFHWTJgqjfDgBYkezgf41zCdHlUga3XeosSs4jeylqKuv4eU5Pgbj0 ZxI4IsJkNTo5J9HqjkRDejspAqX/nd6Qw5PmSx+qulwSKZn0tErQ95KDGRTuxyfpjYt3Lb+ij LRhIkjDhhLOG8PAulfCQyCCviZBErp0GbC89BytNk939DjPcTE6jA49OuBSDKko595Rz5wGp Received-SPF: pass client-ip=212.227.17.22; envelope-from=telegraph@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247167 Archived-At: 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.