[oe] Issue with (gcc-cross-|glibc-)initial and packaged staging

Tom Rini tom_rini at mentor.com
Tue Mar 9 20:07:29 UTC 2010

On Tue, 2010-03-09 at 11:40 +0000, Thomas Horsten wrote:
> I've spotted a rather annoying interim build failure but I'm not sure
> how to best tackle the situation.
> For example, gcc-cross-initial and gcc-cross install some of the same
> files in staging. Normally this doesn't matter, since gcc-cross
> overwrites the earlier ones installed by -initial, but when using
> packaged staging and many threads (BBTHREADS=10 for example), it
> sometimes happens that the pstaging packages for gcc-cross-initial and
> gcc-cross get installed into staging in the wrong order (or at the same
> time in two different threads), resulting in all builds after that
> failing due to undefined references in the lib files from -initial.

So, my guess is that what happens is that when we copy the stamps from
the pstage package over to the live stamps directory to check them,
another thread comes along and sees they're in and we get out of order.
Can you try something like (pastebin'd to avoid patchwork doing
something silly):

This is possibly not ideal, but as I comment there, grab the lock for
staging before we copy stamps in (and release it if there's problems).
But this should fix the problem, yes?  If gcc-cross-initial thread is
going and the gcc-cross thread fires, it'll be stuck waiting for
gcc-initial to finish up fully.

Tom Rini <tom_rini at mentor.com>
Mentor Graphics Corporation

More information about the Openembedded-devel mailing list