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

How to update the binaries other than protoc-linux-x86_64.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 protobuf.bzl and 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.

How to update protoc-mingw.exe: This is pretty much the same steps as for x86_64 above, but they need to be done from MingW shell on Windows machine ([https://sourceforge.net/projects/msys2/files/]).

  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. make
  5. cp src/protoc.exe <Bazel tree>/third_party/protobuf/protoc-mingw.exe .

How to update anything else in this directory: follow usual procedure as described on https://www.bazel.io/contributing.html