* Google protobuf-native doesn't install support .proto's in native
@ 2019-05-01 15:04 Matthew Stanger
2019-05-08 15:15 ` Theodore A. Roth
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Stanger @ 2019-05-01 15:04 UTC (permalink / raw)
To: openembedded-devel
`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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Google protobuf-native doesn't install support .proto's in native
2019-05-01 15:04 Google protobuf-native doesn't install support .proto's in native Matthew Stanger
@ 2019-05-08 15:15 ` Theodore A. Roth
0 siblings, 0 replies; 2+ messages in thread
From: Theodore A. Roth @ 2019-05-08 15:15 UTC (permalink / raw)
To: Matthew Stanger; +Cc: openembedded-devel
On Wed, May 1, 2019 at 9:04 AM Matthew Stanger
<matthew_stanger@trimble.com> wrote:
>
> `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=.`
This is not a problem with the protobuf recipe, but in how the SDK was
configured.
I just need to make the following changes to our image's bbappend file
and all of the
protobuf headers were properly added to the SDK we are generating
$ git diff
diff --git a/recipes-core/images/core-image-renew.bbappend
b/recipes-core/images/core-image-renew.bbappend
index 5d75531..198526f 100644
--- a/recipes-core/images/core-image-renew.bbappend
+++ b/recipes-core/images/core-image-renew.bbappend
@@ -1 +1,2 @@
-TOOLCHAIN_HOST_TASK += "nativesdk-protobuf-compiler"
+TOOLCHAIN_HOST_TASK += "nativesdk-protobuf-dev"
+TOOLCHAIN_TARGET_TASK += "protobuf-dev"
Once I built the SDK with that change in place, the project using
protobuf during build
had no problem building using the SDK.
Ted Roth
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-08 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-01 15:04 Google protobuf-native doesn't install support .proto's in native Matthew Stanger
2019-05-08 15:15 ` Theodore A. Roth
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.