All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Anatol Belski" <anbelski@linux.microsoft.com>
To: "Clément Péron" <peron.clem@gmail.com>
Cc: openembeded-devel <openembedded-devel@lists.openembedded.org>
Subject: Re: [oe] [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0
Date: Tue, 2 Mar 2021 19:22:41 +0100	[thread overview]
Message-ID: <2543ce50-034e-a21f-2c60-95596e5b7595@linux.microsoft.com> (raw)
In-Reply-To: <CAJiuCcd4bvctA_JjL6bx6z+zhwsGiy1QPR9tyzgaB6spLwqPQQ@mail.gmail.com>


On 3/2/2021 5:06 PM, Clément Péron wrote:
>> I don't use this feature from the grpc package, only linking against the
>> libs. However I don't see why this should be an issue, as all the
>> *.cmake files are packaged. I see that in the RPMs but also in a recipe
>> of a dependent packgae like this
> Yes the cmake file is found but not the grpc_cpp_plugin.
>
> This is due to cmake looking for the grpc_cpp_plugin in the target
> sysroot instead of the native/host sysroot.
>
>> $ ls -l ./tmp/work/*/*/*/recipe-sysroot/usr/lib/cmake/grpc/*.cmake
>>
>> Or use recipe-sysroot-native depending on the consuming recipe.
>>
>> Just a wild guess here - does your recipe put 'grpc' into DEPENDS or
>> RDEPENDS, etc.
> In my recipe I put 'grpc' and 'grpc-native' into DEPENDS using PACKAGECONFIG
> PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc grpc-native"
>
>> Also, do you inherit cmake in your recipe?
> Yes i am indeed inheriting cmake and also systemd in my recipe
>
>> It seems to me
>> that it's more about how to use cmake files in  a recipe, as the
>> particularly mentioned files are packaged and pulled in a consuming recipe.
> When I look in the files packaged the cmake file is indeed here.
> The issue is coming from the gRPCTargets.cmake (https://pastebin.com/bZay7cew)
> Line 159:
> # Create imported target gRPC::grpc_cpp_plugin
> add_executable(gRPC::grpc_cpp_plugin IMPORTED)
>
> gRPC is trying to add the grpc_cpp_plugin for the Target which is not
> present in the final package.
> dpkg -c ./build/tmp/deploy/ipk/aarch64/grpc_1.35.0-r0_aarch64.ipk
> drwxr-xr-x root/root         0 2021-02-22 17:43 ./usr/
> drwxr-xr-x root/root         0 2021-02-22 17:43 ./usr/lib/
> lrwxrwxrwx root/root         0 2021-02-22 17:43
> ./usr/lib/libaddress_sorting.so.14 -> libaddress_sorting.so.14.0.0
> -rwxr-xr-x root/root     10000 2021-02-22 17:43
> ./usr/lib/libaddress_sorting.so.14.0.0
> lrwxrwxrwx root/root         0 2021-02-22 17:43 ./usr/lib/libgpr.so.14
> -> libgpr.so.14.0.0
> -rwxr-xr-x root/root     59616 2021-02-22 17:43 ./usr/lib/libgpr.so.14.0.0
> lrwxrwxrwx root/root         0 2021-02-22 17:43
> ./usr/lib/libgrpc++.so.1 -> libgrpc++.so.1.35.0
> -rwxr-xr-x root/root    501680 2021-02-22 17:43 ./usr/lib/libgrpc++.so.1.35.0
> lrwxrwxrwx root/root         0 2021-02-22 17:43
> ./usr/lib/libgrpc++_alts.so.1 -> libgrpc++_alts.so.1.35.0
> -rwxr-xr-x root/root     22368 2021-02-22 17:43
> ./usr/lib/libgrpc++_alts.so.1.35.0
> lrwxrwxrwx root/root         0 2021-02-22 17:43
> ./usr/lib/libgrpc++_error_details.so.1 ->
> libgrpc++_error_details.so.1.35.0
> -rwxr-xr-x root/root     34896 2021-02-22 17:43
> ./usr/lib/libgrpc++_error_details.so.1.35.0
> lrwxrwxrwx root/root         0 2021-02-22 17:43
> ./usr/lib/libgrpc++_reflection.so.1 -> libgrpc++_reflection.so.1.35.0
> -rwxr-xr-x root/root    284960 2021-02-22 17:43
> ./usr/lib/libgrpc++_reflection.so.1.35.0
> lrwxrwxrwx root/root         0 2021-02-22 17:43
> ./usr/lib/libgrpc++_unsecure.so.1 -> libgrpc++_unsecure.so.1.35.0
> -rwxr-xr-x root/root    415672 2021-02-22 17:43
> ./usr/lib/libgrpc++_unsecure.so.1.35.0
> lrwxrwxrwx root/root         0 2021-02-22 17:43
> ./usr/lib/libgrpc.so.14 -> libgrpc.so.14.0.0
> -rwxr-xr-x root/root   3505864 2021-02-22 17:43 ./usr/lib/libgrpc.so.14.0.0
> lrwxrwxrwx root/root         0 2021-02-22 17:43
> ./usr/lib/libgrpc_plugin_support.so.1 ->
> libgrpc_plugin_support.so.1.35.0
> -rwxr-xr-x root/root    440528 2021-02-22 17:43
> ./usr/lib/libgrpc_plugin_support.so.1.35.0
> lrwxrwxrwx root/root         0 2021-02-22 17:43
> ./usr/lib/libgrpc_unsecure.so.14 -> libgrpc_unsecure.so.14.0.0
> -rwxr-xr-x root/root   1939384 2021-02-22 17:43
> ./usr/lib/libgrpc_unsecure.so.14.0.0
> lrwxrwxrwx root/root         0 2021-02-22 17:43
> ./usr/lib/libgrpcpp_channelz.so.1 -> libgrpcpp_channelz.so.1.35.0
> -rwxr-xr-x root/root    617784 2021-02-22 17:43
> ./usr/lib/libgrpcpp_channelz.so.1.35.0
> lrwxrwxrwx root/root         0 2021-02-22 17:43 ./usr/lib/libupb.so.14
> -> libupb.so.14.0.0
> -rwxr-xr-x root/root    141768 2021-02-22 17:43 ./usr/lib/libupb.so.14.0.0
> drwxr-xr-x root/root         0 2021-02-22 17:43 ./usr/share/
> drwxr-xr-x root/root         0 2021-02-22 17:43 ./usr/share/grpc/
> -rw-r--r-- root/root    263903 2021-02-22 17:38 ./usr/share/grpc/roots.pem

The bins are packaged into -dev. In the rpm version, i see it packaged

$ rpm -qlp ./tmp/deploy/rpm/aarch64/grpc-dev-1.35.0-r0.aarch64.rpm | 
grep grpc_cpp_plugin
/usr/bin/grpc_cpp_plugin

And same way they're to see

  ls -l ./tmp/work/*/*/*/recipe-sysroot-native/usr/bin/*grpc*

The executables seem only be useful for dev and thus only as native. At 
this point it seems it's about going deep into debugging your recipe, as 
seems there's no solution laying on the surface.

Regards

Anatol






  reply	other threads:[~2021-03-02 18:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 12:39 [meta-oe][PATCH] grpc: Upgrade 1.24.3 -> 1.35.0 Anatol Belski
2021-02-22 16:49 ` [oe] " Clément Péron
2021-03-02 13:32   ` Anatol Belski
2021-03-02 16:06     ` Clément Péron
2021-03-02 18:22       ` Anatol Belski [this message]
2021-03-02 18:38         ` Stefan Herbrechtsmeier
2021-03-02 19:13           ` Clément Péron
2021-03-03 15:26             ` Anatol Belski
2021-03-04 10:05               ` Clément Péron
2021-03-04 17:28                 ` Anatol Belski
2021-03-05  9:35                   ` Clément Péron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2543ce50-034e-a21f-2c60-95596e5b7595@linux.microsoft.com \
    --to=anbelski@linux.microsoft.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=peron.clem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.