Re: [protobuf] can protobuf3 be used with protobuf2?

2016-05-18 Thread osuciu
Protobuf schema evolution rules:
https://developers.google.com/protocol-buffers/docs/proto#updating


On Wednesday, May 18, 2016 at 11:09:15 AM UTC-7, Artem Kazakov wrote:
>
> +1
> Yes, a checklist would be extremely helpful. 
>
> On Friday, April 29, 2016 at 5:04:56 PM UTC-4, Kostiantyn Shchepanovskyi 
> wrote:
>>
>> It would be nice to have a migration guide (checklist) somewhere, like:
>>
>> 1. All fields should be optional.
>> 2. Do not use custom defailt values.
>> 3. All enums should have first element with tag = 0.
>> 4. Do not use extension for anything except custom options.
>>
>> Something else?
>>
>> On Friday, April 29, 2016 at 1:18:12 AM UTC+3, Feng Xiao wrote:
>>>
>>>
>>>
>>> On Tue, Apr 26, 2016 at 7:04 PM, Bo Gao  wrote:
>>>
 suppose server side is updating into protobuf3, but client side still 
 use protobuf2, can then communicate will?

>>> Yes, as long as you only use proto3 features, they are wire compatible.
>>>  
>>>
 -- 
 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+u...@googlegroups.com.
 To post to this group, send email to prot...@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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] protobuf-java-shaded-[241|250|261]

2016-05-18 Thread osuciu
Hi all,

If you ever had runtime compatibility issues with different versions of 
protobuf-java used in the same application, 
protobuf-java-shaded-[241|250|261] may be of interest:

https://github.com/os72/protobuf-java-shaded-241
https://github.com/os72/protobuf-java-shaded-250
https://github.com/os72/protobuf-java-shaded-261

These are simply pre-shaded clones of protobuf-java with renamed namespace 
(com.google.protobuf) that includes the protobuf version explicitly:

com.github.os72.protobuf241
com.github.os72.protobuf250
com.github.os72.protobuf261

protoc-jar/protoc-jar-maven-plugin can help with the namespace rewriting 
for code generated by the protoc compiler:

https://github.com/os72/protoc-jar
https://github.com/os72/protoc-jar-maven-plugin

All of this is similar with what can be accomplished with 
maven-shade-plugin, but it's arguably simpler, with explicit versioning, 
and available at compile time (no bytecode manipulation after compilation)

Cheers
--Oliver

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Protobuf : How to generate the descriptor file dynamically from .proto

2016-05-18 Thread osuciu
This works in Java, perhaps you can adapt it to C# (?)
https://github.com/os72/protobuf-dynamic

Is there DynamicMessage in the C# API?

On Monday, May 16, 2016 at 10:30:18 AM UTC-7, jigmesh...@gmail.com wrote:
>
> Hi,
>
> I wanted to generate FileDescriptor dynamically from .proto without 
> referencing, as in the given example we have reference Student.Interop.DTO 
> so that we can get the StudentDTO.Descriptor and EmployeeDTO.Descriptor, so 
> i wanted to avoid this reference.
>
> *Example :*
> namespace Student.WebApi
> {
> using System.Web.Http;
> using Framework.WebApi.Formatters;
> using Google.Protobuf.Reflection;
> using Repository;  
> using Student.Interop.DTO;  
>
> public class WebApiApplication : System.Web.HttpApplication
> {
> protected void Application_Start()
> {
> GlobalConfiguration.Configure(WebApiConfig.Register);
> var json = 
> GlobalConfiguration.Configuration.Formatters.JsonFormatter;
> json.SerializerSettings.Converters.Add(new 
> AnyJsonConverter(TypeRegistry.FromMessages(StudentDTO.Descriptor, 
> EmployeeDTO.Descriptor)));
> 
> }  
> }
> }
>
> So to achieve this following few steps i tried :
>
> *Step 1* : Sample Proto i.e Student.proto which consist of message type 
> i.e StudentDTO and EmployeeDTO
>
> syntax = "proto3";
> package AnalysisConsoleApplication;
> import "google/protobuf/any.proto";
> option csharp_namespace = "AnalysisConsoleApplication";
>
> message StudentDTO
> { google.protobuf.Any Any = 1;
> string USN = 2; 
> string Name = 3;
> string University = 4;
> }
> message EmployeeDTO
> { 
> string Name = 1;
> string Gender = 2;
> }
>
> Step 2 : I generated Student.pb by using below command i.e 
>
> .\protoc.exe --proto_path=D:\Proto Proto\Student.proto --include_imports 
> --descriptor_set_out=D:\AnalysisConsoleApplication\Student.pb
>
> Step 3 : If i reference Google.Protobuf.3.0.0-beta2 in my 
> SampleConsoleApplication and try to use FileDescriptor class then it will 
> give error as recently in updated version FileDescriptor  is of Internal 
> sealed class. so i clone the Google.Protobuf repository which was of 
> Google.Protobuf.3.0.0-beta2 release time, at that time FileDescriptor class 
> was public sealed class. Now my SampleConsoleApplication  solution will 
> have another project which is of Google.Protobuf.
>
> Note: SampleConsoleApplication zip file is been attached for detail 
> understanding.
>
> This code is from Actual generated C# file(Student.cs) from the given 
> proto, but now next step we will create this below descriptorData dynamically 
> from Student.pb
> byte[] descriptorData = global::System.Convert.FromBase64String(
>   string.Concat(
> "Cg1TdHVkZW50LnByb3RvEhpBbmFseXNpc0NvbnNvbGVBcHBsaWNhdGlvbhoZ",
> "Z29vZ2xlL3Byb3RvYnVmL2FueS5wcm90byJeCgpTdHVkZW50RFRPEiEKA0Fu",
> "eRgBIAEoCzIULmdvb2dsZS5wcm90b2J1Zi5BbnkSCwoDVVNOGAIgASgJEgwK",
> "BE5hbWUYAyABKAkSEgoKVW5pdmVyc2l0eRgEIAEoCSIrCgtFbXBsb3llZURU",
> "TxIMCgROYW1lGAEgASgJEg4KBkdlbmRlchgCIAEoCUIdqgIaQW5hbHlzaXND",
> "b25zb2xlQXBwbGljYXRpb25iBnByb3RvMw=="));
>   descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
>   new pbr::FileDescriptor[] { 
> global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor, },
>   new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
> new 
> pbr::GeneratedCodeInfo(typeof(global::AnalysisConsoleApplication.StudentDTO), 
> global::AnalysisConsoleApplication.StudentDTO.Parser, new[]{ "Any", "USN", 
> "Name", "University" }, null, null, null),
> new 
> pbr::GeneratedCodeInfo(typeof(global::AnalysisConsoleApplication.EmployeeDTO),
>  
> global::AnalysisConsoleApplication.EmployeeDTO.Parser, new[]{ "Name", 
> "Gender" }, null, null, null)
>   }));
>
> Step 4: Now to generate descriptorData  dynamically from Student.pb, i 
> have written the following code which gives the descriptorData in byte[]
>
> //get the path of Student.pb
> var path = string.Format("{0}/Student.pb", Path.GetDirectoryName(new 
> Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath)); 
> //create messageParser
> MessageParser messageParser = new 
> MessageParser(() => new FileDescriptorSet());
> // open and read it
> CodedInputStream stream = new CodedInputStream(new FileStream(path, 
> FileMode.Open));
> //Parses a message from the given coded input stream.
> var data = messageParser .ParseFrom(stream);
> //Covert to ByteString
> var descriptorData  = data.File[0].ToByteString();   
>
> Step 5: Last step to generate filedescriptor by calling 
> FileDescriptor.FromGeneratedCode() 
> which accepts 3 parameters
> Parameter 1:  byte[] descriptorData -> this parameter we are able to 
> generate dynamically as done in step 4 i.e   descriptorData.ToByteArray()  
>  
> Parameter 2:  FileDescriptor[] dependencies-> this 

Re: [protobuf] Dynamic/run-time decoding

2016-05-18 Thread osuciu
At least in Java, you can do everything fully dynamically at runtime. The 
native API can get quite confusing (between all the 
protos/descriptors/files...). I distilled following wrapper to make it 
easier:
https://github.com/os72/protobuf-dynamic


On Friday, April 1, 2016 at 4:32:29 PM UTC-7, Josh Haberman wrote:
>
> Hi Mike,
>
> Python indeed has descriptor classes that you can use to build proto 
> definitions at runtime. However it does not have a parser for .proto files 
> built in. So if you want to load .proto files at runtime, you'll need to 
> use protoc to build a descriptor (for example, you could shell out to 
> protoc).
>
> Josh
>
> On Monday, March 21, 2016 at 10:43:24 AM UTC-7, Mike Trienis wrote:
>>
>> Hi,
>>
>> Do you know if it's possible do dynamic decoding at run-time using the 
>> Python API? 
>>
>>- 
>>https://developers.google.com/protocol-buffers/docs/reference/python/
>>
>> Indeed there is a descriptor.FileDescriptor, however I'm not sure what 
>> the other classes correspond to?
>>
>> Thanks, Mike. 
>>
>> On Tuesday, August 12, 2014 at 10:36:13 AM UTC-7, Feng Xiao wrote:
>>>
>>> Protobuf supports creating message types dynamically at runtime and use 
>>> them for parsing/serialization/etc.
>>>
>>> First you need to build up a DescriptorPool 
>>> 
>>>  
>>> that contains all types that you may want to use. There are two approaches 
>>> to construct this pool. One is to call DescriptorPool::BuildFile() directly 
>>> with parsed proto files. For example:
>>>   // Convert .proto files into parsed FileDescriptorProto
>>>   bool ParseProtoFile(string filename, FileDescriptorProto* result) {
>>> FileInputStream stream(filename);
>>> google::protobuf::io::Tokenizer tokenizer();
>>> google::protobuf::compiler::Parser parser;
>>> return parser.Parse(, result);
>>>   }
>>>   // Build the descriptor pool
>>>   DescriptorPool pool;
>>>   for (string filename : proto_files) {
>>> FileDescriptorProto proto;
>>> ParseProtoFile(filename, );
>>> pool.BuildFile(proto);
>>>   }
>>>
>>> After you have the pool, you can query for a type by its name. For 
>>> example, DescriptorPool::FindMessageTypeByName().
>>>
>>> Then to actually parse/serialize/use message types in the pool, you need 
>>> to construct message objects around them. DynamicMessage 
>>> 
>>>  
>>> is used for that:
>>>   // Suppose you want to parse a message type with a specific type name.
>>>   Descriptor* descriptor = 
>>> pool.FindMessageTypeByName(message_type_to_parse);
>>>   DynamicMessageFactory factory;
>>>   unique_ptr message = factory.GetPrototype(descriptor)->New();
>>>   // Use the message object for parsing/etc.
>>>   message->ParseFromString(input_data);
>>>   // Access a specific field in the message
>>>   FieldDescriptor* field = descriptor->FindFieldByName(field_to_read);
>>>   switch (field->type()) {
>>> case TYPE_INT32: message->GetReflection()->GetInt32(*message, 
>>> field); break;
>>> ...
>>>   }
>>>
>>> On Mon, Aug 11, 2014 at 9:31 PM, Jan KyjovskĆ½  
>>> wrote:
>>>
 Hi,

 I have very specific problem. I have data and proto file available and 
 my application should take both and based on external configuration 
 determine how to interpret data (many different types/messages in proto). 
 Yet that can be determine only during run. My question is if there is any 
 support for that, I mean that I will be able to parse proto and decode 
 data 
 based on content of interpret intermediate structures.

 I have been trying to analyze this possibility directly from codes but 
 not with much success. I would be glad for any guidance.

 -- 
 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+u...@googlegroups.com.
 To post to this group, send email to prot...@googlegroups.com.
 Visit this group at http://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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Checking compatibility

2016-05-18 Thread osuciu
Check out the protobuf schema evolution rules, you may find it's actually 
simpler with protobuf and don't have to keep track of writer schemas like 
in Avro:
https://developers.google.com/protocol-buffers/docs/proto#updating

Corresponding to Avro GenericRecord you would use protobuf DynamicMessage

It's not documented very prominently, but you can use protobuf dynamically 
(no codegen). Schemas can be constructed at runtime, although the API can 
get confusing. And from schemas you can construct DynamicMessages. I wrote 
a wrapper to help make that a bit easier:
https://github.com/os72/protobuf-dynamic


On Friday, May 6, 2016 at 5:00:26 PM UTC-7, Vinicius Carvalho wrote:
>
> Hi there, does protobuf has an equivalent of Avro's 
> checkReaderWriterCompatibility? Can I check if two .proto files would allow 
> match between versions?
>
> Also, Avro has GenericRecord as a container object to read any data in a 
> map like style, does protobuf has something similar?
>
> Regards
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: protobuf-dynamic 0.9 (beta)

2015-04-12 Thread osuciu
The initial feature set is now complete, supports full dependency 
resolution (when parsing schema descriptor), etc.

Version 0.9.1 is released
https://github.com/os72/protobuf-dynamic

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: How to use protoc.exe in Windows for eclipse luna?

2015-04-06 Thread osuciu
If you use Eclipse with maven (m2e) you could try this plugin
https://github.com/os72/protoc-jar-maven-plugin

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] protobuf-dynamic 0.9 (beta)

2015-04-06 Thread osuciu
Hi all,

If you were ever curious about using protobuf dynamically (no protoc 
compiler) but found that difficult to use, this API may be of interest 
(java):
https://github.com/os72/protobuf-dynamic

You can create DynamicSchemas on the fly at runtime, then use them as 
factories for regular protobuf DynamicMessages

protobuf-dynamic 0.9 (beta) is now available on Maven Central

Cheers
--Oliver

// Create dynamic schemaDynamicSchema.Builder schemaBuilder = 
DynamicSchema.newBuilder();
schemaBuilder.setName(PersonSchemaDynamic.proto);
MessageDefinition msgDef = MessageDefinition.newBuilder(Person) // message 
Person
.addField(required, int32, id, 1) // required int32 id = 1
.addField(required, string, name, 2)  // required string name = 2
.addField(optional, string, email, 3) // optional string email = 3
.build();

schemaBuilder.addMessageDefinition(msgDef);DynamicSchema schema = 
schemaBuilder.build();
// Create dynamic message from schemaDynamicMessage.Builder msgBuilder = 
schema.newMessageBuilder(Person);Descriptor msgDesc = 
msgBuilder.getDescriptorForType();DynamicMessage msg = msgBuilder
.setField(msgDesc.findFieldByName(id), 1)
.setField(msgDesc.findFieldByName(name), Alan Turing)
.setField(msgDesc.findFieldByName(email), a...@sis.gov.uk)
.build();

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: How to compile protocol buffers schema at runtime in Java?

2015-04-06 Thread osuciu
Made the first beta release, protobuf-dynamic 0.9, have a look perhaps, I 
think it's quite easy to use
https://github.com/os72/protobuf-dynamic

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: How to compile protocol buffers schema at runtime in Java?

2015-03-21 Thread osuciu
I've investigated this and decided to implement an API that's easier to use:
https://github.com/os72/protobuf-dynamic

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: How to compile protocol buffers schema at runtime in Java?

2015-02-13 Thread osuciu
Hi Burak,

This sounds intriguing - i'm curious how you create a schema dynamically at 
runtime, do you have sample code you could share?

I'm also curious what performance difference you measured between 
DynamicMessage vs generated POJO class. (I use DynamicMessage very 
successfully to avoid POJO generation, but perhaps performance requirements 
are different)

Yes I also think you would need protoc  compiler toolchain at runtime to 
achieve what you want. Probably using tools.jar to invoke java compiler, 
then Class.forName(). Generated class should be in classpath.

For protoc invocation perhaps following java wrapper can help
https://github.com/os72/protoc-jar

Cheers
--Oliver

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] protoc-jar, protoc-jar-maven-plugin for 2.6.1

2015-01-02 Thread osuciu
Hi all,

protoc-jar  protoc-jar-maven-plugin are now also updated for 2.6.1 support

They're convenience JARs containing pre-built protoc binaries for Linux, 
Mac/OSX, and Windows, providing a bit of portability. The packages detect 
the platform and execute the corresponding binary.

protoc-jar can be used as executable JAR or via API, 
protoc-jar-maven-plugin is a code generation plugin for maven.
Both packages are published to Maven Central

https://github.com/os72/protoc-jar
https://github.com/os72/protoc-jar-maven-plugin

Cheers
--Oliver

$ java -jar protoc-jar-2.6.1.3.jar --version
protoc-jar: protoc version: 261, detected platform: windows 8/amd64
protoc-jar: executing: [C:\cygwin64\tmp\protoc512014267302891752.exe, --version]
libprotoc 2.6.1



import com.github.os72.protocjar.Protoc;...String[] args = 
{--help};Protoc.runProtoc(args);


-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Cross Compile error for MIPS arch. Arch not supported

2014-12-28 Thread osuciu
See https://code.google.com/p/protobuf/issues/detail?id=670
(Same issue)

On Wednesday, December 24, 2014 6:32:01 AM UTC-8, Towkhir wrote:

 Hello All,

 I am getting the following error:

 $ ./configure $CROSSOPTS --prefix=protoinstall 
 --with-protoc=tmppro/protobuf-2.6.0/src/protoc CXXFLAGS=-D__MIPSEB__

 make
 make  all-recursive
 make[1]: Entering directory `/home/stowkhir/workout/protobuf-2.6.0'
 Making all in .
 make[2]: Entering directory `/home/stowkhir/workout/protobuf-2.6.0'
 make[2]: Leaving directory `/home/stowkhir/workout/protobuf-2.6.0'
 Making all in src
 make[2]: Entering directory `/home/stowkhir/workout/protobuf-2.6.0/src'
 make  all-am
 make[3]: Entering directory `/home/stowkhir/workout/protobuf-2.6.0/src'
 depbase=`echo google/protobuf/stubs/atomicops_internals_x86_gcc.lo | sed 
 's|[^/]*$|.deps/|;s|\.lo$||'`;\
 /bin/sh ../libtool --tag=CXX   --mode=compile 
 mips64_octeon2-target-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..-pthread 
 -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -D__MIPSEB__ 
 -MT google/protobuf/stubs/atomicops_internals_x86_gcc.lo -MD -MP -MF 
 $depbase.Tpo -c -o google/protobuf/stubs/atomicops_internals_x86_gcc.lo 
 google/protobuf/stubs/atomicops_internals_x86_gcc.cc \
 mv -f $depbase.Tpo $depbase.Plo
 libtool: compile:  mips64_octeon2-target-linux-gnu-g++ -DHAVE_CONFIG_H -I. 
 -I.. -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare 
 -D__MIPSEB__ -MT google/protobuf/stubs/atomicops_internals_x86_gcc.lo -MD 
 -MP -MF google/protobuf/stubs/.deps/atomicops_internals_x86_gcc.Tpo -c 
 google/protobuf/stubs/atomicops_internals_x86_gcc.cc -o 
 google/protobuf/stubs/atomicops_internals_x86_gcc.o
 In file included from ./google/protobuf/stubs/atomicops.h:59,
  from 
 google/protobuf/stubs/atomicops_internals_x86_gcc.cc:36:
 ./google/protobuf/stubs/platform_macros.h:77: error: #error Host 
 architecture was not detected as supported by protobuf
 In file included from 
 google/protobuf/stubs/atomicops_internals_x86_gcc.cc:36:
 ./google/protobuf/stubs/atomicops.h:198: error: stray '#' in program
 ./google/protobuf/stubs/atomicops.h:198: error: expected constructor, 
 destructor, or type conversion before string constant
 make[3]: *** [google/protobuf/stubs/atomicops_internals_x86_gcc.lo] Error 1
 make[3]: Leaving directory `/home/stowkhir/workout/protobuf-2.6.0/src'
 make[2]: *** [all] Error 2
 make[2]: Leaving directory `/home/stowkhir/workout/protobuf-2.6.0/src'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/home/stowkhir/workout/protobuf-2.6.0'
 make: *** [all] Error 2

 Is the MIPS 64 architecture supported and am I configuring the command 
 properly?
 Any help is appreciated.

 Regards,
 Towkhir


-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


Re: [protobuf] Re: Portable protobuf compiler

2014-06-24 Thread osuciu
The Linux protoc in protoc-jar is a static 64bit build, I think on some 
RedHat flavor. But it still has some .so dependencies, libc.so, etc. I'm 
guessing that's the issue?

If some Linux expert could provide a fully static build (no shared libs at 
all), I think that should work on most Linuxes. Happy to include it in 
protoc-jar

Porting the whole thing to Java sounds great but may not be that trivial, 
not sure

Cheers
--Oliver

On Tuesday, June 24, 2014 8:31:08 AM UTC-7, John Calcote wrote:

 Thanks Feng Xiao- 

 I checked into protoc-jar. Unfortunately, it suffers from the same problem 
 I'm currently having - it just wraps a call to the C version of protoc for 
 windows, osx and linux and provides those binaries embedded in the jar. 
 This would be fine except, as the OP pointed out, protoc on linux is not 
 portable from one linux distro to another. The readme.md file is not even 
 clear as to which linux distro the linux version targets. I'm looking for a 
 true native java port of the protoc compiler. It's a pretty trivial 
 compiler and the C source code is available. I guess I'll have to do it 
 myself.

 John


-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] protoc-jar, protoc-jar-maven-plugin

2014-06-19 Thread osuciu
Hello protobuf folks,

Here's a simple convenience JAR that packages pre-built protoc binaries for 
Linux, Mac/OSX, and Windows. This gives a little bit of platform 
independence to protoc (besides not having to build it on Linux and Mac). 
The package detects the platform and executes the corresponding binary. It 
can be used as executable JAR or via API.

$ java -jar protoc-jar-2.5.0.0.jar --version
protoc-jar: executing: [C:\cygwin64\tmp\protoc4520968910109233475.exe, 
--version]
libprotoc 2.5.0



import com.github.os72.protocjar.Protoc;...String[] args = 
{--help};Protoc.runProtoc(args);



Based on it there is also a maven code generation plugin, please see 
details on github

https://github.com/os72/protoc-jar
https://github.com/os72/protoc-jar-maven-plugin

Both packages are published to Maven Central

Perhaps you can add a link to the Third Party Add-ons page?

Cheers!

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


Re: [protobuf] protoc-jar, protoc-jar-maven-plugin

2014-06-19 Thread osuciu
Sure

*protoc-jar-maven-plugin* is another Maven Protocol Compiler Plugin, it 
could probably go into that section

*protoc-jar* could be Multi-platform executable JAR and Java API for 
protoc

Thanks!

On Thursday, June 19, 2014 10:37:13 AM UTC-7, Feng Xiao wrote:




 On Wed, Jun 18, 2014 at 9:49 PM, osu...@gmail.com javascript: wrote:

 Hello protobuf folks,

 Here's a simple convenience JAR that packages pre-built protoc binaries 
 for Linux, Mac/OSX, and Windows. This gives a little bit of platform 
 independence to protoc (besides not having to build it on Linux and Mac). 
 The package detects the platform and executes the corresponding binary. It 
 can be used as executable JAR or via API.

 $ java -jar protoc-jar-2.5.0.0.jar --version
 protoc-jar: executing: [C:\cygwin64\tmp\protoc4520968910109233475.exe, 
 --version]
 libprotoc 2.5.0



 import com.github.os72.protocjar.Protoc;...String[] args = 
 {--help};Protoc.runProtoc(args);



 Based on it there is also a maven code generation plugin, please see 
 details on github

 https://github.com/os72/protoc-jar
 https://github.com/os72/protoc-jar-maven-plugin

 Both packages are published to Maven Central

 Perhaps you can add a link to the Third Party Add-ons page?

 I can help add the link to the Other Utilities section. Can you suggest 
 a descriptive name for the link?
  


 Cheers!

  -- 
 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+u...@googlegroups.com javascript:.
 To post to this group, send email to prot...@googlegroups.com 
 javascript:.
 Visit this group at http://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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.