public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Richard Earnshaw (lists)" <Richard.Earnshaw@arm.com>
To: Christophe Lyon <christophe.lyon@linaro.org>,
	binutils@sourceware.org, GCC Mailing List <gcc@gcc.gnu.org>,
	gdb-patches@sourceware.org
Subject: Re: Help needed with maintainer-mode
Date: Thu, 29 Feb 2024 10:41:05 +0000	[thread overview]
Message-ID: <66f6bb34-e7c3-4bc4-8c37-845aee81f6fe@arm.com> (raw)
In-Reply-To: <CAPS5khZr3QCN+Ztug-RE4xge+=YGc+hwHWZ8XAhKiQd4X5_O6g@mail.gmail.com>

On 29/02/2024 10:22, Christophe Lyon via Gcc wrote:
> Hi!
> 
> Sorry for cross-posting, but I'm not sure the rules/guidelines are the
> same in gcc vs binutils/gdb.
> 
> TL;DR: are there some guidelines about how to use/enable maintainer-mode?
> 
> In the context of the Linaro CI, I've been looking at enabling
> maintainer-mode at configure time in our configurations where we test
> patches before they are committed (aka "precommit CI", which relies on
> patchwork).
> 
> Indeed, auto-generated files are not part of patch submissions, and
> when a patch implies regenerating some files before building, we
> currently report wrong failures because we don't perform such updates.
> 
> I hoped improving this would be as simple as adding
> --enable-maintainer-mode when configuring, after making sure
> autoconf-2.69 and automake-1.15.1 were in the PATH (using our host's
> libtool and gettext seems OK).
> 
> However, doing so triggered several problems, which look like race
> conditions in the build system (we build at -j160):
> - random build errors in binutils / gdb with messages like "No rule to
> make target 'po/BLD-POTFILES.in". I managed to reproduce something
> similar manually once, I noticed an empty Makefile; the build logs are
> of course difficult to read, so I couldn't figure out yet what could
> cause this.
> 
> - random build failures in gcc in fixincludes. I think this is a race
> condition because fixincludes is updated concurrently both from
> /fixincludes and $buillddir/fixincludes. Probably fixable in gcc
> Makefiles.
> 
> - I've seen other errors when building gcc like
> configure.ac:25: error: possibly undefined macro: AM_ENABLE_MULTILIB
> from libquadmath. I haven't investigated this yet.
> 
> I've read binutils' README-maintainer-mode, which contains a warning
> about distclean, but we don't use this: we start our builds from a
> scratch directory.
> 
> So... I'm wondering if there are some "official" guidelines about how
> to regenerate files, and/or use maintainer-mode?  Maybe I missed a
> "magic" make target (eg 'make autoreconf-all') that should be executed
> after configure and before 'make all'?
> 
> I've noticed that sourceware's buildbot has a small script
> "autoregen.py" which does not use the project's build system, but
> rather calls aclocal/autoheader/automake/autoconf in an ad-hoc way.
> Should we replicate that?
> 
> Thanks,
> 
> Christophe

There are other potential gotchas as well, such as the manual copying of the generated tm.texi back into the source repo due to relicensing.  Perhaps we haven't encountered that one because patches generally contain that duplicated output.

If we want a CI to work reliably, then perhaps we should reconsider our policy of stripping out regenerated code.  We have a number of developer practices, such as replying to an existing patch with an updated version that the CI can't handle easily (especially if the patch is part of a series), so there may be space for a discussion on how to work smarter.

My calendar says we have a toolchain office hours meeting today, perhaps this would be worth bringing up.

R.


  reply	other threads:[~2024-02-29 10:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 10:22 Christophe Lyon
2024-02-29 10:41 ` Richard Earnshaw (lists) [this message]
2024-02-29 17:36   ` Christophe Lyon
2024-02-29 11:00 ` Mark Wielaard
2024-02-29 17:39   ` Christophe Lyon
2024-03-01 13:08     ` Mark Wielaard
2024-03-01 13:21       ` Christophe Lyon
2024-03-01 16:32       ` Christophe Lyon
2024-03-03 21:15         ` Mark Wielaard
2024-03-04  0:30           ` Sam James
2024-03-04  9:36             ` Thomas Schwinge
2024-03-04 10:42               ` Christophe Lyon
2024-03-04 11:25                 ` Jonathan Wakely
2024-03-04 14:46                   ` Christophe Lyon
2024-03-04 15:36                     ` Richard Earnshaw (lists)
2024-03-04 15:40                       ` Richard Earnshaw
2024-03-04 16:42                         ` Christophe Lyon
2024-03-04 17:38                           ` Richard Earnshaw (lists)
2024-03-04 19:27                             ` Vladimir Mezentsev
2024-03-04 20:04                               ` Jonathan Wakely
2024-03-05 14:26                                 ` Richard Earnshaw (lists)
2024-03-05 15:39                                   ` Richard Earnshaw
2024-03-06 15:04     ` Andrew Carlotti
2024-03-06 17:22       ` Richard Earnshaw (lists)
2024-02-29 19:49 ` Thiago Jung Bauermann
2024-03-01 10:09   ` Christophe Lyon

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=66f6bb34-e7c3-4bc4-8c37-845aee81f6fe@arm.com \
    --to=richard.earnshaw@arm.com \
    --cc=binutils@sourceware.org \
    --cc=christophe.lyon@linaro.org \
    --cc=gcc@gcc.gnu.org \
    --cc=gdb-patches@sourceware.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.
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).