WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Building WSL from source requires Developer Mode

Open sirredbeard opened this issue 7 months ago • 5 comments

Following the WSL developer docs to build WSL from source will fail on the creation of symbolic links unless Developer Mode is enabled in Windows:

Call Stack (most recent call first):
msixgluepackage/CMakeLists.txt:1 (add_appx_target)

CMake Error at cmake/FindAppx.cmake:24 (file):
file failed to create symbolic link
'D:/WSL/msixgluepackage/x64/package_layout/images/SettingsOOBEDockerDesktopIntegration.png':
A required privilege is not held by the client.

sirredbeard avatar May 19 '25 22:05 sirredbeard

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

github-actions[bot] avatar May 19 '25 22:05 github-actions[bot]

@craigloewen-msft Not sure logs are required for this, also not a feature or question.

sirredbeard avatar May 19 '25 22:05 sirredbeard

Thank you for reporting this @sirredbeard. Do you still see the same error if you try to build in a elevated command prompt ? That's how I usually build.

If that's the case, we should add that to the wiki

OneBlue avatar May 19 '25 23:05 OneBlue

Agreed, this is a limitation of symbolic links on Windows. Should add this to the development environment setup instructions. I typically run with an admin prompt anyway, because installing the MSI package and many of our unit tests also require admin.

benhillis avatar May 20 '25 03:05 benhillis

@OneBlue

I do not see the same error message when running in an elevated shell. I still suggest we recommend Developer Mode for most users, maybe Admin.

Image

sirredbeard avatar May 20 '25 15:05 sirredbeard