Errors building with Windows Subsystem for Linux (aka Bash on Ubuntu on Windows)
Due to what our IT department can support, I am issued a Windows laptop for development. In the past I have used VMWare to make a Linux virtual machine for my Yocto Project based image builds and application development. We are starting to get Windows 10 laptops so I am evaluating doing my builds using the Windows Subsystem for Linux (WSL) by building a poky/morty image. Overall it seems to be working. I've had an issue that I've worked through and other issues that I'm not quite sure what is going on.
The first major issue was that PATH includes some Windows directory paths so that you can execute certain Windows applications, but that meant PATH included filepaths like ".../Program Files (x86) ..." and python didn't like the spaces and parentheses in PATH. The suggested fix for this issue is to set PATH in your ~/.bashrc file to either exclude the Windows directories or to escape the spaces and parentheses. This worked for me.
The second issue I'm seeing is I get the following warning:
WARNING: The Linux kernel on your build host was not configured to provide process I/O statistics. (CONFIG_TASK_IO_ACCOUNTING is not set)
I searched the Yocto Project documentation and I couldn't figure out what specifically these I/O statistics are used for. What affect does this have on my build? Does anybody know if there is a way to enable I/O statistics for the WSL?
I'm also seeing a very slow refresh of the build status on the command line. When multiple tasks are running, I can see the lines clear away from the bottom of the screen to the top and then fill in back down. The resulting flash from the refresh makes it nearly impossible to read what some of the running tasks are. What is the actual mechanism for updating the task status on the command line? I'm wondering if it's counting on some feature that Microsoft hasn't fully supported yet.
I am also getting a build error with glibc-locale. In the do_package stage I'm getting a failure in the function sstate_task_postfunc. The error is on the following command:
cp -afl --preserve=xattr <base_path>/poky/poky-build/tmp/work/armv5e-poky-linux-gnueabi/glibc-locale/2.24-r0/packages-split/* <base_path>/poky/poky-build/tmp/work/armv5e-poky-linux-gnueabi/glibc-locale/2.24-r0/sstate-build-package//packages-split/*
I am seeing a lot of errors from this command that look like the following:
cp: cannot create hard link: '<base_path>/poky/poky-build/tmp/work/armv5e-poky-linux-gnueabi/glibc-locale/2.24-r0/sstate-build-package//packages-split/glibc-binary-localedata-ks-in/usr/lib/locale/ks_IN/LC_MEASUREMENT' to '<base_path>/poky/poky-build/tmp/work/armv5e-poky-linux-gnueabi/glibc-locale/2.24-r0/packages-split/glibc-binary-localedata-ks-in/usr/lib/locale/ks_IN/LC_MEASUREMENT': Invalid argument
I looked at my working directory, and I see that in the source files are there. If I run the cp command from the command line as shown above, I get the same errors. I'm trying to figure out if this is an issue with hard links with WSL or if this is general build issue. Any suggestions on what else to try?