Apollo: Error at apollo.sh build

Created on 13 Jul 2017  Â·  23Comments  Â·  Source: ApolloAuto/apollo

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

Question

Most helpful comment

can you try bazel clean --expunge and make sure the directory boringssl-master-with-bazel is actually nuked? At the same time, can you check your WORKSPACE file to see if the version of boringssl is not boringssl-master-with-bazel anymore. See https://github.com/ApolloAuto/apollo/blob/master/WORKSPACE.in#L68, it's updated to chromium-stable-with-bazel.

All 23 comments

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 notifications@github.com 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

can you try bazel clean --expunge and make sure the directory boringssl-master-with-bazel is actually nuked? At the same time, can you check your WORKSPACE file to see if the version of boringssl is not boringssl-master-with-bazel anymore. See https://github.com/ApolloAuto/apollo/blob/master/WORKSPACE.in#L68, it's updated to chromium-stable-with-bazel.

@siyangy Thank you for your help. I could build the apollo on two different machines successfully now.
On Mac I build using the Virtual Box Linux. This issue can be closed now.

apollo$ bash apollo.sh build
System check passed. Build continue ...
[WARNING] ESD CAN library supplied by ESD Electronics does not exist. If you need ESD CAN, please refer to third_party/can_card_library/esd_can/README.md.
Running build under GPU mode. GPU is required to run the build.
[INFO] Start building, please wait ...
INFO: Reading 'startup' options from /apollo/tools/bazel.rc: --batch_cpu_scheduling --host_jvm_args=-XX:-UseParallelGC
[INFO] Building on x86_64...
[INFO] Building with --jobs=4 --ram_utilization_factor 80 for x86_64
INFO: Reading 'startup' options from /apollo/tools/bazel.rc: --batch_cpu_scheduling --host_jvm_args=-XX:-UseParallelGC
INFO: (04-02 03:39:36.411) Found 3240 targets...
ERROR: (04-02 03:39:38.146) /home/iqbal/.cache/bazel/_bazel_iqbal/540135163923dd7d5820f3ee4b306b32/external/com_google_protobuf/BUILD:73:1: C++ compilation of rule '@com_google_protobuf//:protobuf_lite' failed (Exit 1).
external/com_google_protobuf/src/google/protobuf/arenastring.cc:43:1: fatal error: error closing /tmp/ccJh3JLU.s: No space left on device
} // namespace google
^
compilation terminated.

INFO: (04-02 03:39:38.178) Elapsed time: 9.326s, Critical Path: 1.52s

[ERROR] Build failed!

[INFO] Took 11 seconds

i have successfully build and run dream view last 2 month but today morning i try to test CyberRT to run the listner and talker using cyber/bazel/example/... then my bootstrap.sh can run but monitor cannot start ....to solve this I clean the build and start build again but found the above problem....please help..??

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JonathanJones92 picture JonathanJones92  Â·  21Comments

Zoltan3057 picture Zoltan3057  Â·  16Comments

Triangle001 picture Triangle001  Â·  22Comments

PikachuHy picture PikachuHy  Â·  28Comments

JoelinChee picture JoelinChee  Â·  25Comments