tree: 6684ad7e67b11b1797a9b31b8384366c3499144c [path history] [tgz]
  1. python/
  2. src/
  3. BUILD
  4. LICENSE
  5. msys-protobuf-10.dll
  6. msys-protobuf-lite-10.dll
  7. msys-protoc-10.dll
  8. protobuf-java-3.0.0-beta-1.jar
  9. protobuf.bzl
  10. protoc-linux-x86_32.exe
  11. protoc-linux-x86_64.exe
  12. protoc-mingw.exe
  13. protoc-osx-x86_32.exe
  14. protoc-osx-x86_64.exe
  15. protoc-windows-x86_32.exe
  16. protoc-windows-x86_64.exe
  17. README.md
third_party/protobuf/README.md

How to update the binaries other than protoc-linux-x86_64.exe and protoc-linux-arm32.exe:

  1. Go to http://search.maven.org/
  2. Search for g:“com.google.protobuf”
  3. Download the “jar” link from protobuf-java.
  4. Download all binaries from “protoc”.
  5. Strip version number from protoc files: for i in *.exe; do mv $i $(echo $i | sed s/3.0.0-beta-2-//); done
  6. Set executable bit: chmod +x *.exe
  7. Update third_party/BUILD to point to the new jar file.
  8. Done.

The 64-bit Linux version of the proto compiler is linked statically. To update it, do the following steps on an x86_64 machine:

  1. git clone http://github.com/google/protobuf.git
  2. git checkout <commithash> (current is d5fb408d or 3.0.0-beta-2)
  3. ./autogen.sh
  4. LDFLAGS=-static ./configure
  5. Change LDFLAGS = -static to LDFLAGS = -all-static in src/Makefile.
  6. make
  7. cp src/protoc <Bazel tree>/third_party/protobuf/protoc-linux-x86_64.exe .

How to update the src/ directory:

  1. git clone http://github.com/google/protobuf.git
  2. git checkout <commithash> (current is d5fb408d or 3.0.0-beta-2)
  3. mkdir -p third_party/protobuf/src/google in the root of the Bazel tree.
  4. cp -R <root of protobuf tree>/src/google/protobuf third_party/protobuf/src/google
  5. Update rules in third_party/protobuf/BUILD with the rules in the protobuf repository.
  6. Done.