[oe] Google protobuf-native doesn't install support .proto's in native
Matthew Stanger
matthew_stanger at trimble.com
Wed May 1 15:04:12 UTC 2019
`protoc` sourced by the standard Yocto SDK will fail to import "well
known" supporting protobufs.
Steps to reproduce:
1. Generated SDK with `protoc` via `DEPENDS = "protobuf-native"`
2. Source SDK & run `protoc *.proto --cpp_out=.`
Example test.proto file:
syntax = "proto3";
import "google/protobuf/wrappers.proto";
package test;
message TEST
{
google.protobuf.Int64Value test_val = 1;
}
Error:
`google/protobuf/wrappers.proto: File not found.`
The source for `protoc` in my sysroot is
'/opt/poky/2.6.2/sysroots/i686-pokysdk-linux/usr/bin/protoc` however the
`wrappers.proto` is in my build target sysroot
`/opt/poky/2.6.2/sysroots/arm926ejse-poky-linux-gnueabi/usr/include/google/protobuf/wrappers.proto`.
As a hack, copying support files resolved the native run time dependency
issue `sudo cp -p
/opt/poky/2.6.2/sysroots/arm926ejse-poky-linux-gnueabi/usr/include/google/protobuf/*.proto
/opt/poky/2.6.2/sysroots/i686-pokysdk-linux/usr/include/google/protobuf/`
I think the `meta-oe/meta-oe/recipes-devtools/protobuf/protobuf_3.6.1.bb`
needs to also install the `.proto` files in the native sysroot but I'm just
not sure how that'd be done in a recipe.
Thanks,
Matt
More information about the Openembedded-devel
mailing list