[bitbake-devel] is there a bitbake equivalent to "touch"ing a file for gnu make?

Andre McCurdy armccurdy at gmail.com
Wed Feb 26 01:31:52 UTC 2020


On Tue, Feb 25, 2020 at 5:07 PM Robert P. J. Day <rpjday at crashcourse.ca> wrote:
>
> On Tue, 25 Feb 2020, Andre McCurdy wrote:
>
> > On Tue, Feb 25, 2020 at 1:22 PM <rpjday at crashcourse.ca> wrote:
> > >
> > >    colleague emails me the following puzzler … current project based on
> > > wind river linux 9 (so effectively morty 2.2), so it has bitbake 1.32.
> > > apparently, for a specific recipe, there are intermittent build errors
> > > which she suspects are caused by a race condition in the build of that
> > > recipe.
> > >
> > >    *but* that build error only occurs when something about the underlying
> > > layers have changed; as in, someone checked *something* in somewhere
> > > forcing at least something to be rebuilt, and that error does not
> > > even occur on *all* rebuilds, just some of them. so the question is,
> > > which underlying recipe change and rebuild could be triggering this?
> > >
> > >    she *suspects* it might be openssl, as their project is making
> > > regular changes to openssl, and that recipe seems to be an ultimate
> > > dependency for quite a number of recipes, so she's just guessing
> > > that might be the cause.
> > >
> > >    in order to test this, she is currently running through a loop
> > > wherein, in order to kick off at least some recipe rebuilds, she
> > > makes some innocuous change to openssl, causing it to be rebuilt,
> > > which then rebuilds all recipes that depend on it and so on.
> > >
> > >    yuck.
> > >
> > >    on the other hand, i couldn't immediately suggest anything
> > > cleaner. my thought was to (somehow) fake a rebuild of openssl
> > > (perhaps by invalidating some timestamp), but that's not going
> > > to work as once it's rebuilt, it's just going to look like it
> > > did before, so nothing else will be rebuilt.
> >
> > Not sure what you mean by "fake" a rebuild. You can force a rebuild
> > by e.g. manually changing something in the recipe such as PR,
> > running "bitbake -c cleansstate openssl", ...
>
>   are you sure about that? i can test this when i get home, but i
> thought just cleaning the sstate would not force rebuilds of the rest
> of those recipes, just that one.

Not 100% sure. Changing PR in the recipe should work though.

But anyway you probably want to focus on the specific recipe which
fails intermittently. Forcing it to be rebuilt after removing tmp
should at least tell you if it's a missing build dependency. If it
fails then it's a missing dependency and it should be obvious from the
build error (missing header, library, etc) what the missing dependency
is.

If it passes then it suggests that recipe has an unconstrained
configure option which is behaving differently based on whether it
autodetects something in the sysroot (which is shared in OE 2.2). In
that case it should fail consistently if you run the full build (so
that sysroot in tmp is fully populated) and then cleansstate and
rebuild the failing recipe.


More information about the bitbake-devel mailing list