BUILD error when build apollo 2.0 from source about protobuf
Hi guys, I get an error when trying to build apollo 2.0 from source. After input "bash apollo build" I get these messages:
ERROR: /home/xiang/.cache/bazel/_bazel_xiang/b12dad91e376cd0947d4dee163139822/external/com_google_protobuf/BUILD:441:1: Traceback (most recent call last): File "/home/xiang/.cache/bazel/_bazel_xiang/b12dad91e376cd0947d4dee163139822/external/com_google_protobuf/BUILD", line 441 cc_proto_library(name = "cc_test_protos", srcs = (L...), <4 more arguments>) File "/home/xiang/.cache/bazel/_bazel_xiang/b12dad91e376cd0947d4dee163139822/external/com_google_protobuf/protobuf.bzl", line 247, in cc_proto_library cc_libs += [default_runtime] trying to mutate a frozen object ERROR: /home/xiang/.cache/bazel/_bazel_xiang/b12dad91e376cd0947d4dee163139822/external/com_google_protobuf/BUILD:742:1: Traceback (most recent call last): File "/home/xiang/.cache/bazel/_bazel_xiang/b12dad91e376cd0947d4dee163139822/external/com_google_protobuf/BUILD", line 742 py_proto_library(name = "python_specific_test_pro...", <6 more arguments>) File "/home/xiang/.cache/bazel/_bazel_xiang/b12dad91e376cd0947d4dee163139822/external/com_google_protobuf/protobuf.bzl", line 373, in py_proto_library py_libs += [default_runtime] trying to mutate a frozen object ^C Bazel caught interrupt signal; shutting down.
I'm using ubuntu 16.04 with ROS K. Looks like some things goes wrong in bazel query and protobuf. But I'm not familiar with bazel. Any suggestions?
Do you work in docker container?
I have the same issue. It's ok in the docker, but in the pc side there will be the same error. Who can support me?
I'm in Ubuntu 16.04 and I don't want to docker another ubuntu 1404 in my system...
I found a relation issue on stack overflow https://stackoverflow.com/questions/47688252/tensorflow-trying-to-mutate-a-frozen-object-bazel It seems that we should downgrade the bazel to some older version or....
And further search shows: https://github.com/google/protobuf/issues/3796
And the patch: Make .bzl files compatible with future versions of Bazel
My solution: downgrade bazel to 0.5.4 and solved the "mutate a frozen object" problem.
it seems impossible to build apollo in ubuntu 16.04, because firstly the ros in apollo is based on indigo , and ros can be install in ubuntu 16.04 only in distro kinetic , secondly the docs in apollo said " the apollo docker is the only supporting realtime system"
It is recommended to build Apollo in Ubuntu 14.04. Should you want to continue building in Apollo 16.04, please refer to: the following document Closing this issue as it seems to be resolved.