[yocto] locale failure during do_rootfs
    Rickard Gustafsson 
    rickard at allyourbase.se
       
    Mon Jul 10 07:20:06 PDT 2017
    
    
  
I just want to share a solution to a problem.
tl;dr use a supported system to build.
I got the same error as mentioned here: 
https://lists.yoctoproject.org/pipermail/yocto/2017-June/036622.html
[log_check] Failed to set locale, defaulting to C
This is an error that occurs for RPM based systems built with yocto.
It raises from dnf-native when i18n.py is run due to an unfortunate 
error message when an exception is raised when there is a locale 
exception from the line:
dnf.pycomp.setlocale(locale.LC_ALL, '')
which prints:
print('Failed to set locale, defaulting to C', file=sys.stderr)
On some systems this will raise an exception even if locales are 
configured properly, which they should otherwise bitbake would fail 
earlier.
So I found out that problem has to do with that python cannot find the 
build systems locales. I use slackware 14.2 to build and there the 
locales are located in /usr/lib64/locale which seems to not be used by 
python3-native during do_rootfs. On systems supported by yocto they are 
located in /usr/lib/locale. 
Adding locales to /usr/lib/locale and do_rootfs completes without any 
problems.
    
    
More information about the yocto
mailing list