交叉编译Chromium Arm

交叉编译Chromium Arm

我尝试在 ubuntu 18.04 上为 arm 编译 chromium。

我跟着指示并且设置系统根目录。我还按照 ( ) 的描述传递了arm 参数gn gen out/Default "--args=target_cpu=\"arm\""。我开始编译 ( autoninja -C out/Default chrome),它运行了几分钟。现在我收到此错误消息

ninja: Entering directory `out/Default'
[21291/70630] ACTION //third_party/dom_distiller_js:dom_distiller_proto_gen(//build/toolchain/linux:clang_arm)
FAILED: pyproto/third_party/dom_distiller_js/dom_distiller_pb2.py gen/third_party/dom_distiller_js/dom_distiller.pb.h gen/third_party/dom_distiller_js/dom_distiller.pb.cc gen/third_party/dom_distiller_js/dom_distiller_json_converter.h 
python ../../tools/protoc_wrapper/protoc_wrapper.py dom_distiller.proto --protoc ./clang_x64/protoc --proto-in-dir ../../third_party/dom_distiller_js/dist/proto --cc-out-dir gen/third_party/dom_distiller_js --py-out-dir pyproto/third_party/dom_distiller_js --plugin ../../third_party/dom_distiller_js/protoc_plugins/json_values_converter.py --plugin-out-dir gen/third_party/dom_distiller_js --plugin-options output_dir=:
Traceback (most recent call last):
  File "../../third_party/dom_distiller_js/protoc_plugins/json_values_converter.py", line 14, in <module>
    from util import plugin_protos, types, writer
  File "/home/dustin/chromium/src/third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py", line 22, in <module>
    from google.protobuf.descriptor_pb2 import FieldDescriptorProto
ImportError: No module named protobuf.descriptor_pb2
--plugin_out: protoc-gen-plugin: Plugin failed with status code 1.
Protoc has returned non-zero status: 1
[21293/70630] ACTION //third_party/dom_distiller_js:json_values_converter_test_proto_gen(//build/toolchain/linux:clang_arm)
FAILED: pyproto/third_party/dom_distiller_js/test_sample_pb2.py gen/third_party/dom_distiller_js/test_sample.pb.h gen/third_party/dom_distiller_js/test_sample.pb.cc gen/third_party/dom_distiller_js/test_sample_json_converter.h 
python ../../tools/protoc_wrapper/protoc_wrapper.py test_sample.proto --protoc ./clang_x64/protoc --proto-in-dir ../../third_party/dom_distiller_js --cc-out-dir gen/third_party/dom_distiller_js --py-out-dir pyproto/third_party/dom_distiller_js --plugin ../../third_party/dom_distiller_js/protoc_plugins/json_values_converter.py --plugin-out-dir gen/third_party/dom_distiller_js --plugin-options output_dir=:
Traceback (most recent call last):
  File "../../third_party/dom_distiller_js/protoc_plugins/json_values_converter.py", line 14, in <module>
    from util import plugin_protos, types, writer
  File "/home/dustin/chromium/src/third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py", line 22, in <module>
    from google.protobuf.descriptor_pb2 import FieldDescriptorProto
ImportError: No module named protobuf.descriptor_pb2
--plugin_out: protoc-gen-plugin: Plugin failed with status code 1.
Protoc has returned non-zero status: 1
[21308/70630] CXX obj/services/device/usb/mojo/mojo/device_manager_impl.o
ninja: build stopped: subcommand failed.

答案1

通过 pip 安装缺少的模块解决了我的问题。

相关内容