[Buildroot] autotools, autorefconf, libtoolize and non-existing m4 directory

Thomas Petazzoni thomas.petazzoni at bootlin.com
Tue Dec 10 13:30:24 UTC 2019

On Tue, 10 Dec 2019 14:21:06 +0100
Michael Walle <michael at walle.cc> wrote:

> > This is simple, and works just fine.  
> Correct, that would work, actually, we already had that construct in the
> recipe. But as I've already said, this behaviour is very different than
> on the host. Esp. if you'd use "aclocal -i"; which I don't know if it is
> used at all. Currently there are many workarounds, all are fine. My
> intention was to make you aware of this bug; or if you already knew it,
> your opinion on it. Eg. aclocal is handling the first include path in a
> special way, but buildroot already occupies that slot.

No, I was not aware that the first include path is handled in a special
way, and that because Buildroot uses that slot, the m4/ directory no
longer gets created automatically.

In fact, aclocal's man page says:

              copy third-party files to the first -I directory

So indeed that's I guess how the m4/ directory gets created.

Perhaps we should use:

              directory holding third-party system-wide files

instead? Could you try that in the definition of $(AUTORECONF), instead
of the -I options?

In fact, it is quite worrying that aclocal -i -I/foo/bar copies stuff
to /foo/bar. Indeed, we clearly don't want aclocal to clutter
$(ACLOCAL_DIR) or $(ACLOCAL_HOST_DIR) with additional files by effect
of running autoreconf.

Best regards,

Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering

More information about the buildroot mailing list