diff options
author | Lukacs T. Berki <lberki@google.com> | 2016-04-04 15:57:15 +0200 |
---|---|---|
committer | Lukacs T. Berki <lberki@google.com> | 2016-04-06 13:02:11 +0200 |
commit | 168031d21624741411ac238373cbd8544b8948df (patch) | |
tree | 903caee14c5fbe3220cede71ccd24fce33151231 /third_party | |
parent | 62d1e72bac93d1cb240630c1ff9777b994712216 (diff) |
Update the x86_64 protoc with a statically linked version.
Change-Id: I9fac9d265ae9f1691be4dbb4b3bef6f35872b5ee
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/protobuf/README.md | 19 | ||||
-rwxr-xr-x | third_party/protobuf/protoc-linux-x86_64.exe | bin | 3770744 -> 45695344 bytes |
2 files changed, 16 insertions, 3 deletions
diff --git a/third_party/protobuf/README.md b/third_party/protobuf/README.md index bdeeb5210d..466dbd15a3 100644 --- a/third_party/protobuf/README.md +++ b/third_party/protobuf/README.md @@ -1,11 +1,11 @@ -How to update these files: +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-alpha-3-//); done -6. Set executable bit: chmod +x *.exe +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. @@ -13,6 +13,18 @@ Because maven.org doesn't have a prebuilt binary for linux on ARM, you need to b yourself on the target system. Follow the build steps of protocol buffer to create the binary, copy it to this directory and rename it to "protoc-linux-arm32.exe". +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` . + + For example: $ cp /usr/bin/protoc $BAZEL/third_party/protobuf/protoc-linux-arm32.exe @@ -20,6 +32,7 @@ $ cp /usr/bin/protoc $BAZEL/third_party/protobuf/protoc-linux-arm32.exe This should be done before you run ./compile.sh. How to update the `src/` directory: + 1. Run `git clone http://github.com/google/protobuf.git` in a convenient directory. 2. `mkdir third_party/protobuf/src/google` in the root of the Bazel tree. 3. `cp -R <root of protobuf tree>/src/google/protobuf third_party/protobuf/src/google` diff --git a/third_party/protobuf/protoc-linux-x86_64.exe b/third_party/protobuf/protoc-linux-x86_64.exe Binary files differindex e0b1c21b38..a5cb5e6c2f 100755 --- a/third_party/protobuf/protoc-linux-x86_64.exe +++ b/third_party/protobuf/protoc-linux-x86_64.exe |