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

Luca Bocassi
2021-03-05T11:03:43Z

[-- Attachment #1: Type: text/plain, Size: 1646 bytes --]

On Fri, 2021-03-05 at 00:13 +0000, Richard Purdie wrote:
> 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.

Thank you! Sent v7 as suggested after a quick rebuild check.

When to use '_append' vs '+=' is one of the things I'm never sure about
and invariably I get it wrong most of the times.

--
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]