Repository navigation
Use external repository for protobuf dependency. - #1289
Conversation
|
Can one of the admins verify this patch? |
|
So this require the entire world to upgrade to bazel 0.2, right? @tensorflow-jenkins: test this please, but note that this probably will fail if the answer to the above question is "yes", since we haven't updated Jenkins to bazel 0.2 yet. |
|
@vrv - Yes, this would require everyone to upgrade to Bazel 0.2. Also, the |
|
I see that the Jenkins jobs are failing since the CI machines are running an older version of Bazel, which does not yet contain the |
|
We are going to upgrade bazel to 0.2 today anyway in #1206. We will update mac as well and this will work :) |
a74d275 to
dba1a2c
Compare
|
I have rebased this patch on HEAD, resolved merge conflicts and made some additional changes since there are now additional targets that use protobuf. |
|
@tensorflow-jenkins : test this please |
|
Can you bump the version of required bazel https://github.com/tensorflow/tensorflow/blob/master/WORKSPACE#L21 here and then we can re-test? |
7bee4b8 to
16f3d8b
Compare
|
Done. |
|
@tensorflow-jenkins test this please |
|
Some target in protobuf is missing a |
|
Also looks like build_pip_package needs to be updated. |
|
@martinwicke There seems to be a few. I'll submit a PR to protobuf to add the missing @vrv Will do. |
|
Opened protocolbuffers/protobuf#1402. What is the Bazel command run for http://ci.tensorflow.org/job/tensorflow-pull-requests-cpu-python3/262/consoleFull? I tried Edit: Found the problem. It was because it was looking for gmock.BUILD in |
|
The exact command is in the log, but the main point is bazel test On Fri, Apr 8, 2016 at 14:13 David Z. Chen [email protected] wrote:
|
94b803f to
814bb00
Compare
|
I have updated the commit hash in |
|
Yes, just rebased, updated, and pushed. |
|
@tensorflow-jenkins test this please |
|
that failed quickly: ERROR: /workspace/tensorflow/workspace.bzl:84:3: no such package '@gmock_archive//': In new_http_archive rule //external:gmock_archive the 'build_file' attribute does not specify an existing file (/workspace/@protobuf/:gmock.BUILD does not exist) and referenced by '//external:gtest'. |
|
Odd. Looking |
fade8b0 to
f5a9740
Compare
|
Seems that this is caused by a bug in this version of Bazel that is fixed in a later version. In any case, it is probably better to have Can you start the tests again? |
|
test this please |
|
Almost, looks like the pip install doesn't work Python binary path to be used in PIP install: /usr/bin/python (Major.Minor version: 2.7) |
|
I'll take a look. Is the command that the script used to invoke |
|
Yeah see the section called Create the pip package and install on https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html |
Currently, TensorFlow uses a Git submodule for its dependency on protobuf. This was due to the hack used in protobuf for building Python support with Bazel, which was required since Bazel's Python rules did not support adding directories to `PYTHONPATH`. Now that the new `imports` attribute has been added to the Python rules in Bazel 0.2 and the hack for Python support in protobuf has been removed, this change removes the `google/protobuf` Git submodule and adds an external repository for including protobuf. This patch also adds gmock.BUILD to the tensorflow repo. Fixes tensorflow#1069 Fixes tensorflow#2021
|
Should be fixed now. Not sure if this will work but: @tensorflow-jenkins test this please |
|
@tensorflow-jenkins test this please |
|
Looks like all the tests passed this time, though on the GitHub UI, the MacOS CPU Tests is still marked as BUILDING even though it has succeeded on Jenkins. Could it be related to this message? Edit: or maybe not since other logs have that message too. Perhaps there's just some delay. |
|
Sweet, this is awesome. @martinwicke @caisq okay to merge? (I'll have to do some work internally to bring this change in, but I'll sign up for that this week). |
|
\o/ Thanks! |
|
Woot On Thu, May 26, 2016 at 3:25 PM David Z. Chen [email protected]
|
|
Yay! |
|
I understand that Bazel is the preferred build tool for TensorFlow. However, it's worth noting that this change has some consequences for developers woking with alternative build tools:
I'd also add a more general request. This kind of change to the repo structure should have a minor release number with some release notes. It took me a good while to figure out why all the Protobuf headers had disappeared from my build environment after I merged in the latest tensorflow:master changes. I thought I had deleted them somehow and went around in circles before finding this PR. |
|
We are sorry for the inconvenience @StephenOman! It is much better to download git repos using bazel. Also for all the builds there is a lot of them, not just protobuf. What build tool are you using? We have also have (incomplete):
Please take a look at those two. Please contribute if one of them would suite you. Once we get them into reasonable state we can enable builds for them in ci.tensorflow.org. That way we make sure no change break that. No more breakage for you :) |
|
Thanks for the note @jendap. I'm wrapping the current C++ API with an Objective C++ interface in order to build a Swift-based iOS app. Complicated, I know! To do this, I'd created a set of Xcode projects to build both Protobuf and TensorFlow libs and am managing the build from there. |
|
Take a look at contrib/makefile. We have added it exactly for this reason. It will be recommended way of working in xcode. We will soon have automated build this so it should work in future. But it is very new (may be even broken right now). |
|
Right, I see where you are going with this. Thanks. |
Currently, TensorFlow uses a Git submodule for its dependency on
protobuf. This was due to the hack used in protobuf for building Python
support with Bazel, which was required since Bazel's Python rules did
not support adding directories to
PYTHONPATH. Now that the newimportsattribute has been added to the Python rules in Bazel 0.2 andthe hack for Python support in protobuf has been removed, this change
removes the
google/protobufGit submodule and adds an externalrepository for including protobuf.
Fixes #1069