如何解决Yocto 交叉编译,bitbake glibc 错误:bison
我正在尝试在我的 yocto 项目中对 glibc 2.27 (https://layers.openembedded.org/layerindex/recipe/80771/) 进行 bitbake,但出现如下错误:
| checking for gnumake... make
| checking version of make... 4.2.1,ok
| checking for gnumsgfmt... no
| checking for gmsgfmt... no
| checking for msgfmt... no
| checking for makeinfo... makeinfo
| checking version of makeinfo... 5.2,ok
| checking for sed... sed
| checking version of sed... 4.7,ok
| checking for gawk... gawk
| checking version of gawk... 5.0.1,ok
| checking for bison... no
| checking if aarch64-poky-linux-gcc -march=armv8-a+crc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/uib51588/yocto-tegra/build/tmp/work/aarch64-poky-linux/glibc-initial/2.27-r0/recipe-sysroot is sufficient to build libc... yes
| checking for aarch64-poky-linux-nm... aarch64-poky-linux-nm
| checking for python3... python3
| configure: error:
| *** These critical programs are missing or too old: bison
| *** Check the INSTALL file for required versions.
验证清单(在我的主机 Ubuntu 上):
sudo apt-get install gnumsgfmt
E: Unable to locate package gnumsgfmt
sudo apt-get install gmsgfmt
E: Unable to locate package gmsgfmt
sudo apt-get install msgfmt
E: Unable to locate package msgfmt
sed --version
sed (GNU sed) 4.7
gawk --version
GNU Awk 5.0.1,API: 2.0 (GNU MPFR 4.0.2,GNU MP 6.2.0)
bison --version
bison (GNU Bison) 3.5.1
与 sed 或 gawk 不同,检查的版本与主机 Ubuntu 上的版本相同。
但是 bison
是一个例外,
我不确定是否在交叉编译中,如何检查 yocto 中是否存在野牛?野牛本地人?
如果我下载 glibc 2.27 源代码并在我的 Ubuntu 中运行 ./configure,我得到这个:
hecking for gmake... no
checking for make... make
checking version of make... 4.2.1,ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for msgfmt... no
checking for makeinfo... makeinfo
checking version of makeinfo... 6.7,ok
checking for sed... sed
checking version of sed... 4.7,ok
checking for gawk... gawk
checking version of gawk... 5.0.1,ok
checking for bison... bison
checking version of bison... 3.5.1,ok
checking if gcc is sufficient to build libc... yes
checking for nm... nm
checking for python3... python3
checking version of python3... 3.8.5,ok
所以如果在主机上编译(不是交叉编译),glibc
可以成功找到我的 bison
。
解决方法
在 local.conf
中,添加:
HOSTTOOLS+= "bison"
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。