AnsweredAssumed Answered

Bug when building IoT Core on WSL 2

Question asked by Tony Goodhew on Jun 17, 2020
Latest reply on Jun 17, 2020 by Tony Goodhew

Hi there,

 

There seems to be a bug (or by design issue) with the Common.mk file when trying to build under WSL 2. The build process needs to test to see if it is running under WSL and then turn on folder case sensitivity as appropriate. However, there appears to be a change in WSL 2 that is failing evaluation.

 

The test in Common.mk is:

 

verify_case_sensitivity_$(UBOOT_OUT) verify_case_sensitivity_$(OPTEE_OUT):
ifeq (,$(findstring microsoft,$(shell cat /proc/sys/kernel/osrelease)))
    @echo Not running WSL, no case sensitivity check needed.
else
ifneq (,$(CASE_WSL_MNT))
    @echo Running WSL, but not in a mount.
else
    @echo Checking case sensitivity of $(CASE_DIR)

 

but with WSL 2 the “cat /proc/sys/kernel/osrelease” returns:

4.19.104-microsoft-standard

 

So it fails as findstring is case sensitive. I can fix this for my system but it should be addressed for the future as who knows if MS will go back to uppercase M in the osrelease value.

 

Thanks,


TonyG

Outcomes