Building (Windows WSL)


  • Windows 11 with installed WSL2 and Ubuntu WSL

Workarounds to make it work

WSL adds Windows paths to the Linux path variable

wsl@PC:~$ echo $PATH

This breaks the build and leads to unpredictable problems.

To disable that behaviour you need to create a file at your Ubuntu WSL /etc/wsl.conf and add these options to disable. Afterwards you need to reboot WSL or your system.

  enabled=false # enable launch of Windows binaries
  appendWindowsPath=false # append Windows path to $PATH variable

Building at the native NTFS formatted storage (C:/; D:/ ...) is dead slow

To interoperate with your Windows Desktop you want the git tree accessible from Windows. So you clone the Git Tree to a location at windows and try to use it at WSL.

For this example the Git Tree is cloned at D:\WSL\LE - /mnt/d/WSL/LE. If you start building the build folder would be located at D:\WSL\LE\build.YOURPROJECT .

To change the path for the build files you need to add some options to the LibreELEC options file /home/YOURUSER/.libreelec/options .


After adding this line to the options file every build is now located at this folder.

The /home folder is located at the WSL ext4.vhdx and not at the native NTFS storage.

Optional: Move your WSL file to another location

There are several ways in moving your WSL file, the easiest solution is the dedicated tool LxRunOffline . The version 3.5.0 is not supporting the current Windows Version so you need to use a more recent version or a development build.

lxrunoffline move -n Ubuntu-22.04 -d d:\wsl


Or you can use which creates ext4.vhdx on your wanted disk and automatically mounts it to WSL2 itself on startup. Advanced instructions:

Last updated