[Rprotobuf-yada] Difficulty getting RProtoBuf to work on Linux

Murray Stokely murray at stokely.org
Fri May 6 01:03:28 CEST 2016


Can you try to just :

readProtoFiles("P1.proto")

I think it may be getting confused by trying to read in P4.proto, then
reading it in again through the import statement.

   - Murray


On Thu, May 5, 2016 at 3:10 PM, <from at alumni.stanford.edu> wrote:

>
> Dear RProtoBuf Developers,
>
> I'm teaching a class, and we are trying to use RProtoBuf on Linux.
>
> We are encountering the problem when trying to read in the .proto files.
>
> I've appended a minimal example of the .proto files below. We are trying
> to read these in with
>
> readProtoFiles(dir = "proto_dir")
>
> The errors are:
>
> protos_min/P2.proto:7:22:"com.name.common.value.P2Proto.var_2" is already
> defined in file "P2.proto".
> protos_min/P2.proto:6:9:"com.name.common.value.P2Proto" is already defined
> in file "P2.proto".
>
> The .proto files worked with Java protobuf code, but we would like to try
> to do all of our work within R.
>
> We are using R 3.2.4 on RHEL 6, and we've tried compiling RProtoBuf
> against protobuf versions 2.4.1, 2.5.0, and 2.6.1.
>
> Any advice is most appreciated. None of us has any experience with
> protobufs, yet the students need to decode this data to do their work.
>
> Many thanks,
>
> Bill
>
> ::::::::::::::
> P1.proto
> ::::::::::::::
> package com.name.common.value;
>
> option java_outer_classname="P1ProtoBuffs";
> import "P2.proto";
>
> message P1Proto {
>     optional P2Proto var_1 = 3;
> }
>
> ::::::::::::::
> P2.proto
> ::::::::::::::
> package com.name.common.value;
>
> option java_outer_classname="P2ProtoBuffs";
> import "P3.proto";
>
> message P2Proto {
>     optional P3Proto var_2 = 2;
> }
>
> ::::::::::::::
> P3.proto
> ::::::::::::::
> package com.name.common.value;
>
> option java_outer_classname="P3ProtoBuffs";
> import "P4.proto";
>
> message P3Proto {
>     optional commagg.value.P4Proto var_3 = 1;
> }
> ::::::::::::::
> P4.proto
> ::::::::::::::
> package com.name.commagg.value;
>
> option java_outer_classname="P4Protos";
>
> message P4Proto {
>     message P4S1Proto {
>         optional string var_4 = 3;
>     }
>
>     message P4S2Proto {
>         optional P4S1Proto var_5 = 1;
>     }
>
>     repeated P4S1Proto var_6 = 1;
>     optional P4S1Proto var_7 = 2;
>     optional P4S2Proto var_8 = 3;
> }
>
> _______________________________________________
> Rprotobuf-yada mailing list
> Rprotobuf-yada at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rprotobuf-yada
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rprotobuf-yada/attachments/20160505/5f3668c0/attachment.html>


More information about the Rprotobuf-yada mailing list