Error at apollo.sh build
I ran following commands bash docker/scripts/install_docker.sh docker ps bash docker/scripts/dev_start.sh bash docker/scripts/dev_into.sh bash apollo.sh build
and at the build phase I am getting following errors: WARNING: Running Bazel server needs to be killed, because the startup options are different. INFO: Found 189 targets... ERROR: /apollo/modules/hmi/ros_node/BUILD:3:1: Linking of rule '//modules/hmi/ros_node:ros_node_service' failed: gcc failed: error executing command /usr/bin/gcc -o bazel-out/local-dbg/bin/modules/hmi/ros_node/ros_node_service '-Wl,-rpath,$ORIGIN/../../../_solib_k8/_U@ros_S_S_Cros_Ucommon___Uexternal_Sros_Slib' ... (remaining 8 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. external/boringssl/boringssl-master-with-bazel/src/ssl/handshake_server.cc:778: error: undefined reference to 'tls13_server_handshake' collect2: error: ld returned 1 exit status INFO: Elapsed time: 1308.514s, Critical Path: 480.22s
[ERROR] Build failed! [INFO] Took 1722 seconds
This error has never been reported. It could just be a glitch of the bazel build system. Can you try only building the failed target by bazel --batch --batch_cpu_scheduling build --define ARCH=$(uname -m) --define CAN_CARD=fake_can --cxxopt=-DUSE_ESD_CAN=false -c dbg //modules/hmi/ros_node:ros_node_service to see if it happens again?
Also your build time seems very long, which indicates that your memory is not enough. Another guess is that g++ sometimes has weird behavior when it exhausts memory.
only building the failed target by bazel --batch --batch_cpu_scheduling build --define ARCH=$(uname -m) --define CAN_CARD=fake_can --cxxopt=-DUSE_ESD_CAN=false -c dbg //modules/hmi/ros_node:ros_node_service
the error happened again.
my gcc version is gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
So you are not running inside docker? If so, the ubuntu is supposed to be 14.04.
Best wishes,
Ning Qu
On Wed, Jul 12, 2017 at 6:54 PM, zwqaoy [email protected] wrote:
only building the failed target by bazel --batch --batch_cpu_scheduling build --define ARCH=$(uname -m) --define CAN_CARD=fake_can --cxxopt=-DUSE_ESD_CAN=false -c dbg //modules/hmi/ros_node:ros_ node_service
the error happened again. my gcc version is gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ApolloAuto/apollo/issues/166#issuecomment-314947304, or mute the thread https://github.com/notifications/unsubscribe-auth/AIHPsirwQVhpqxmDzJjfOIUGa8GQUgjMks5sNXjPgaJpZM4OWTTC .
the build environment in docker
Can you run "./apollo.sh clean " first and then run "./apollo.sh build" (both in the dev docker environment).
@wanglei828 the error does not solve.
same issue here.
Thanks all for reporting this issue. It's bizarre that people have never run into this issue both internally and in the community until today. The failure comes from a dependency library called boringssl. I briefly checked the code (https://github.com/google/boringssl/tree/master-with-bazel) and have found that tls13_server_handshake has its definition in it, so theoretically the linker should be able to find it.
I have filed an issue on them (https://github.com/pubref/rules_protobuf/issues/107) to hopefully get them shed some light on it. At the same time we will keep digging to try to at least repro it :)
delete error code position, the next follow step work normal also.
Maybe use a specific working revision instead of "master" branch for dependencies instead (to prevent breaking by upstream changes)?
reason of link error - "--start-lib" and "--end-lib" parameters are being used for ld command, and the required tls13_server_handshake symbol is in a 'latter' pseudo-library. Not familiar with Bazel so dunno how to change this.
+1
same issue, what can i do except waiting :(
@bokeer We'll keep you updated. I'm able to repro that now, and we'll try to resolve it by tomorrow. Thanks for your patience.
The build failure should be going away after the two fix PR's. Please echo back on this thread if you are still seeing it.
Thank you so much. So should I check out the master branch again?
Yes pull the latest master should fix it
The errors are still there: The first error is at: /home/vijay/.cache/bazel/_bazel_vijay/540135163923dd7d5820f3ee4b306b32/external/boringssl/boringssl-master-with-bazel/BUILD:20:5: file ':BUILD.generated.bzl' does not contain symbol 'ssl_c_sources' (did you mean 'ssl_sources'?). ERROR: /home/vijay/.cache/bazel/_bazel_vijay/540135163923dd7d5820f3ee4b306b32/external/boringssl/boringssl-master-with-bazel/BUILD:74:22: Traceback (most recent call last):
And the last error is at: ERROR: /home/vijay/.cache/bazel/_bazel_vijay/540135163923dd7d5820f3ee4b306b32/external/org_pubref_rules_protobuf/protobuf/internal/require.bzl:46:13: no such target '@boringssl//boringssl-master-with-bazel:ssl': target 'ssl' not declared in package 'boringssl-master-with-bazel' defined by /home/vijay/.cache/bazel/_bazel_vijay/540135163923dd7d5820f3ee4b306b32/external/boringssl/boringssl-master-with-bazel/BUILD and referenced by '//external:libssl'. ERROR: Analysis of target '//modules/common/util/testing:simple_proto' failed; build aborted.
Can you try clearing the bazel cache? ./apollo.sh clean should do it. Or you can do that manually by rm -rf /home/vijay/.cache/bazel/.
Sure. Let me try. Here I have a question, is it possible to put apollo build part of docker img? Because I see this is really coming as critical to get the environment up.
Did the clean and removed the bazel cache also. Same error again: tool_sources name 'tool_sources' is not defined. ERROR: /home/vijay/.cache/bazel/_bazel_vijay/540135163923dd7d5820f3ee4b306b32/external/org_pubref_rules_protobuf/protobuf/internal/require.bzl:46:13: no such target '@boringssl//boringssl-master-with-bazel:ssl': target 'ssl' not declared in package 'boringssl-master-with-bazel' defined by /home/vijay/.cache/bazel/_bazel_vijay/540135163923dd7d5820f3ee4b306b32/external/boringssl/boringssl-master-with-bazel/BUILD and referenced by '//external:libssl'. ERROR: Analysis of target '//modules/common/proto:header_proto' failed; build aborted. INFO: Elapsed time: 18.997s
[ERROR] Build failed! [INFO] Took 266.224 seconds