Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06D9DC4167B for ; Thu, 9 Nov 2023 15:05:26 +0000 (UTC) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mx.groups.io with SMTP id smtpd.web11.123927.1699542318677859539 for ; Thu, 09 Nov 2023 07:05:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lW33CGX3; spf=pass (domain: gmail.com, ip: 209.85.208.41, mailfrom: uvv.mail@gmail.com) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-53de0d1dc46so1573380a12.3 for ; Thu, 09 Nov 2023 07:05:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699542317; x=1700147117; darn=lists.openembedded.org; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=OH4fWJaGJLuepmnRZTcS87sHbNsGU1tyloS8kHfa/9o=; b=lW33CGX3bkTGWCj5cqzK7tPTk8XkJV3hg6PiSh0cO3jv3VNWctzlZUylGeDtv/QQjK YFTD0mmOmWoaEHqrUSiNipylEqpl3gpfVjhncUOUY2iyYEoPar6ISUoHFfQw0kZwq2CH /JoKSkSNYEnBvWgPXTBi54+VLo6qzC/Ei1p1xlv8zz76JEY9XzhXv6fiKWZElgF719AJ jlr3n2trwJ86d7EJm8xnq9O6Cy7j9AQfQzefOIS9iUqtTKqTnxcO/sF/08sl1G5GEjMR I2mNZiGCoNvHmsJERB8Dd9OjIRAIQUbr78IqrPNQ/Dcghsp1m7xdpA7yYGT8+THTnZ7c 6HKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699542317; x=1700147117; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=OH4fWJaGJLuepmnRZTcS87sHbNsGU1tyloS8kHfa/9o=; b=dj7deOt9WrbPVD7fDTdm5nobPjXz13IeyeoR1mSERRdMl4YMT5hPV2Z7qc9Cp75SVr AMcBz0f7d2VqdgkDGs33OeiKIcwOaHwV6JfNpARV+sntIACmUfygh0vtNEcwpO3lCj0H lMu4UUhPOODBRzTwGnYorf+hLklzx5x8rRBi1N+IJ9MAw+f7OOqIisv0DtvVOc1qjLNW CsdqXC0ZWAPELB8dsq/HuKZMxbPD3RNYLb9+fYkK8nSvv5c062Y3fSVYv/KQUL8T3/Ni jz1byNvZI6xvvBBQ9KMxiJ2+I3wNB4/txkYCukJUk7H/eBHYrQOHc1wR/wn+tUO1jGjM GQLQ== X-Gm-Message-State: AOJu0YzJUCddMrdriGqnjr/DRem2C1YnIUwgPlIwmlztKEka5lKpjmRG vHMyU46v4VF0HVNq4k2CC4c= X-Google-Smtp-Source: AGHT+IFVMv5XqUTzEYCZiVqVc++H3nN5zP7u+jommxv3VstyJRESRC5Rp32Au+xzRXC++3sAMHmwsQ== X-Received: by 2002:a17:906:fe41:b0:9d5:ecf9:e6b5 with SMTP id wz1-20020a170906fe4100b009d5ecf9e6b5mr3930241ejb.59.1699542316693; Thu, 09 Nov 2023 07:05:16 -0800 (PST) Received: from [10.134.43.36] ([89.249.73.138]) by smtp.gmail.com with ESMTPSA id kj3-20020a170907764300b009bf7a4d591csm2704204ejc.11.2023.11.09.07.05.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Nov 2023 07:05:16 -0800 (PST) Content-Type: multipart/alternative; boundary="------------w6iRibVyWvPmb3dn04HPNG07" Message-ID: <23c9a4cc-87c0-4bb8-a1ce-0c920f442600@gmail.com> Date: Thu, 9 Nov 2023 16:05:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [oe] [PATCH] Revert "protobuf: stage protoc binary to sysroot" Content-Language: en-US To: Samuli Piippo Cc: =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= , Martin Jansa , Khem Raj , Ross Burton , openembedded-devel References: <20230930173003.3210-1-peron.clem@gmail.com> <178A5713556C6E82.9230@lists.openembedded.org> <9714b98c-66b5-48bc-a00a-69e1634b0307@gmail.com> <5d7628e8-4fe7-4cfa-841f-879ebee31b6d@gmail.com> <17910E05B5C0179B.11247@lists.openembedded.org> From: Vyacheslav Yurkov In-Reply-To: List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 09 Nov 2023 15:05:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/106519 This is a multi-part message in MIME format. --------------w6iRibVyWvPmb3dn04HPNG07 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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}" 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 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 > --------------w6iRibVyWvPmb3dn04HPNG07 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
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}"

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.mail@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

--------------w6iRibVyWvPmb3dn04HPNG07--