Hi Anatol

On Tue, 2 Mar 2021 at 14:32, Anatol Belski <[email protected]> wrote:
>
> Hi Clément,
>
> Thanks for the question.
>
> On 2/22/2021 5:49 PM, Clément Péron wrote:
> > Hi Anatol,
> >
> >
> > On Fri, 19 Feb 2021 at 13:40, Anatol Belski
> > <[email protected]> wrote:
> >> This is a really huge jump in versions, but this package has been not
> >> upgraded for quite some time. The previous patches are not necessary
> >> anymore, they're integrated upstream.
> > This version of gRPC generate a new CMake gRPCTargets.cmake
> > recipe-sysroot/usr/lib/cmake/grpc/gRPCTargets.cmake
> >
> > This generate an error in my build:
> > Because this CMake declare a
> > recipe-sysroot/usr/bin/grpc_cpp_plugin
> >
> > but this file does not exist.  Possible reasons include:
> > |
> > |   * The file was deleted, renamed, or moved to another location.
> > |
> > |   * An install or uninstall procedure did not complete successfully.
> > |
> > |   * The installation package was faulty and contained
> >
> > In my project i'm using the CMake example from gRPC
> > https://github.com/grpc/grpc/blob/master/examples/cpp/cmake/common.cmake#L114
> >
> > This error is triggered by:
> > find_package(gRPC 1.35.0 CONFIG REQUIRED)
> >
> > FYI My recipes depends on grpc and grpc-native
> > PACKAGECONFIG[grpc] = "-DCONFIG_GRPC=ON,-DCONFIG_GRPC=OFF,grpc grpc-native"
> >
> > Do you have an example of a gRPC recipe?
>
> 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

Regards,
Clement


>
> Regards
>
> Anatol
>
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#89806): 
https://lists.openembedded.org/g/openembedded-devel/message/89806
Mute This Topic: https://lists.openembedded.org/mt/80753655/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to