[buildex.py] ERROR: Tool path /pkg/qct/software/llvm/release/arm/14.0.0/bin/ does not exist! Traceback (most recent call last): File "boot_images/boot_tools/buildex.py", line 1833, in <module> main() File "boot_images/boot_tools/buildex.py", line 539, in main create_image(options,variant_flavor,build_config,tools_config) File "boot_images/boot_tools/buildex.py", line 616, in create_image dll_paths=process_components(options,variant_flavor,process_action,build_config,tools_config,merge_dict) File "boot_images/boot_tools/buildex.py", line 708, in process_components bin_path=process_component(options,variant_flavor,component,process_config,build_config,tools_config,merge_dict) File "boot_images/boot_tools/buildex.py", line 773, in process_component set_compiler_path(tool_config,component_config['Process'][i]['ToolChain']) File "boot_images/boot_tools/buildex.py", line 1307, in set_compiler_path "Expected location " + os.environ[COMPILER_BIN_NAME]) File "/usr/lib/python3.8/os.py", line 675, in getitem raise KeyError(key) from None KeyError: 'CLANG140_BIN' build failed! chen-docker@chen-docker-virtual-machine:~/bin$ clang -v clang version 14.0.0 Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/local/llvm/bin Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 Candidate multilib: .;@m64 Selected multilib: .;@m64怎么出错了
时间: 2024-02-04 17:02:08 浏览: 55
根据错误信息来看,问题出在脚本中对于环境变量 `CLANG140_BIN` 的引用上。错误信息显示在脚本的某个地方尝试访问 `os.environ['CLANG140_BIN']`,但是这个环境变量并不存在,导致了 `KeyError` 异常。
要解决这个问题,你需要确保正确设置了 `CLANG140_BIN` 环境变量。请按照前面的建议检查环境变量的设置步骤,并确保它被正确设置为 Clang 的安装目录。
在终端中执行以下命令,将 `<clang安装目录>` 替换为实际的 Clang 安装目录:
```
export CLANG140_BIN="/path/to/clang/bin"
```
请确保使用实际的 Clang 安装目录路径替换 `/path/to/clang/bin`。这将设置 `CLANG140_BIN` 环境变量为正确的 Clang 安装目录。
然后,重新运行你的脚本,它应该能够找到正确的 Clang 安装路径并成功运行。
相关问题
[buildex.py] ERROR: Tool path /pkg/qct/software/llvm/release/arm/14.0.0/bin/ does not exist! [buildex.py] ERROR: build_single_flavor: Missing LLVM tool chain.Expected location /usr/local/llvm/bin build failed!
这是一个构建错误的消息,错误信息显示在 `/pkg/qct/software/llvm/release/arm/14.0.0/bin/` 路径下找不到工具。同时,还指出了预期的位置是 `/usr/local/llvm/bin`。这可能是由于缺少正确的 LLVM 工具链导致的构建失败。您可以尝试检查是否安装了正确版本的 LLVM,并确保路径设置正确。
/pkg/qct/software/llvm/release/arm/14.0.0/bin/没有这个路径,这个路径是哪里出现的?
根据你提供的信息,路径 `/pkg/qct/software/llvm/release/arm/14.0.0/bin/` 是在错误信息中出现的。这个路径可能是在脚本 `buildex.py` 中硬编码的或者是由其他配置文件或脚本生成的。
通过路径中的一些关键词可以猜测,这个路径可能与 Qualcomm Technologies(高通科技)相关。`/pkg/qct/software` 看起来像是一个 Qualcomm Technologies 的软件安装目录。
路径中的 `llvm/release/arm/14.0.0/bin/` 部分则表示这个路径是 LLVM 编译器工具链的安装位置,版本号为 14.0.0,并且是针对 ARM 架构的。
请检查你的系统中是否存在这个路径或类似的路径。如果不存在,可能需要找到正确的 LLVM 工具链的安装位置,并将脚本中的路径设置为正确的位置。
如果你不确定 LLVM 工具链的实际安装位置,你可以尝试使用命令 `which clang` 或 `which llvm-config` 来查找 LLVM 的可执行文件路径。这些命令将显示 LLVM 工具链的实际安装位置。
另外,你还可以查看脚本 `buildex.py` 中是否有其他地方设置了 LLVM 工具链的路径,并确保它们与实际安装位置相匹配。
希望这些信息能帮助你找到问题所在。如果问题仍然存在,可能需要进一步检查脚本中的代码以及相关的配置文件。