New issue
Advanced search Search tips

Issue 638488 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug

Blocked on:
issue 572585



Sign in to add a comment

dom_distiller_proto_gen fails with ImportError: No module named google.protobuf.descriptor_pb2

Project Member Reported by kbr@chromium.org, Aug 17 2016

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.

 

Comment 1 by kbr@chromium.org, Aug 17 2016

FYI, here are my args.gn from out/Release:

is_debug = false
use_goma = true
goma_dir = "/Users/kbr/goma"
is_component_build = true
dcheck_always_on = true

Comment 2 by wychen@chromium.org, Aug 17 2016

Status: Started (was: Assigned)
Oops. Sorry about that. I'll try to reproduce on my MacBook Pro 15.

Comment 3 by wychen@chromium.org, 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!

Comment 4 by kbr@chromium.org, Aug 17 2016

export PYTHONPATH=/Users/kbr/src/chrome/src/third_party/protobuf/python

works around the problem.

Comment 5 by wychen@chromium.org, Aug 17 2016

Cc: jbudorick@chromium.org
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?

Comment 7 by wychen@chromium.org, Aug 17 2016

Status: Fixed (was: Started)

Comment 8 by kbr@chromium.org, Aug 17 2016

Thanks for the quick fix.

Comment 9 by wychen@chromium.org, Nov 17 2017

The fix in #c6 was incomplete. See issue 764774.

Sign in to add a comment