[yocto] gRPC: grpc_cpp_plugin is not included in host sysroot for standard sdk

Jacob Kaddoura jkaddoura at sbimagingsystems.com
Tue May 1 17:30:04 PDT 2018


Hello,

I am trying to generate an sdk for a Qt project that includes gRPC. I have successfully included protobuf compiler (protoc) in the sysroot for the host which is used by qmake to compile protobuf stubs.

After sourcing the SDK environment protoc is appearing in my PATH and this allows me to generated client stubs with my proto file. However, when I am trying to generate server stubs the protoc command requires the grpc_cpp_plugin path as an argument. 
The grpc_cpp_plugin is currently not appearing the host sysroot. Currently, the plugin seems to be included the in target sysroot but not the host sysroot.

The Qt application recipe currently includes these lines (see grpc-native and grpc):
DEPENDS = "qtbase qtsensors qtmultimedia sw-mcu grpc-native"
RDEPENDS_${PN} = "qtbase qtsensors qtmultimedia sw-mcu qtvirtualkeyboard qttranslations qtquickcontrols2 qtgraphicaleffects grpc"

I added the following lines to the image which includes this application:
inherit populate_sdk_qt5
TOOLCHAIN_HOST_TASK_append += "nativesdk-protobuf-compiler"
TOOLCHAIN_TARGET_TASK_append += "grpc"

The command I use to generate the SDK is: bitbake -c do_populate_sdk <image>

 I tried to add "grpc" to the TOOLCHAIN_HOST_TASK_append line, bitbake threw the following error:
* opkg_prepare_url_for_install: Couldn't find anything to satisfy 'grpc'.

Am I misunderstanding how to properly include the plugin or does the current recipe not support the grpc_cpp_plugin?

Build Configuration:
BB_VERSION           = "1.36.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "intel-corei7-64"
DISTRO               = "poky"
DISTRO_VERSION       = "2.4.2"
TUNE_FEATURES        = "m64 corei7"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "rocko:fdeecc901196bbccd7c5b1ea4268a2cf56764a62"
meta-oe              
meta-networking      
meta-python          = "rocko:dacfa2b1920e285531bec55cd2f08743390aaf57"
meta-intel           = "rocko:7e284b95b45c7ec5c5b5c8cb08122d3b470c0d63"
meta-qt5             = "HEAD:32bb7d18a08d1c48873d7ab6332d4cc3815a4dff"
meta-sbis-bsp        
meta-sbis-software   
meta-sbis-app        = "rocko:aa9fa139cfc30da53b84c81facd22b958c1f9852"

Note: I had to pull the gRPC recipe from master as it is not included in the meta-openembedded rocko branch.

Any help is appreciated!

Regards,
Jacob Kaddoura



More information about the yocto mailing list