Fixed
Created: Oct 7, 2019
Updated: Sep 27, 2020
Resolved Date: Aug 20, 2020
Found In Version: 10.18.44.10
Fix Version: 10.18.44.19
Severity: Severe
Applicable for: Wind River Linux LTS 18
Component/s: Build & Config
$ bitbake -c menuconfig linux-yocto
ERROR: linux-yocto-4.18.41+gitAUTOINC+85ae504886_ea86b1842f-r0 do_menuconfig: Unable to spawn terminal auto: Execution of '/wrl-lts18-nxp-imx6-2019-10-07/layers/oe-core/scripts/oe-gnome-terminal-phonehome /tmp/tmpdu_mugn2 /wrl-lts18-nxp-imx6-2019-10-07/build/tmp-glibc/work/nxp_imx6-wrs-linux-gnueabi/linux-yocto/4.18.41+gitAUTOINC+85ae504886_ea86b1842f-r0/temp/run.do_terminal.12988' failed with exit code -6:
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f5858de6740 (most recent call first):
ERROR: linux-yocto-4.18.41+gitAUTOINC+85ae504886_ea86b1842f-r0 do_menuconfig: Function failed: do_menuconfig
ERROR: Logfile of failure stored in: /wrl-lts18-nxp-imx6-2019-10-07/build/tmp-glibc/work/nxp_imx6-wrs-linux-gnueabi/linux-yocto/4.18.41+gitAUTOINC+85ae504886_ea86b1842f-r0/temp/log.do_menuconfig.12988
ERROR: Task (/wrl-lts18-nxp-imx6-2019-10-07/layers/oe-core/meta/recipes-kernel/linux/linux-yocto_4.18.bb:do_menuconfig) failed with exit code '1'
NOTE: Tasks Summary: Attempted 366 tasks of which 365 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/wrl-lts18-nxp-imx6-2019-10-07/layers/oe-core/meta/recipes-kernel/linux/linux-yocto_4.18.bb:do_menuconfig
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
From googling, it seems this is due to an incomplete python install (probably because yocto builds a python 3.5, but the OS has python 3.6 instaled).
Problem does not happen if you are inside a tmux session.
git clone ~/WRL/WRL-LTS18/wrlinux-x
./wrlinux-x/setup.sh --machine nxp-imx6 --dl-layers
. environment-setup-x86_64-wrlinuxsdk-linux
. oe-init-build-env
time bitbake linux-yocto
bitbake -c menuconfig linux-yocto