FTR, I suggested oe-core solution in the corresponding mailing list.

Slava

On 10.11.2023 07:19, Vyacheslav Yurkov via lists.openembedded.org wrote:
On 10.11.2023 02:23, Clément Péron wrote:
Hi Samuli,

Le ven. 10 nov. 2023, 00:05, Vyacheslav Yurkov <uvv.m...@gmail.com> a écrit :

    Thanks for the explanation, that was the missing piece for me to
    get an understanding of the problem :)

    I think it's not only me, but also others, were confused by the
    fact that we are talking about native(sdk), but try to fix
    something with a non-native variable.

    I've just gave it a try and have two suggestions how this can be
    addressed.

    1. Recipe based solution:
    SYSROOT_DIRS:append:class-nativesdk = " $bindir}"


Is it not just missing something like

DEPENDS:append:class-nativesdk= " protobuf-native "
Regards
Clement

This is already implicit by DEPENDS += "protobuf". Take a look at my second suggestion. You can see that ${bindir} is staged for native recipes, but not for nativesdk.


    2. oe-core based solution:
    --- a/meta/classes-global/staging.bbclass
    +++ b/meta/classes-global/staging.bbclass
    @@ -26,6 +26,7 @@ SYSROOT_DIRS_NATIVE = " \
         ${localstatedir} \
     "
     SYSROOT_DIRS:append:class-native = " ${SYSROOT_DIRS_NATIVE}"
    +SYSROOT_DIRS:append:class-nativesdk = " ${SYSROOT_DIRS_NATIVE}"
     SYSROOT_DIRS:append:class-cross = " ${SYSROOT_DIRS_NATIVE}"
     SYSROOT_DIRS:append:class-crosssdk = " ${SYSROOT_DIRS_NATIVE}"

    The second one will invalidate nativesdk sstate, but might cover
    not only grpc issue (I would assume gdbus-codegen or any other
    generator has the same issue when used for SDK build).

    What are your thoughs?

    Thanks,
    Slava

    On 09.11.2023 14:35, Samuli Piippo wrote:
    DEPENDS += "protobuf" is enough to have dependencies resolved.

    Problem is that bitbake's do_populate_sysroot does not take
    anything from bindir.
    This leads to nativesdk-(qt)grpc's do_prepare_recipe_sysroot to
    not get the protoc binary into the recipe_sysroot as expected by
    CMake.

    This can be fixed with SYSROOT_DIRS.

    On Thu, 9 Nov 2023 at 12:19, Vyacheslav Yurkov
    <uvv.m...@gmail.com> wrote:

        Hi Clément,
        No, the issue is when you just build nativesdk recipe (we
        are not at the stage to use the SDK yet).

        And that was exactly my question how to propagate the
        dependency correctly for nativesdk build.

        Regards,
        Slava


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#106525): 
https://lists.openembedded.org/g/openembedded-devel/message/106525
Mute This Topic: https://lists.openembedded.org/mt/101679410/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to