Error compiling master on WSL2 Ubuntu 20.04

Bas Mevissen abuse at basmevissen.nl
Mon Jun 7 16:11:47 PDT 2021



On 08/06/2021 00:45, Alberto Bursi wrote:
> 
> 
> On 07/06/21 22:35, Bas Mevissen via openwrt-devel wrote:
>>
>> It contains /mnt/c/Program Files/dotnet/ and other unquoted paths with 
>> spaces. I would have expected them to be quoted or escaped, but none 
>> of them seems to be the case.
>>
>> (and shortening the path to a usual Linux path made the build finish, 
>> so no other issues at hand)
>>
>> Having spaces in PATH is discussed here: 
>> https://github.com/Microsoft/WSL/issues/1766 in 2017 and apparently 
>> seen as OK.
>>
>> If I do for example:
>> $ which dotnet.exe
>> /mnt/c/Program Files/dotnet//dotnet.exe
>>
>> it seems to work fine.
>>
>>
>> Any ideas?
>>
>> Cheers,
>>
>> Bas.
> 
> 
> Afaik the OpenWrt build system does not like paths and folders with 
> spaces, and the documentation we have for using build system with WSL 
> explains how to get rid of the Windows stuff in the path (so you don't 
> have things with spaces).
> 
> See https://openwrt.org/docs/guide-developer/build-system/wsl
> 

Thanks for the link. I wasn't aware of the existence of such a page.

I don't really like the proposed solution. The problem is not the fact 
that they are Windows directories, but that they contain spaces.

A better way would be to call OpenWRT Make with a Linux-only path like:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin make

instead of modifying a global WSL setting.

BTW. As far as I could find, spaces are legal in $PATH, so I would say 
that there are bugs in OpenWRT regarding handling paths with spaces.

Thanks again,

Bas.

> -Alberto
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list