From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Dario Binacchi <dario.binacchi@amarulasolutions.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [RFC PATCH 1/1] package/automake: include .m4 files of autoconf-archive
Date: Sun, 13 Aug 2023 14:40:37 +0200 [thread overview]
Message-ID: <20230813124037.GX421096@scaer> (raw)
In-Reply-To: <20230729230335.3cd59db6@windsurf>
Thomas, All,
On 2023-07-29 23:03 +0200, Thomas Petazzoni via buildroot spake thusly:
> On Sat, 29 Jul 2023 16:47:14 +0200
> Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:
> > > > diff --git a/package/automake/automake.mk b/package/automake/automake.mk
> > > > index fd7933dd74f9..fc235784641a 100644
> > > > --- a/package/automake/automake.mk
> > > > +++ b/package/automake/automake.mk
> > > > @@ -34,5 +34,6 @@ $(eval $(host-autotools-package))
> > > > AUTOMAKE = $(HOST_DIR)/bin/automake
> > > > ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
> > > > ACLOCAL = $(HOST_DIR)/bin/aclocal
> > > > -ACLOCAL_PATH = $(ACLOCAL_DIR):$(ACLOCAL_HOST_DIR)
> > > > +ACLOCAL_HOST_ARCHIVE_DIR = $(HOST_DIR)/share/autoconf-archive
> > > > +ACLOCAL_PATH = $(ACLOCAL_DIR):$(ACLOCAL_HOST_DIR):$(ACLOCAL_HOST_ARCHIVE_DIR)
> > > > export ACLOCAL_PATH
> > > Could you clarify the motivation? Do you have a specific case for which
> > > this is needed?
> > Following the suggestions of Yann E. MORIN in [1], I tried to fix the
> > issue by submitting a
> > patch to the ethtool project. During the various review stages, I sent
> > a version (much more
> > complicated than the one that was eventually accepted) that required a
> > specific M4
> > macro ([2]). From there, the idea for this patch was born.
> What's confusing to me is: how is autoconf-archive useful/working today
> in Buildroot if aclocal isn't told that
> $(HOST_DIR)/share/autoconf-archive contains a bunch of m4 macros?
> Ah, I see:
> LIBGPIOD_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive
> NEARD_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive
> PYTHON3_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive
> etc.
>
> So it would indeed probably make sense to factorize this. But the
> problem with your change is that $(HOST_DIR)/share/autoconf-archive
> gets added to ACLOCAL_PATH even if autoconf-archive isn't
> used/installed. We could decide it is OK, but it should be mentioned.
> Another side effect is that once autoconf-archive has been installed,
> *all* packages will see the m4 macros from autoconf-archive, not only
> the few packages that explicitly need autoconf-archive. I don't know if
> this is a problem, but it can potentially have some side effects.
>
> Also your patch should drop all the <pkg>_AUTORECONF_OPTS =
> --include=$(HOST_DIR)/share/autoconf-archive, because they become
> redundant.
After thinking a bit on this, here's what I think we should try;
For packages that have _AUTORECONF = YES, we forcibly add
host-autoconf-archive to their _DEPENDENCIES, and always set the macros
search path as proposed here. Supposedly, having macros from
autoconf-archive available should not be a cause for failure to
successfully autorconf, otherwise that would not work on random systems
which have it installed for other reasons, like native builds on
standard distros; also, a missing directorry in the macro search list
should not be a cause for failure.
Consequently, we can drop the ad-hoc dependencies in the individual
packages, and drop the ad-hoc include directove as well.
host-autoconf-archive is a plain autocnf package, without dependencies
(save for the autoconf machinery), and it only ever installs a buncha
files, does not compile anything, so it is pretty fast. Adding it to all
autoreconfigured packages should have a minimal, barely noticeable
impact on the build time.
If the above causes too much breakage, then even this patch was going to
be incorrect, as it would unconditionally add the autocon-archive path
to the search list for all packages that indirectly have
autoconf-archive in their dependencies.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-08-13 12:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-28 11:30 [Buildroot] [RFC PATCH 1/1] package/automake: include .m4 files of autoconf-archive Dario Binacchi
2023-07-28 21:01 ` Thomas Petazzoni via buildroot
2023-07-29 14:47 ` Dario Binacchi
2023-07-29 21:03 ` Thomas Petazzoni via buildroot
2023-08-13 12:40 ` Yann E. MORIN [this message]
2023-08-13 20:39 ` Thomas Petazzoni via buildroot
2023-08-29 17:09 ` Dario Binacchi
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=20230813124037.GX421096@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=dario.binacchi@amarulasolutions.com \
--cc=thomas.petazzoni@bootlin.com \
/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