Re: [protobuf] Re: Portable protobuf compiler

2014-06-25 Thread Chris Beams
On Jun 24, 2014, at 5:31 PM, John Calcote john.calc...@gmail.com wrote:

 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.

I'd like to see this as well, and would be happy to help with early testing. 
Would be good to think about reaching out to the authors of the IDEA [1] and 
Gradle [2] protobuf plugins too.

[1]: https://github.com/aantono/gradle-plugin-protobuf
[2]: https://github.com/nnmatveev/idea-plugin-protobuf


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [protobuf] Re: Portable protobuf compiler

2014-06-24 Thread John Calcote
Thanks osuciu - 

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

On Monday, June 23, 2014 7:38:10 PM UTC-6, Feng Xiao wrote:

 On Mon, Jun 23, 2014 at 6:29 PM, John Calcote john.c...@gmail.com 
 javascript: wrote:

 I'm also interested in a portable protoc compiler - java would be nice, 
 but python would work too. No one has a comment on this?

 osuciu@'s protoc-jar might be of interest to you: 
 https://github.com/os72/protoc-jar
  



 On Friday, January 24, 2014 2:07:27 AM UTC-7, Matthias Hogerheijde wrote:

 Hi,

 I've successfully compiled protoc in order to generate Java sources from 
 a .proto file. (In this case gtfs-realtime.proto 
 https://developers.google.com/transit/gtfs-realtime/gtfs-realtime-proto
 .)

 We're using this in a Maven project. My wish is to have Maven compile 
 the Java source from the .proto files automatically; and not have the 
 compiled sources checked in into Git.
 I've configured Maven to automatically execute protoc with the desired 
 parameters to generate the sources for me; all is going well.  I even 
 configured Maven to use the Windows executable when on a Windows platform.

 But the Linux version is not portable. When compiling the 
 protoc-executable it hard-codes some absolute paths. This means that I 
 cannot ship the executable with the project, for other programmers working 
 on the same project don't have the same folder-tree as I do; and I don't 
 want to force them to either.

 Does anyone know of a way to have a portable solution to generate the 
 code on the fly, without having every contributor on the project having to 
 download/configure/compile protoc?

 Kind Regards,
 Matthias Hogerheijde

  -- 
 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.


Re: [protobuf] Re: Portable protobuf compiler

2014-06-24 Thread John Calcote
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.


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] Re: Portable protobuf compiler

2014-06-23 Thread John Calcote
I'm also interested in a portable protoc compiler - java would be nice, but 
python would work too. No one has a comment on this?

On Friday, January 24, 2014 2:07:27 AM UTC-7, Matthias Hogerheijde wrote:

 Hi,

 I've successfully compiled protoc in order to generate Java sources from a 
 .proto file. (In this case gtfs-realtime.proto 
 https://developers.google.com/transit/gtfs-realtime/gtfs-realtime-proto
 .)

 We're using this in a Maven project. My wish is to have Maven compile the 
 Java source from the .proto files automatically; and not have the compiled 
 sources checked in into Git.
 I've configured Maven to automatically execute protoc with the desired 
 parameters to generate the sources for me; all is going well.  I even 
 configured Maven to use the Windows executable when on a Windows platform.

 But the Linux version is not portable. When compiling the 
 protoc-executable it hard-codes some absolute paths. This means that I 
 cannot ship the executable with the project, for other programmers working 
 on the same project don't have the same folder-tree as I do; and I don't 
 want to force them to either.

 Does anyone know of a way to have a portable solution to generate the code 
 on the fly, without having every contributor on the project having to 
 download/configure/compile protoc?

 Kind Regards,
 Matthias Hogerheijde


-- 
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-23 Thread 'Feng Xiao' via Protocol Buffers
On Mon, Jun 23, 2014 at 6:29 PM, John Calcote john.calc...@gmail.com
wrote:

 I'm also interested in a portable protoc compiler - java would be nice,
 but python would work too. No one has a comment on this?

osuciu@'s protoc-jar might be of interest to you:
https://github.com/os72/protoc-jar




 On Friday, January 24, 2014 2:07:27 AM UTC-7, Matthias Hogerheijde wrote:

 Hi,

 I've successfully compiled protoc in order to generate Java sources from
 a .proto file. (In this case gtfs-realtime.proto
 https://developers.google.com/transit/gtfs-realtime/gtfs-realtime-proto
 .)

 We're using this in a Maven project. My wish is to have Maven compile the
 Java source from the .proto files automatically; and not have the compiled
 sources checked in into Git.
 I've configured Maven to automatically execute protoc with the desired
 parameters to generate the sources for me; all is going well.  I even
 configured Maven to use the Windows executable when on a Windows platform.

 But the Linux version is not portable. When compiling the
 protoc-executable it hard-codes some absolute paths. This means that I
 cannot ship the executable with the project, for other programmers working
 on the same project don't have the same folder-tree as I do; and I don't
 want to force them to either.

 Does anyone know of a way to have a portable solution to generate the
 code on the fly, without having every contributor on the project having to
 download/configure/compile protoc?

 Kind Regards,
 Matthias Hogerheijde

  --
 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.


-- 
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.