编译环境

  • ubuntu22.04.3桌面系统
  • x86 64位PC
  • 运行SDK指定的编译脚本build.sh

编译过程的报错和排障

编译报错一般是由于系统缺少相应组件引起的,修复后可以直接再次执行build.sh

ERROR: No ‘dtc’

$ apt install device-tree-compiler

/bin/sh: 1: flex: not found

$ apt install flex

scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory

因为系统缺少openssl库

$ apt-get install openssl libssl-dev

报错找不到python

ubuntu20及以上内置了python3并且bash执行语法为python3,但编译文件默认使用python执行。 安装这个组件可以修复这类问题

$ apt-get install python-is-python3

makeinfo: not found

$ apt-get install texinfo

configure: error: *** gperf not found

$ apt-get install gperf

cmake: command not found

$ apt-get install cmake
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐