My build server is based on Linux. I need protoc to integrate it with my ant build system.
I use the following in build.xml for this:
<exec executable="tools/protoc.exe" failonerror="true"> <arg value="--java_out=../protos/java/generated" /> <arg value="--proto_path=../protos/proto" /> <arg value="../protos/proto/*.proto" /> </exec>
I found windows binaries but not linux binary for protoc.
Any help for finding one or building a statically linked protoc binary would be nice.
Have you tried just downloading the main protobuf project and following the installation instructions ? It seems I remember it quite simply if you only need a binary:
$ ./autogen.sh $ ./configure $ make
(In this case, you probably won't need to make install if you only need the binary protoc file. Just find out where it was created and copy it.)
make install
protoc
Precompiled binaries for the latest version are on the official releases page on GitHub. Previous versions can be found in the Maven repository .
Edit Oct 19, 2017: There are no precompiled binaries for v3.4.1 (currently the latest version), but the release page states that This is mostly a bug fix release on runtime packages. It is safe to use 3.4.0 protoc packages for this release. This is mostly a bug fix release on runtime packages. It is safe to use 3.4.0 protoc packages for this release. Binaries for v3.4.0 can be found by scrolling further down.
This is mostly a bug fix release on runtime packages. It is safe to use 3.4.0 protoc packages for this release.
For java, you can also use https://github.com/os72/protoc-jar , which already contains binaries for different platforms.
In Ubuntu (starting from 12.04) you can find protobuf-compiler in the repository.
protobuf-compiler
sudo apt-get install protobuf-compiler $> protoc --version libprotoc 2.6.1
And you can also set header files:
sudo aptitude install libprotobuf-dev