错误信息
执行MACHINE=“apocqb-debug” bitbake y-core-image,出现以下错误:
ERROR: gobject-introspection-native-1.52.1-r0 do_configure: no configure script found at …/gobject-introspection-1.52.1
/configure
ERROR: gobject-introspection-native-1.52.1-r0 do_configure: Function failed: do_configure (log file is located at /home/maxu/workspace/build-rocko/tmp/work/x86_64-linux/gobject-introspection-native/1.52.1-r0/temp/log.do_configure.8927)
ERROR: Logfile of failure stored in: /home/maxu/workspace/build-rocko/tmp/work/x86_64-linux/gobject-introspection-native/1.52.1-r0/temp/log.do_configure.8927
ERROR: Task (virtual:native:/home/maxu/workspace/sources/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb:do_configure) failed with exit code ‘1’
可以看到加粗部分出现意外的换行,由此导致do_configure找不到正确的执行脚本。查看详细日志:
ERROR: no configure script found at …/gobject-introspection-1.52.1
^[[?1034h/configure
WARNING: exit code 1 from a shell command.
ERROR: Function failed: do_configure (log file is located at /home/maxu/workspace/build-rocko/tmp/work/x86_64-linux/gobject-introspection-native/1.52.1-r0/temp/log.do_configure.8927)
日志中可以看到乱码^[[?1034h 导致脚本路径错误。
系统环境
maxu@maxu-ubuntu:~/workspace/sources$ python3 --version
Python 3.6.8
maxu@maxu-ubuntu:~/workspace/sources$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
DISTRO = "poky"
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
DISTRO_VERSION = "2.4.3"
DISTRO_CODENAME = "rocko"
解决方案
以下仅列举作者验证的三种解决方案,其他方案请查看参考文章。
- 增加用户环境变量;
export TERM=linux
- 在出错的地方,临时修改环境变量TERM=linux,poky/meta/classes/autotools.bbclass:
oe_runconf () {
# Use relative path to avoid buildpaths in files
cfgscript_name="`basename ${CONFIGURE_SCRIPT}`"
cfgscript=`TERM=linux; python3 -c "import os; print(os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.'))"`/$cfgscript_name
if [ -x "$cfgscript" ] ; then
bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
if ! ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then
bbnote "The following config.log files may provide further information."
bbnote `find ${B} -ignore_readdir_race -type f -name config.log`
bbfatal_log "configure failed"
fi
else
bbfatal "no configure script found at $cfgscript"
fi
}
- 更改terminfo格式
maxu@maxu-ubuntu:~$ echo $TERM
xterm-256color
maxu@maxu-ubuntu:~$ infocmp xterm-256color | sed 's/smm=[^s]\+//' > xterm-256color
maxu@maxu-ubuntu:~$ tic xterm-256color
maxu@maxu-ubuntu:~$ infocmp xterm-256color |grep smm
maxu@maxu-ubuntu:~$
注意: 修改terminfo格式前请确认当前使用的TERM并备份。
参考文章
https://bugs.python.org/issue19884
https://reinout.vanrees.org/weblog/2009/08/14/readline-invisible-character-hack.html
https://patchwork.openembedded.org/patch/54049/
http://lists.openembedded.org/pipermail/openembedded-core/2013-July/199886.html
https://reinout.vanrees.org/weblog/2009/08/14/readline-invisible-character-hack.html
https://incenp.org/notes/2012/python-term-smm-fix.html