apollo
apollo copied to clipboard
Build did NOT complete successfully
We appreciate you go through Apollo documentations and search previous issues before creating an new one. If neither of the sources helped you with your issues, please report the issue using the following form. Please note missing info can delay the response time.
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 18.04): 20.04
- Apollo installed from (source or binary): source? (git clone)
- Apollo version (3.5, 5.0, 5.5, 6.0): 7.0
-
Output of
apollo.sh config
if onmaster
branch:
Steps to reproduce the issue:
- Please use bullet points and include as much details as possible: I couldn't build successfully as the instructions. When run the below commands, it shows "Build did NOT complete successfully"
sudo proxychains bash apollo.sh build
# OR
sudo bash apollo.sh build
Supporting materials (screenshots, command lines, code/script snippets):
root@in-dev-docker:/apollo# sudo proxychains bash apollo.sh build
ProxyChains-3.1 (http://proxychains.sf.net)
[INFO] Apollo Environment Settings:
[INFO] APOLLO_ROOT_DIR: /apollo
[INFO] APOLLO_CACHE_DIR: /apollo/.cache
[INFO] APOLLO_IN_DOCKER: true
[INFO] APOLLO_VERSION: predtr-2021-12-28-463fb82f9e
[INFO] DOCKER_IMG:
[INFO] APOLLO_ENV: STAGE=dev USE_ESD_CAN=false
[INFO] USE_GPU: USE_GPU_HOST= USE_GPU_TARGET=1
[ OK ] Running GPU build on x86_64 platform.
[WARNING] ESD CAN library supplied by ESD Electronics doesn't exist.
[WARNING] If you need ESD CAN, please refer to:
[WARNING] third_party/can_card_library/esd_can/README.md
[INFO] Build Overview:
[INFO] USE_GPU: 1 [ 0 for CPU, 1 for GPU ]
[INFO] Bazel Options: --config=gpu
[INFO] Build Targets: //modules/... union //cyber/...
[INFO] Disabled: except //modules/drivers/canbus/can_client/esd/...
Starting local Bazel server and connecting to it...
WARNING: ignoring LD_PRELOAD in environment.
(00:29:33) INFO: Invocation ID: 40695d7b-c7dd-416c-b7ae-de72a1612dec
(00:29:33) INFO: Current date is 2022-01-28
(00:30:32) INFO: Repository build_bazel_rules_swift instantiated at:
/apollo/WORKSPACE:68:16: in <toplevel>
/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/com_github_grpc_grpc/bazel/grpc_extra_deps.bzl:38:29: in grpc_extra_deps
/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/build_bazel_rules_apple/apple/repositories.bzl:117:11: in apple_rules_dependencies
/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/build_bazel_rules_apple/apple/repositories.bzl:84:14: in _maybe
Repository rule http_archive defined at:
/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
(00:30:32) INFO: Repository rules_java instantiated at:
/apollo/WORKSPACE:68:16: in <toplevel>
/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/com_github_grpc_grpc/bazel/grpc_extra_deps.bzl:29:18: in grpc_extra_deps
/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/com_google_protobuf/protobuf_deps.bzl:44:21: in protobuf_deps
Repository rule http_archive defined at:
/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
(00:30:32) WARNING: Download from https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz failed: class java.io.IOException connect timed out
(00:30:32) ERROR: An error occurred during the fetch of repository 'rules_java':
Traceback (most recent call last):
File "/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz] to /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/rules_java/temp14011213055655260428/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz: connect timed out
(00:30:32) ERROR: While resolving toolchains for target //modules/v2x/v2x_proxy/os_interface:os_interface_cpplint: invalid registered toolchain '@bazel_tools//tools/jdk:all': while parsing '@bazel_tools//tools/jdk:all': no such package '@rules_java//java': java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz] to /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/rules_java/temp14011213055655260428/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz: connect timed out
(00:30:32) ERROR: Analysis of target '//modules/v2x/v2x_proxy/os_interface:os_interface_cpplint' failed; build aborted: invalid registered toolchain '@bazel_tools//tools/jdk:all': while parsing '@bazel_tools//tools/jdk:all': no such package '@rules_java//java': java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz] to /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/rules_java/temp14011213055655260428/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz: connect timed out
(00:30:32) INFO: Elapsed time: 59.517s
(00:30:32) INFO: 0 processes.
(00:30:32) FAILED: Build did NOT complete successfully (595 packages loaded, 6242 targets configured)
currently loading: @bazel_tools//tools/jdk ... (3 packages)
root@in-dev-docker:/apollo#
The error message says IO timed out. Pls try to check if you can access https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz
https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz
I can access to the url outside docker, In docker, I need to use proxychains.
But when comand sudo proxychains bash apollo.sh build
to build, it as if the proxychains didn't work.
@Xinchengzelin I came across the same problem.. just cannot download inside the docker
@Xinchengzelin I came across the same problem.. just cannot download inside the docker
Have you found the solutions?
Not yet, the same problem in #14105, and the author somehow closed it with no solutions given.
If you don't mind, you can do the following
- download the file outside the docker, then copy it into docker, copy the download
981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz
file into docker/tmp
dir - add below code in apollo
WORKSPACE
file ref
http_archive(
name = "rules_java",
sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3",
strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd",
urls = [
"file:///tmp/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz"
],
)
and then try again
If you don't mind, you can do the following
1. download the file outside the docker, then copy it into docker, copy the download `981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz` file into docker `/tmp` dir 2. add below code in apollo `WORKSPACE` file [ref](https://github.com/protocolbuffers/protobuf/blob/master/protobuf_deps.bzl)
http_archive( name = "rules_java", sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3", strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd", urls = [ "file:///tmp/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz" ], )
and then try again
I copy the tar.gz into docker /tmp dir, but it showed /tmp/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz (No such file or directory)
If you don't mind, you can do the following
1. download the file outside the docker, then copy it into docker, copy the download `981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz` file into docker `/tmp` dir 2. add below code in apollo `WORKSPACE` file [ref](https://github.com/protocolbuffers/protobuf/blob/master/protobuf_deps.bzl)
http_archive( name = "rules_java", sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3", strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd", urls = [ "file:///tmp/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz" ], )
and then try again
Now I can solve the rules_java and build_bazel_rules_swift by your way, but it didn't work for cython.
/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/BUILD.bazel:12:12: @com_github_grpc_grpc//src/python/grpcio/grpc/_cython:cygrpc.pyx_cython_translation depends on @cython//:cython_binary in repository @cython which failed to fetch. no such package '@cython//': java.io.IOException: Error downloading [https://github.com/cython/cython/archive/c2b80d87658a8525ce091cbe146cb7eaa29fed5c.tar.gz] to /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/external/cython/temp755279677140508045/c2b80d87658a8525ce091cbe146cb7eaa29fed5c.tar.gz: connect timed out
I write the similar code in workspace for cython, but it seems not work.
ohh, in this case, we can try to set up a git proxy, otherwise we will have to keep adding configuration.
add git proxy
You can follow below step to add git proxy in docker ref
git config --global http.proxy http://proxyuser:[email protected]:8080
- change proxyuser to your proxy user
- change proxypwd to your proxy password
- change proxy.server.com to the URL of your proxy server
- change 8080 to the proxy port configured on your proxy server
ohh, in this case, we can try to set up a git proxy, otherwise we will have to keep adding configuration.
add git proxy
You can follow below step to add git proxy in docker ref
git config --global http.proxy http://proxyuser:[email protected]:8080
- change proxyuser to your proxy user
- change proxypwd to your proxy password
- change proxy.server.com to the URL of your proxy server
- change 8080 to the proxy port configured on your proxy server
ohh, in this case, we can try to set up a git proxy, otherwise we will have to keep adding configuration.
add git proxy
You can follow below step to add git proxy in docker ref
git config --global http.proxy http://proxyuser:[email protected]:8080
- change proxyuser to your proxy user
- change proxypwd to your proxy password
- change proxy.server.com to the URL of your proxy server
- change 8080 to the proxy port configured on your proxy server
After the 'git proxy' setting, I can connect to baidu.com by ping baidu.com
or proxychains ping baidu.com
in docker. for this url: https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz
I must use proxychains to download by proxychains wget -i xxxx
Howerver, when build the apollo.sh, the same error is there.
@Xinchengzelin By adding the configuration in workspace, there's no problem with "rules_java" and "build_bazel_rules_swift", but it doesn't work for the downloading of "cython". I just don't understand. As for the "git proxy" setting, it also doesn't work for me.
Also try to add https_proxy
, you can ref to link
git config --global http.proxy http://proxyUsername:[email protected]:port
git config --global https.proxy https://proxyUsername:[email protected]:port
Also try to add
https_proxy
, you can ref to linkgit config --global http.proxy http://proxyuser:[email protected]:8080 git config --global https.proxy http://proxyuser:[email protected]:8080
I tried both and still faied. Sorry to bother you but I don't understand why I add the following code in apollo WORKSPACE, and download the tar.gz manually, unlike "rules_java", the "cython" still failed in docker build.
http_archive( name = "cython", sha256 = "d68138a2381afbdd0876c3cb2a22389043fa01c4badede1228ee073032b07a27", strip_prefix = "cython-c2b80d87658a8525ce091cbe146cb7eaa29fed5c", urls = [ "file:///apollo/tmp/cython-c2b80d87658a8525ce091cbe146cb7eaa29fed5c.tar.gz", ], )
Also try to add
https_proxy
, you can ref to linkgit config --global http.proxy http://proxyuser:[email protected]:8080 git config --global https.proxy http://proxyuser:[email protected]:8080
I tried both and still faied. Sorry to bother you but I don't understand why I add the following code in apollo WORKSPACE, and download the tar.gz manually, unlike "rules_java", the "cython" still failed in docker build.
http_archive( name = "cython", sha256 = "d68138a2381afbdd0876c3cb2a22389043fa01c4badede1228ee073032b07a27", strip_prefix = "cython-c2b80d87658a8525ce091cbe146cb7eaa29fed5c", urls = [ "file:///apollo/tmp/cython-c2b80d87658a8525ce091cbe146cb7eaa29fed5c.tar.gz", ], )
I failed again, could you ping https://github.com/
? I couldn't,
ping: unknown host
I don’t know how to ping in docker, it shows Bash: ping: command not found but I can ping outside the docker
发自我的iPhone
------------------ Original ------------------ From: Zeitlin @.> Date: Wed,Feb 16,2022 5:06 PM To: ApolloAuto/apollo @.> Cc: c0y0h @.>, Comment @.> Subject: Re: [ApolloAuto/apollo] Build did NOT complete successfully (Issue#14289)
Also try to add https_proxy, you can ref to link
git config --global http.proxy @.:8080 git config --global https.proxy @.:8080
I tried both and still faied. Sorry to bother you but I don't understand why I add the following code in apollo WORKSPACE, and download the tar.gz manually, unlike "rules_java", the "cython" still failed in docker build.
http_archive( name = "cython", sha256 = "d68138a2381afbdd0876c3cb2a22389043fa01c4badede1228ee073032b07a27", strip_prefix = "cython-c2b80d87658a8525ce091cbe146cb7eaa29fed5c", urls = [ "file://localhost/apollo/tmp/cython-c2b80d87658a8525ce091cbe146cb7eaa29fed5c.tar.gz", ], )
I failed again, could you ping https://github.com/? I couldn't, ping: unknown host
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
Bash: ping: command not found
Maybe you need to install a tool, apt install iputils-ping
I install “iputils-ping”, but still can’t use it in docket, like the picture showed.
发自我的iPhone
------------------ Original ------------------ From: Zeitlin @.> Date: Wed,Feb 16,2022 5:29 PM To: ApolloAuto/apollo @.> Cc: c0y0h @.>, Comment @.> Subject: Re: [ApolloAuto/apollo] Build did NOT complete successfully (Issue#14289)
Bash: ping: command not found
Maybe you need to install a tool, apt install iputils-ping
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
You can download the package first, change the name, and calculate the sha256. I suggest you take a look at how to setup git proxy
http_archive(
name = "rules_java", // name of the package
sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3", // the package's sha256
strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd",
urls = [
"file:///tmp/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz" // the package
],
)
git config --global http.proxy http://proxyuser:[email protected]:8080
Is "proxyuser:proxypwd@" necessary in this case? And should "proxy.server.com:8080" be set as my proxy ip and port? I set it as my ip and port and it still didn't work.
http_archive(
name = "rules_java", // name of the package
sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3", // the package's sha256
strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd",
urls = [
"file:///tmp/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz" // the package
],
)
In this way, I found if the urls is wrong, the error will be "no such file or directory", and if the sha256 is wrong, the right one will be given automatically. I write two "http_archive" for "rules_java" and "build_bazel_rules_swift" and they work well. However, for the "cython", the code in WORKPLACE just had no effect. For example, even I write a wrong urls for it, the error will not be "no such file or directory".
there're two questions:
- use a proxy
- add config one by one
cython is dependency by com_github_grpc_grpc
, I guess that's the reason make different. Coud you try another bazel config local_repository
https://docs.bazel.build/versions/main/be/workspace.html#local_repository
If you don't mind, you can do the following
- download the file outside the docker, then copy it into docker, copy the download
981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz
file into docker/tmp
dir- add below code in apollo
WORKSPACE
file refhttp_archive( name = "rules_java", sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3", strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd", urls = [ "file:///tmp/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz" ], )
and then try again
How to know the sha256 and strip_prefix?
Actually you can search the file’s name on google, and look for the source code on GitHub.
发自我的iPhone
------------------ Original ------------------ From: Zeitlin @.> Date: Thu,Feb 24,2022 8:11 PM To: ApolloAuto/apollo @.> Cc: c0y0h @.>, Comment @.> Subject: Re: [ApolloAuto/apollo] Build did NOT complete successfully (Issue#14289)
If you don't mind, you can do the following
download the file outside the docker, then copy it into docker, copy the download 981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz file into docker /tmp dir
add below code in apollo WORKSPACE file ref
http_archive( name = "rules_java", sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3", strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd", urls = [ "file://localhost/tmp/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz" ], )
and then try again
How to know the sha256 and strip_prefix?
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
Actually you can search the file’s name on google, and look for the source code on GitHub. 发自我的iPhone … ------------------ Original ------------------ From: Zeitlin @.> Date: Thu,Feb 24,2022 8:11 PM To: ApolloAuto/apollo @.> Cc: c0y0h @.>, Comment @.> Subject: Re: [ApolloAuto/apollo] Build did NOT complete successfully (Issue#14289) If you don't mind, you can do the following download the file outside the docker, then copy it into docker, copy the download 981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz file into docker /tmp dir add below code in apollo WORKSPACE file ref http_archive( name = "rules_java", sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3", strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd", urls = [ "file://localhost/tmp/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz" ], ) and then try again How to know the sha256 and strip_prefix? — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
Do you solve the problem? if so, could you sent the "WORKSPACE" file that you changed?
Besides, I find two "WORKSPACE" file in apollo, one in the root of apollo, another one inside the apoll/.cache/bazel/.../external/com_google_protobuf/examples, which one should be changed?
According to my own description, I solved this problem. thank you!
Your description? actually, I'm still in trouble
there're two questions:
- use a proxy
- add config one by one
cython is dependency by
com_github_grpc_grpc
, I guess that's the reason make different. Coud you try another bazel configlocal_repository
https://docs.bazel.build/versions/main/be/workspace.html#local_repository
Hello I also encounter the same problem, could you kindly illustrate more about the local library, because I have gone through the examples on Basel website but still confused about how to apply in “cython” really really thanks
Your description? actually, I'm still in trouble
I have done these problem. I have downloaded the package to computer and change all the urls to local . The zlib and cython need not only change the workspace, but also some .deps document in other space. So I use 'grep' to find all the document which have the sentence like (urls = ["http://github/xxxxxxx/xxxxxxx/v1.1.12.tar.gz") And change all of them into local address. Problems gone!
Your description? actually, I'm still in trouble
I have done these problem. I have downloaded the package to computer and change all the urls to local . The zlib and cython need not only change the workspace, but also some .deps document in other space. So I use 'grep' to find all the document which have the sentence like (urls = ["http://github/xxxxxxx/xxxxxxx/v1.1.12.tar.gz") And change all of them into local address. Problems gone!
That seems to be a lot of trifling work, several hundred of packages need to be changed?
Your description? actually, I'm still in trouble
I have done these problem. I have downloaded the package to computer and change all the urls to local . The zlib and cython need not only change the workspace, but also some .deps document in other space. So I use 'grep' to find all the document which have the sentence like (urls = ["http://github/xxxxxxx/xxxxxxx/v1.1.12.tar.gz") And change all of them into local address. Problems gone!
That seems to be a lot of trifling work, several hundred of packages need to be changed?
No, you can have a try, about 6-7 files. I'm a newer for ubuntu, so I don't know whick file is the most important so I change them all...
Hello, could I know how you find all urls? Because I didn’t find cython related using grep command, and don’t know make change to which file.
Here are my currently changed WORKSPACE
The cython thing was added by myself according to the comments above, can’t find where are the deps documents should change as you said above.
Really need help thx a lot