Bug 11779 - autotools.bbclass breaks builds with nested autotools subprojects
Summary: autotools.bbclass breaks builds with nested autotools subprojects
Status: RESOLVED WORKSFORME
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.1.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.4
Assignee: Krzysztof Nowicki
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-07-11 06:56 UTC by Krzysztof Nowicki
Modified: 2017-08-25 16:40 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Nowicki 2017-07-11 06:56:59 UTC
When creating a recipe for texlive I have noticed that this project is a distribution of several other subprojects, each of them having its own autotools tree. All of them are connected by the top-level autotools scripts.

When trying to build texlive with yocto/bitbake the configure script runs and completes successfully, however a subsequent run of 'make' will just go through some directories and finish quickly stating that it has nothing to do. No files are being compiled.

After some investigation I have found out that the autotools.bbclass tries to forcefully recreate the autotools scripts using autoreconf. The problem is that in order to do this it deletes all 'configure' scripts from directories, where it finds an accompanying 'configure.ac' or 'configure.in' file. It then performs executes 'autoreconf', however only in the root directory. This effectively means that all autotools subprojects are broken.

As a workaround I have deleted all 'configure.in' and 'configure.ac' files before executing 'do_configure' from autotools.bbclass to prevent it from rebuilding the autotools scripts and texlive compiled successfully.

I think autotools.bbclass should be consistent in what it does. Either it should only delete the top-level 'configure' script or it should recursively recreate all autotools subprojects. Eventually it could also offer some means of configuration via a variable so that the recipe can prepare a list of subprojects where 'autoreconf' should be run.
Comment 1 Ross Burton 2017-07-11 08:57:21 UTC
My understanding is that correctly nested configures will all be regenerated by autoreconf: gettext has five nested configures for example.

ie from gettext do_configure log:

autoreconf: Entering directory `.'
...
autoreconf: configure.ac: adding subdirectory gettext-runtime to autoreconf
...
autoreconf: configure.ac: adding subdirectory libasprintf to autoreconf

If the texlive do_configure script doesn't have this then it doesn't do nested configures properly.  Can you check the configure log?
Comment 2 Richard Purdie 2017-08-24 15:17:21 UTC
This works for recipes like gettext so we're not aware of any bug. If you are able to provide more information you can reopen but we don't see any issue right now.