apollo icon indicating copy to clipboard operation
apollo copied to clipboard

compile error: xargs: bazel: No such file or directory

Open liudf0716 opened this issue 9 years ago • 9 comments

platform: Ubuntu 16.04 LTS

command: bash apollo.sh build

output:

[WARNING] ESD CAN library supplied by ESD Electronics does not exit.
[WARNING] If you need ESD CAN, please refer to third_party/can_card_library/esd_can/README.md
Start building, please wait ...
apollo.sh: line 83: bazel: command not found
Building on x86_64, with targets:

xargs: bazel: No such file or directory
============================
[ERROR] Build failed!
[INFO] Took .013 seconds
============================

liudf0716 avatar Jul 06 '17 10:07 liudf0716

Do you have bazel installed on your system? Have a look at https://docs.bazel.build/versions/master/install-ubuntu.html if not

samwincott avatar Jul 06 '17 12:07 samwincott

Did you run the command inside the Docker dev environment? It is recommended to follow the README.md guide to build Apollo.

bash docker/scripts/install_docker.sh
# logout and login to make sure to run docker command without sudo
docker ps  # to verify docker works without sudo
bash docker/scripts/dev_start.sh
bash docker/scripts/dev_into.sh
bash apollo.sh build

startcode avatar Jul 06 '17 13:07 startcode

Because of a lot of dependencies for the developing environment, strongly recommend using docker as the developing env. The apollo docker has already installed the dependencies. Just read the README file or quick start.

qiankunzhu avatar Jul 06 '17 15:07 qiankunzhu

@startcode @qiankunzhu since this is an opensource project, I thought compiling the project successfully is very important. it's also very important step for a developer.

liudf0716 avatar Jul 07 '17 01:07 liudf0716

@samwincott thanks, I will try it.

liudf0716 avatar Jul 07 '17 01:07 liudf0716

@liudf0716 dev docker image only pulls the dependencies and it still compiles the source code (It only makes easier to compile source code). Only release docker image doesn't need compile source code.

ycool avatar Jul 07 '17 01:07 ycool

It is in top level README.md :)

*We strongly recommend building Apollo in our pre-specified Docker environment. *

Thanks.

On Thu, Jul 6, 2017 at 6:57 PM, Dengfeng Liu [email protected] wrote:

@ycool https://github.com/ycool thanks! cause I am not familiar with docker, so I firstly ignore it. if prefered compiling in docker, it should mark in README

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ApolloAuto/apollo/issues/58#issuecomment-313566673, or mute the thread https://github.com/notifications/unsubscribe-auth/AIckyok0ZirIwd04zAtyaBkwBFU8gKxjks5sLZCmgaJpZM4OPdB9 .

ycool avatar Jul 07 '17 02:07 ycool

@ycool sorry, I have noticed that, cause I am not familiar with docker, so ignore it. Anyway, after installed bazel, there still exist error:

WARNING: Running Bazel server needs to be killed, because the startup options are different.
INFO: Found 190 targets...
ERROR: /home/liudf/apollo/modules/common/adapters/BUILD:16:1: C++ compilation of rule '//modules/common/adapters:adapter_manager' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g '-std=c++0x' '-DUSE_ESD_CAN=false' -MD -MF ... (remaining 96 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
In file included from bazel-out/local-dbg/bin/external/ros/_virtual_includes/ros_common/ros/include/ros/ros.h:38:0,
                 from ./modules/common/adapters/adapter_manager.h:34,
                 from modules/common/adapters/adapter_manager.cc:17:
external/ros/include/ros/time.h:58:50: fatal error: boost/math/special_functions/round.hpp: No such file or directory
compilation terminated.
INFO: Elapsed time: 60.477s, Critical Path: 17.33s
============================
[ERROR] Build failed!
[INFO] Took 75.460 seconds
============================

it seems need boost library?

liudf0716 avatar Jul 07 '17 02:07 liudf0716

@liudf0716 Apollo use boost c++ to provide shared-memory-based topic pub/sub via IPC. Perhaps you should look at the apollo/docker/dev.dockerfile for any missing dependencies and the env settings in dev_start.sh and apollo.sh?

nypdmax avatar Jul 07 '17 08:07 nypdmax