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