On Sun, Oct 1, 2023 at 12:31 PM Clément Péron <[email protected]> wrote:

> Hi Martin,
>
> On Sun, 1 Oct 2023 at 12:11, Martin Jansa <[email protected]> wrote:
> >
> > well, target bindir isn't in default PATH so it wont get executed by
> default
>
> Is it a reason to allow mixing executable arch/tune?
>

What is getting mixed? target sysroot is still for target and native
sysroot for native.

How do you handle it when you want to install protoc/grpc-cpp-plugin for
> the target too?
>

SYSROOT_DIRS variable doesn't affect how it's packaged for target, does it?
It just allows the binary from bindir to be available in RSS next to
binaries from libdir, both still separate from native RSS as it should.

> I have used this work around in some meta-ros recipes where the .cmake
> file was checking the binary existence even when this .cmake was used only
> to get right list of libraries to link with (and the binary was not called
> at all - which imho can happen with protobuf as well)
>
> As you say it's a workaround, and it's an issue with the CMake recipe.
>

Issue with .cmake file from protobuf, right?


> If we can properly fix it at the recipe level, then why should we keep
> this workaround/hack?
>
> Also if you really need it, you can have a .bbappend for protoc/grpc in
> the downstream layer. But I would be in favor to avoid this by default no?
>

I haven't seen any proper fix for this exact issue. Yes you can patch
.cmake generation not to include bindir when building for target (while it
needs it for native build), but then that change will break possible use of
protobuf on target, so the SYSROOT_DIRS still seems like lesser evil here.

Here are some examples from meta-ros:
https://github.com/ros/meta-ros/commit/875ceed4b1c693c2eb0f2b7ea85385be576a62cc
https://github.com/ros/meta-ros/commit/67c03755543655ad0634e078bc30d8ab9969a16c
https://github.com/ros/meta-ros/commit/5e61eb0520d2841c0da7e14eecc833b3c4104533
https://github.com/ros/meta-ros/commit/a53bb7cc8b45a72b704e75311d68b37a6db50cdf

I don't care about protobuf, but the explanation from Samuli looks like the
same issue as what I remember from above and I don't see how SYSROOT_DIRS
causes mixing executables or any issues for installing them for target.

Cheers,

>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#105297): 
https://lists.openembedded.org/g/openembedded-devel/message/105297
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]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to