ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.28k stars 9.72k forks source link

build error: no such target '//modules/planning/planning_base:planning_block' #15379

Open yangzhengjin opened 7 months ago

yangzhengjin commented 7 months ago

Describe the bug build apollo, when GPU is disabled, report error:no such target '//modules/planning/planning_base:planning_block': target 'planning_block' not declared in package 'modules/planning/planning_base' defined by /apollo/modules/planning/planning_base/BUILD

To Reproduce ./apollo.sh build

log detail: [INFO] Apollo Environment Settings: [INFO] APOLLO_ROOT_DIR: /apollo [INFO] APOLLO_CACHE_DIR: /apollo/.cache [INFO] APOLLO_IN_DOCKER: true [INFO] APOLLO_VERSION: master-2024-04-16-22cb4d8f98 [INFO] DOCKER_IMG: dev-x86_64-18.04-20240326_1453 [INFO] APOLLO_ENV: STAGE=dev USE_ESD_CAN=false [INFO] USE_GPU_HOST: 0 [INFO] USE_GPU_TARGET: 0 [INFO] GPU_PLATFORM: UNKNOWN [INFO] Configure .apollo.bazelrc in non-interactive mode [INFO] You have bazel 5.2.0 installed. [INFO] Found possible Python library paths: /usr/lib/python3/dist-packages /usr/local/lib/python3.6/dist-packages [INFO] Found CUDA 11.1 in: /usr/local/cuda-11.1/targets/x86_64-linux/lib /usr/local/cuda-11.1/targets/x86_64-linux/include [INFO] Found cuDNN 8 in: /usr/lib/x86_64-linux-gnu /usr/include [ OK ] Successfully configured .apollo.bazelrc in non-interactive mode. [ OK ] Running CPU 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 third_party/can_card_library/esd_can/README.md [INFO] Build Overview: [INFO] USE_GPU: 0 [ 0 for CPU, 1 for GPU ] [INFO] CPU arch: x86_64 [INFO] Bazel Options: --config=cpu --define ENABLE_PROFILER=true [INFO] Build Targets: //modules/... union //cyber/... [INFO] Disabled: except //modules/perception/... except //modules/planning/planning_base:planning_block

yangzhengjin commented 7 months ago

修改方案: scripts/apollo_base.sh

--- a/scripts/apollo_base.sh +++ b/scripts/apollo_base.sh @@ -577,7 +577,7 @@ function _determine_localization_disabled() { function _determine_planning_disabled() { if [ "${USE_GPU}" -eq 0 ]; then DISABLED_TARGETS="${DISABLED_TARGETS} \