maui arches | 31 May 17:13 2016
Picon

compilation problems oneof using protobuf3

Hi,

I got a following proto file with below message:

message RequestUnion {
oneof request {
RangeRequest request_range = 1;
PutRequest request_put = 2;
DeleteRangeRequest request_delete_range = 3;
}


Generated header file contains the following:
class RequestUnion
{
    RequestUnion();
    union RequestUnion {
      RequestUnion() {}
      ::etcdserverpb::RangeRequest* request_range_;
      ::etcdserverpb::PutRequest* request_put_;
      ::etcdserverpb::DeleteRangeRequest* request_delete_range_;
    } request_;
...
}

When i tried compiling the following error was seen:

rpc.pb.h:1110:9: error: ‘etcdserverpb::RequestUnion::RequestUnion’ has the same name as the class in which it is declared

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Renuka Manavalan | 30 May 01:05 2016
Picon

Protobuf compile error for C++

1) Ran autogen,sh to download gmock, which pulled down "gmock-1.7.0" (based on gmock.BUILD).
2) Ran make that failed with following spew

./google/protobuf/map.h: In constructor 'google::protobuf::Map<Key, T>::MapAllocator<U>::MapAllocator(const google::protobuf::Map<Key, T>::MapAllocator<X>&) [with X = google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::KeyValuePair, U = google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::InnerMap::Node, Key = google::protobuf::MapKey, T = google::protobuf::MapValueRef]':
./google/protobuf/map.h:1289:   instantiated from 'U* google::protobuf::Map<Key, T>::InnerMap::Alloc(size_t) [with U = google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::InnerMap::Node, Key = google::protobuf::MapKey, T = google::protobuf::MapValueRef]'
./google/protobuf/map.h:958:   instantiated from 'std::pair<google::protobuf::Map<Key, T>::InnerMap::iterator_base<google::protobuf::Map<Key, T>::KeyValuePair>, bool> google::protobuf::Map<Key, T>::InnerMap::insert(const google::protobuf::Map<Key, T>::KeyValuePair&) [with Key = google::protobuf::MapKey, T = google::protobuf::MapValueRef]'
./google/protobuf/map.h:987:   instantiated from 'google::protobuf::MapPair<Key, T>*& google::protobuf::Map<Key, T>::InnerMap::operator[](const Key&) [with Key = google::protobuf::MapKey, T = google::protobuf::MapValueRef]'
./google/protobuf/map.h:1503:   instantiated from 'T& google::protobuf::Map<Key, T>::operator[](const Key&) [with Key = google::protobuf::MapKey, T = google::protobuf::MapValueRef]'
google/protobuf/map_field.cc:189:   instantiated from here
./google/protobuf/map.h:655: error: 'google::protobuf::Arena* const google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::MapAllocator<google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::KeyValuePair>::arena_' is private
./google/protobuf/map.h:590: error: within this context


Any tips would be very much appreciated.

Thank you,
Renuka

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Douglas Lewis | 31 May 15:15 2016
Picon

Errors During link of make process using gcc on cygming

I'm trying to make protocol buffers using the provided make file and instructions for version 3.  I've followed the steps in the readme instructions including "./configure".

When I issue the make command everything executes correctly until the "ranlib .libs/librprotoc.a" command is issued.  The following error is displayed:

g++.exe: /home/DLewis/RTS3-PB/protobuf-3.0.0-beta-3/src/.libs/libprotobuf.dll.a: No such file or directory

I check the directory and the file exists in that directory.

Has anyone else been able to build version 3 of protocol buffers using cygwin on a Windows 7 PC?

The gcc version is 3.4.4.

Thanks,
Doug

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
조현성 | 27 May 07:39 2016
Picon

socket data communication with protocol buffers

Hi. 

I have learned about protocol buffers and

I want to socket data communication with protocol buffers in ubuntu C, C++

but I have an error.

I made a proto file(business.proto) and compiled the file 

and got business.pb.cc & business.pb.h file.

and copied that to eclipse project, and made a Server, Client (socket programming code).

Two code was typed #include "business.pb.h"

and I typed terminal

$ g++ Server.cpp business.pb.cc `-pkg -config --cflags --libs protobuf`

and got this error....



and my initializing code(initialize message values), message(proto) file.



What is matter, and what should i do...?

please give me a answer.

(how to compile command typing, files(.pb.cc//.pb.h) locations and so on...)

thx.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
조현성 | 27 May 08:09 2016
Picon

socket data communication with protocol buffers

Hi. 

I have learned about protocol buffers and

I want to socket data communication with protocol buffers in ubuntu C, C++

but I have an error.

I made a proto file(business.proto) and compiled the file 

and got business.pb.cc & business.pb.h file.

and copied that to eclipse project, and made a Server, Client (socket programming code).

Two code was typed #include "business.pb.h"

and I typed terminal

$ g++ Server.cpp business.pb.cc `-pkg -config --cflags --libs protobuf`

and got this error....






and my initializing code(initialize message values), message(proto) file.



What is matter, and what should i do...?

please give me a answer.

(how to compile command typing, files(.pb.cc//.pb.h) locations and so on...)

thx.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
조현성 | 27 May 07:26 2016
Picon

Socket communication with protocol buffers.

Hi.

I learned about protocol buffers in https://developers.google.com/protocol-buffers/ site.

and I want to Socket data send, receive with protocol buffers.

I maked .proto file and compile that and I got .pb.cc // .pb.h files.

and maked a Server & Client code, and #include "~~.pb.h" 

and initialized values.

and compiled it.

I typed in terminal : $ g++ Server.cpp business.pb.cc `-pkg -config --cflags --libs protobuf`

but I got a lot of errors like this :

and below is my message(proto) file, and initializing code.


What is matters, and what should i do?

I'm beginner about protobuf.

plz give me an answer.

(file location, command typing, and so on..)

thx.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
David MacMillan | 26 May 09:16 2016
Picon

protobuf 2.5.0 for ARM64 for Hadoop 2.6.4

In recompiling the native libraries for Hadoop 2.6.4 for ARM64, I need protobuf 2.5.0 for ARM64. But when I try to build protobuf 2.5.0 on an ARM64 cpu, I get the 'atomicops' error shown below. This error seems similar to this bug report for Solaris:
https://groups.google.com/forum/#!topic/protobuf/ozYD2lXIkGo
but in my case it is for ARM64. It would be great if someone could either suggest a workaround or suggest how to fix the protobuf 2.5.0 make files. Unfortunately the build of the Hadoop native libraries is insisting on protobuf 2.5.0 so using a more recent protobuf version doesn't appear to be an option.. 

Here is my make listing, with the error shown at the end:
make
make  all-recursive
make[1]: Entering directory '/home/hduser/Downloads/protobuf-2.5.0'
Making all in .
make[2]: Entering directory '/home/hduser/Downloads/protobuf-2.5.0'
make[2]: Leaving directory '/home/hduser/Downloads/protobuf-2.5.0'
Making all in src
make[2]: Entering directory '/home/hduser/Downloads/protobuf-2.5.0/src'
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..    -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG -MT atomicops_internals_x86_gcc.lo -MD -MP -MF .deps/atomicops_internals_x86_gcc.Tpo -c -o atomicops_internals_x86_gcc.lo `test -f 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc' || echo './'`google/protobuf/stubs/atomicops_internals_x86_gcc.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG -MT atomicops_internals_x86_gcc.lo -MD -MP -MF .deps/atomicops_internals_x86_gcc.Tpo -c google/protobuf/stubs/atomicops_internals_x86_gcc.cc  -fPIC -DPIC -o .libs/atomicops_internals_x86_gcc.o
In file included from ./google/protobuf/stubs/atomicops.h:59:0,
                 from google/protobuf/stubs/atomicops_internals_x86_gcc.cc:36:
./google/protobuf/stubs/platform_macros.h:61:2: error: #error Host architecture was not detected as supported by protobuf
 #error Host architecture was not detected as supported by protobuf
  ^
In file included from google/protobuf/stubs/atomicops_internals_x86_gcc.cc:36:0:
./google/protobuf/stubs/atomicops.h:161:1: error: stray â#â in program
 #error "Atomic operations are not supported on your platform"
 ^
./google/protobuf/stubs/atomicops.h:188:1: note: in expansion of macro âGOOGLE_PROTOBUF_ATOMICOPS_ERRORâ
 GOOGLE_PROTOBUF_ATOMICOPS_ERROR
 ^
./google/protobuf/stubs/atomicops.h:161:2: error: âerrorâ does not name a type
 #error "Atomic operations are not supported on your platform"
  ^
./google/protobuf/stubs/atomicops.h:188:1: note: in expansion of macro âGOOGLE_PROTOBUF_ATOMICOPS_ERRORâ
 GOOGLE_PROTOBUF_ATOMICOPS_ERROR
 ^
Makefile:1481: recipe for target 'atomicops_internals_x86_gcc.lo' failed
make[2]: *** [atomicops_internals_x86_gcc.lo] Error 1
make[2]: Leaving directory '/home/hduser/Downloads/protobuf-2.5.0/src'
Makefile:669: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/hduser/Downloads/protobuf-2.5.0'
Makefile:576: recipe for target 'all' failed
make: *** [all] Error 2

 

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
adnanchaudhry1011 | 26 May 21:16 2016
Picon

fp16 data type support in protobuf

Hi,

It seems that protobuf does not support fp16 data type for message field. Is there any way of serializing this data type directly (without converting it into float or double) and parsing this data type from the serialized stream?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
John Coffey | 24 May 17:31 2016
Picon

File already exists in database: google/protobuf/empty.proto

I have a GRPC application that uses the latest latest protobuf (using the master branch).   I noticed the following behavior changed some time in the last week and unfortunately I do not know which change to protobuf caused this change, I wonder if anyone could shed some light on what the problem might be.  We are linking statically to protobuf (I initially thought that the problem might have to do with linking to a shared object in linux) Prior to last week this was not an issue and I'm not sure which commit caused this change in behavior.  The problem occurs on Linux PPC but not on Windows which is very strange.

Thanks

John

[libprotobuf ERROR google/protobuf/descriptor_database.cc:57] File already exists in database: google/protobuf/empty.proto
[libprotobuf FATAL google/protobuf/descriptor.cc:1164] CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
terminate called after throwing an instance of 'google::protobuf::FatalException              '
  what():  CHECK failed: generated_database_->Add(encoded_file_descriptor, size)              :
Aborted

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Marcos Juarez | 25 May 23:44 2016
Picon
Gravatar

Reserved keyword usage in protobuf 2.5.0

I ran into a situation today in which I needed to use the "reserved" keyword in a protobuf definition, so that in the future, nobody would use those fields.  I've attached a screenshot of what the docs say, from https://developers.google.com/protocol-buffers/docs/proto#reserved 


However, when I try to use that keyword in an actual message with field definitions, protoc always complains with the following error:

Expected "required", "optional", or "repeated".

My protobuf definition looks like this:

message MyMessage {
      // Some comments
      reserved, 4, 108, 109;
      
      // Some more comments
      required string event_uuid            = 1     ;
      required string date                  = 2     ;
      required string timezone              = 3     ;

      optional string field1                = 101   ;
      optional string field2                = 110   ;
}
     
Am I reading that spec wrong, or is the reserved keyword broken?

Marcos

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Christopher Smith | 25 May 05:16 2016
Picon
Gravatar

Re: Integers are being padded in protobufs on ARM

I'm guessing your cross compiler setup is somehow mucking up endian logic. Do you have a simple reproducible set up.

On Apr 28, 2016 2:58 PM, "Brian Savage" <btsavage48 <at> gmail.com> wrote:
I am using protobufs on an ARM processor running Ubuntu Linux.  Everything seems to be working, except some integers are being padded with an extra byte in LSW.

Take for example the raw message 0x10 0x01 0x48 0x32

I'm passing an unsigned integer with a value of 50 decimal (0x32).  Printing the raw data on both sides (the other side is RedHat on Intel) shows that the message matches up.  However, when I call the method to get the data from the proto message, it comes back as 0x32 0x00 (12800 decimal). 

Anyone have an idea as to what is going on?  This happens with multiple messages.

Background -  I obtained the protobuf source from github and cross compiled for the ARM.  As I said, there doesn't seem to be any problems other than the integers.  If the integer is large enough that it uses all 32 bits, it works OK.)

Thanks

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Gmane