Hi,

My side quest to clean up the two-decades of cruft in autotools.bbclass reached 
another milestone today with the removal of the “acpaths” variable and the 
corresponding logic[1].  As this might well cause build failures I thought I 
should explain why this happened and what the fix is.

Previously the autotools class would usually search through ${S} and look for 
directories that contain .m4 files. It would then add each of these directories 
to the aclocal search path when calling autoreconf.  I’m sure 20 years ago when 
the history of the class disappears into bitkeeper there were good reasons for 
this (for a start, autoreconf back then was famously fragile) but nowadays this 
is not needed so the class no longer does this: it simply tells aclocal where 
the native and target macro directories in the sysroot are and assumes the 
configure scripts have done the right thing.

That assumption is where you might hit problems.  The vast majority of recipes 
just work but there will be a few which don’t autoreconf out of the box, 
typically where there is a bespoke bootstrap.sh or similar which explicitly 
passes -I flags to autoreconf, or calls aclocal/autoconf directly.  This will 
typically be seen as unexpanded non-builtin macros (that is, anything that 
doesn’t start AC_ or AM_).

Resolving this is usually simple. First, look for a bootstrap.sh or autogen.sh 
or similar: a script that calls autoconf or autoreconf. This will likely 
contain some “-I some/path” arguments:

  aclocal -I m4macros

These can be passed to autoreconf in the recipe:

  EXTRA_AUTORECONF += “-I m4macros”

If there is no obvious script (it’s possible the maintainer doesn’t ship it in 
tarballs, for example) then you’ll have to search the source code for the macro 
and set EXTRA_AUTORECONF as above with the right path.

And hopefully that’s all there is to it! If you come across any breakage that 
isn’t trivially fixed in a few minutes then feel free to message me.  I’ve 
already sent a series that - as far as I can tell - fixes meta-oe, but other 
layers may well have further issues.

Thanks,
Ross

[1] 
https://git.openembedded.org/openembedded-core/commit/meta?id=e718d1be2c4fb54cf363c23f929358e1be68c724
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64885): https://lists.yoctoproject.org/g/yocto/message/64885
Mute This Topic: https://lists.yoctoproject.org/mt/111416280/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to