dom_distiller_proto_gen fails with ImportError: No module named google.protobuf.descriptor_pb2 |
||||
Issue description
Syncing Chromium to top-of-tree on my work laptop (MacBook Pro Retina) and attempting to build yields the following build error:
[8933/24623] ACTION //third_party/dom_distiller_js:dom_distiller_proto_gen(//build/toolchain/mac:clang_x64)
FAILED: pyproto/third_party/dom_distiller_js/dom_distiller_pb2.py gen/third_party/dom_distiller_js/dom_distiller.pb.cc gen/third_party/dom_distiller_js/dom_distiller.pb.h gen/third_party/dom_distiller_js/dom_distiller_json_converter.h
python ../../tools/protoc_wrapper/protoc_wrapper.py --proto-in-dir ../../third_party/dom_distiller_js/dist/proto --proto-in-file dom_distiller.proto --use-system-protobuf=0 -- ./protoc --python_out pyproto/third_party/dom_distiller_js --cpp_out gen/third_party/dom_distiller_js --plugin=protoc-gen-json_converter=/Users/kbr/src/chrome/src/third_party/dom_distiller_js/protoc_plugins/json_values_converter.py --json_converter_out=output_dir=:gen/third_party/dom_distiller_js
Traceback (most recent call last):
File "/Users/kbr/src/chrome/src/third_party/dom_distiller_js/protoc_plugins/json_values_converter.py", line 14, in <module>
from util import plugin, plugin_protos, writer
File "/Users/kbr/src/chrome/src/third_party/dom_distiller_js/protoc_plugins/util/plugin.py", line 7, in <module>
import plugin_protos
File "/Users/kbr/src/chrome/src/third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py", line 15, in <module>
from google.protobuf.descriptor_pb2 import FieldDescriptorProto
ImportError: No module named google.protobuf.descriptor_pb2
--json_converter_out: protoc-gen-json_converter: Plugin failed with status code 1.
I don't understand why the waterfall is building successfully but my machine isn't.
It seems pretty clear that this is a consequence of the fix for Issue 572585 so assigning to wychen@. I'm trying to figure out a workaround now.
,
Aug 17 2016
Oops. Sorry about that. I'll try to reproduce on my MacBook Pro 15.
,
Aug 17 2016
I can reproduce this after removing the system protobuf on my MacBook. The fix is here: https://codereview.chromium.org/2250333002/ Would you mind double checking it? Thanks!
,
Aug 17 2016
export PYTHONPATH=/Users/kbr/src/chrome/src/third_party/protobuf/python works around the problem.
,
Aug 17 2016
I think all the buildbots have protobuf installed as system package for convenience, and it caused CQ to miss this bug. Re-provisioning all the bots to remove the system package should enable CQ to catch this kind of bug, but this sounds like a lot of work. jbudorick@, what do you think?
,
Aug 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e82a438a04275d27631b43812b15920b4a339699 commit e82a438a04275d27631b43812b15920b4a339699 Author: wychen <wychen@chromium.org> Date: Wed Aug 17 08:32:38 2016 Use non-system protobuf in third_party/dom_distiller_js/protoc_plugins BUG= 638488 Review-Url: https://codereview.chromium.org/2250333002 Cr-Commit-Position: refs/heads/master@{#412475} [modify] https://crrev.com/e82a438a04275d27631b43812b15920b4a339699/third_party/dom_distiller_js/protoc_plugins/json_values_converter.bat [modify] https://crrev.com/e82a438a04275d27631b43812b15920b4a339699/third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py
,
Aug 17 2016
,
Aug 17 2016
Thanks for the quick fix.
,
Nov 17 2017
The fix in #c6 was incomplete. See issue 764774. |
||||
►
Sign in to add a comment |
||||
Comment 1 by kbr@chromium.org
, Aug 17 2016