Re: [PATCH v6] util-linux: split uuid in separate recipe to allow bootstrapping

Richard Purdie
2021-03-05T00:13:40Z

On Thu, 2021-03-04 at 12:27 +0000, luca.boccassi@gmail.com wrote:
>
> -RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
> +RDEPENDS_${PN}_append += " util-linux-libuuid"
> +RDEPENDS_${PN}-dev_append += " util-linux-libuuid-dev"

The mysterious libgcov.a issues which appeared in builds when this patch
was added are due to the lines above. Changing them to:

RDEPENDS_${PN} += " util-linux-libuuid"
RDEPENDS_${PN}-dev += " util-linux-libuuid-dev"

resolves the issue. To illustrate, have a look at "bitbake glibc -g" in
the task-depends.dot file before and after that change.

The problem is the native BBCLASSEXTEND code can't handle the
RDEPENDS_${PN}_append correctly and it means in the native case it
adds a dependency on util-linux-libuuid rather than a native
version.

Why does that cause the gcov error? Its because there are early toolchain
util-linux-native dependencies which ends up meaning glibc sees a libgcc
dependency. It usually uses libgcc-initial and that has overlapping files
with libgcc and libgcov.a is the first in the sorted list.

Again, we should have better errors for a native recipe depending upon
a target one and show better errors for this configuration issue. It
does at least explain the seemingly strange errors.

Cheers,

Richard