百度apollo - Apollo编译软件Bazel: 1. 安装

本文档介绍了如何在Ubuntu 14.04上安装和配置Bazel,百度Apollo项目的编译工具。首先推荐通过apt安装JDK 8,然后添加bazel包源并进行安装或升级。若选择二进制程序安装,需要下载对应版本的bazel,并安装必要的第三方库。最后,设置环境变量确保Bazel的正确运行。

百度Apollo采用bazel作为代码编译构建工具,因此过来看看bazel是什么

bazel支持的平台有Ubuntu linux、Mac OS X、Windows等,本教程基于Ubuntu14.04下的bazel

参考教程 - https://docs.bazel.build/versions/master/install.html

1. 用apt安装(推荐): 

Succeed: Total num: 1242, size: 19,210,497. OK num: 1242(download 1242 objects). general-app-build-cd4x7-app-build-3922681543:  general-app-build-cd4x7-app-build-3922681543: average speed 2408000(byte/s) general-app-build-cd4x7-app-build-3922681543:  general-app-build-cd4x7-app-build-3922681543: 7.978701(s) elapsed general-app-build-cd4x7-app-build-3922681543: ossutil command executed successfully. general-app-build-cd4x7-app-build-3922681543: PLATFORM_TYPE:orin general-app-build-cd4x7-app-build-3922681543: DOCKER_IMAGE_VER:dev-x86-5.2.4 general-app-build-cd4x7-app-build-3922681543: Extracting Bazel installation... general-app-build-cd4x7-app-build-3922681543: Starting local Bazel server and connecting to it... general-app-build-cd4x7-app-build-3922681543: (03:18:29) WARNING: The following configs were expanded more than once: [orin3_config, orin_config]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior. general-app-build-cd4x7-app-build-3922681543: (03:18:29) INFO: Invocation ID: 1e564be4-df8a-403c-ba96-26877659eb7f general-app-build-cd4x7-app-build-3922681543: (03:18:30) INFO: Current date is 2025-07-24 general-app-build-cd4x7-app-build-3922681543: (03:18:30) Loading:  general-app-build-cd4x7-app-build-3922681543: (03:18:30) Loading: 0 packages loaded general-app-build-cd4x7-app-build-3922681543: (03:18:30) Analyzing: target //:adas_active_noa_package (1 packages loaded, 0 targets configured) general-app-build-cd4x7-app-build-3922681543: (03:18:31) DEBUG: /apollo/modules/active_safety/BUILD:76:6: "cpu_arch: " + select({"x86_mode": "x86_64", "arm_mode": "aarch64", "arm_j6m_mode": "aarch64_j6m"}) general-app-build-cd4x7-app-build-3922681543: (03:18:31) ERROR: /apollo/modules/mpc/mpc_drv_ctap_fusion_lane/BUILD:149:8: no such package 'modules/mpc/mpc_drv_ctap_fusion_lane/src': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package. general-app-build-cd4x7-app-build-3922681543: - /apollo/modules/mpc/mpc_drv_ctap_fusion_lane/src and referenced by '//modules/mpc/mpc_drv_ctap_fusion_lane:libs' general-app-build-cd4x7-app-build-3922681543: (03:18:31) ERROR: Analysis of target '//:adas_active_noa_package' failed; build aborted: Analysis failed general-app-build-cd4x7-app-build-3922681543: (03:18:31) INFO: Elapsed time: 3.452s general-app-build-cd4x7-app-build-3922681543: (03:18:31) INFO: 0 processes. general-app-build-cd4x7-app-build-3922681543: (03:18:31) FAILED: Build did NOT complete successfully (131 packages loaded, 503 targets configured) general-app-build-cd4x7-app-build-3922681543: (03:18:31) FAILED: Build did NOT complete successfully (131 packages loaded, 503 targets configured) general-app-build-cd4x7-app-build-3922681543: time="2025-07-24T03:18:32.484Z" level=info msg="sub-process exited" argo=true error="<nil>" general-app-build-cd4x7-app-build-3922681543: time="2025-07-24T03:18:32.484Z" level=info msg="no need to save parameter - on overlapping volume: /apollo/build_manifest_base64" argo=true general-app-build-cd4x7-app-build-3922681543: time="2025-07-24T03:18:32.484Z" level=info msg="no need to save parameter - on overlapping volume: /apollo/compile_parameter" argo=true general-app-build-cd4x7-app-build-3922681543: time="2025-07-24T03:18:32.484Z" level=info msg="no need to save parameter - on overlapping volume: /apollo/app_oss_path" argo=true general-app-build-cd4x7-app-build-3922681543: Error: exit status 1编译错误
07-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值