ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.29k stars 9.73k forks source link

AGX Xavier: /apollo/cyber/croutine/BUILD:46:12: Configurable attribute "srcs" doesn't match this configuration: Please Build with an ARM or Linux x86_64 platform. #11552

Closed baofuwu closed 4 years ago

baofuwu commented 4 years ago

I installed apollo docker in Jetson AGX Xavier, which does not support the command "nvidia-smi". When I run the cmd "bazel build //cyber/..." , I got the following error:

mist@in_cyber_docker:/apollo$ bazel build //cyber/...
INFO: Reading 'startup' options from /apollo/tools/bazel.rc: --batch_cpu_scheduling --host_jvm_args=-XX:-UseParallelGC --output_user_root=/apollo/.cache/bazel
INFO: Reading 'startup' options from /apollo/tools/bazel.rc: --batch_cpu_scheduling --host_jvm_args=-XX:-UseParallelGC --output_user_root=/apollo/.cache/bazel
ERROR: (06-25 08:24:53.856) /apollo/cyber/croutine/BUILD:46:12: Configurable attribute "srcs" doesn't match this configuration: Please Build with an ARM or Linux x86_64 platform.
ERROR: (06-25 08:24:53.918) Analysis of target '//cyber/croutine:swap' failed; build aborted.
INFO: (06-25 08:24:53.919) Elapsed time: 1.245s

Also,when I run the cmd "bazel build //modules/data/tools/...", I got the same error.

daohu527 commented 4 years ago

Platform

Which platform do you used to build cyber? could you run the below cmd

uname -m

apollo only support cpu k8 and arm in bazel config.

Bazel

I used "bazel build //cyber/..." to build cyber without error. In bazel guide you should add --cpu option in cmd. Like

bazel build --cpu=k8 //cyber/...

but "bazel build //cyber/..." will also work, I think bazel read the "cpu" config_setting by itself.

Here is a same issue in bazel link
Here is the guide about config_setting of bazel link

sjiang2018 commented 4 years ago

Hi @baofuwu , hope our answer resolved your question. We will close the issue for now. If you have any additional question, please feel free to open a new issue. Our engineer team are more than happy to help that.

Thank you for supporting Apollo!