问题描述:当尝试使用Bitbake构建简单的'helloworld”示例时,会发生构建失败的问题。
示例代码:
SUMMARY = "Hello world example"
DESCRIPTION = "Prints 'hello world'"
LICENSE = "MIT"
SRC_URI = ""
S = "${WORKDIR}"
do_compile() {
echo "hello world"
}
addtask compile after do_configure
$ mkdir helloworld
$ cd helloworld
$ touch helloworld.bb
$ bitbake helloworld
出现以下错误:
ERROR: Unable to start bitbake server (None): [Errno 98] Address already in use
ERROR: Function failed: server_connect (see /.../bitbake-cookerdaemon.log for further information)
解决方案: 该问题的解决方法为,在终端中运行以下命令:
$ bitbake -c cleanall
该命令将清空该项目的所有缓存,以便重新开始构建过程。重新执行构建命令即可得到正确的结果:
$ bitbake helloworld
此时,终端将输出'hello world”,表明构建成功。