Agreed that enabling compiler in target would be rarely used.
Having
SYSROOT_DIRS += "${bindir}"
would, however, cover both builds without additional tweaks.
Since target build doesn't have any other binaries, this wouldn't do
anything extra with default PACKAGECONFIG.
On Fri, 10 Nov 2023 at 10:06, Vyacheslav Yurkov <[email protected]> wrote:
> OK, but that seems to be similar issue, although a different one :)
> I recall I disabled compiler by default for target, because it's rare use
> case.
>
> So compiler can be enabled (if needed), but then perhaps another tweak
> with sysroot will be necessary in the recipe? I suggest to keep it as a
> comment in the recipe. What do you think?
>
> Slava
>
> On 10.11.2023 08:50, Samuli Piippo wrote:
>
>
> | CMake Error at
> /home/sapiippo/qt6/build/tmp/work/cortexa57-poky-linux/grpc/1.59.2/recipe-sysroot/usr/lib/cmake/protobuf/protobuf-targets.cmake:116
> (message):
> | The imported target "protobuf::protoc" references the file
> |
> |
>
> "/home/sapiippo/qt6/build/tmp/work/cortexa57-poky-linux/grpc/1.59.2/recipe-sysroot/usr/bin/protoc-23.4.0"
> |
> | but this file does not exist. Possible reasons include:
>
> On Fri, 10 Nov 2023 at 09:38, Vyacheslav Yurkov <[email protected]>
> wrote:
>
>> You sure? Because I remember the test in grpc to check for
>> CROSS_COMPILING in cmake to avoid that.
>>
>> Slava
>>
>> On 10.11.2023 08:12, Samuli Piippo wrote:
>>
>> This is not strictly a nativesdk issue.
>> If you enable PACKAGECONFIG = "compiler" for protobuf, it will then build
>> protoc for the target.
>> This will then cause grpc target build to fail in the same way as
>> nativesdk build.
>>
>> On Fri, 10 Nov 2023 at 08:40, Vyacheslav Yurkov <[email protected]>
>> wrote:
>>
>>> 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 <[email protected]> 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 <[email protected]>
>>>> 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 (#106531):
https://lists.openembedded.org/g/openembedded-devel/message/106531
Mute This Topic: https://lists.openembedded.org/mt/101679410/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-