-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Based off #53314 .
Steps to reproduce:
- install dotnet preview 4 (https://dotnet.microsoft.com/download/dotnet/6.0), into a system location
- install the workload packs with:
dotnet workload install microsoft-net-sdk-blazorwebassembly-aot. You would need to run that as root - create a new blazor project with
dotnet new blazorwasm - Add
<RunAOTCompilation>true</RunAOTCompilation>, and<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="6.0.0-preview.4.21253.5" />to the project - build with
dotnet publish -c:release -p:RunAOTCompilation=true -bl
Fails with:
System.ComponentModel.Win32Exception (13): Permission denied
at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UIn
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) in System.Diagnostics.Process.dll:token 0x6000105+0x1aa
at System.Diagnostics.Process.Start() in System.Diagnostics.Process.dll:token 0x60000de+0xab
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) in System.Diagnostics.Process.dll:token 0x60000e2+0x1b
at Utils.RunProcess(String path, String args, IDictionary`2 envVars, String workingDir, Boolean ignoreErrors, Boolean silent, MessageImportance outputMessageImportance, MessageImportance debugMessageImporta
at MonoAOTCompiler.PrecompileLibrary(ITaskItem assemblyItem, String monoPaths) in MonoAOTCompiler.dll:token 0x600002b+0x436 (TaskId:149)
-rwxr--r-- 1 root wheel 12062648 May 3 14:42 /usr/local/share/dotnet/packs/microsoft.netcore.app.runtime.aot.osx-x64.cross.browser-wasm/6.0.0-preview.4.21253.7/Sdk/../tools/mono-aot-cross*
Problem 1. mono-aot-cross has execute permission only for the owner(root).
fixing the permission for that, and building again fails with:
/var/folders/7c/zpmy8k_d4d1grky_s154kk640000gp/T/tmp6376bf6641524777815553f841d39a51.exec.cmd: line 2: /usr/local/share/dotnet/packs/Microsoft.NET.Runtime.Emscripten.2.0.12.Sdk.osx-x64/6.0.0-preview.4.21220.1/tools/emscripten/emcc: Permission denied
-rwxr--r-- 1 root wheel 716 Sep 23 2020 /usr/local/share/dotnet/packs/Microsoft.NET.Runtime.Emscripten.2.0.12.Sdk.osx-x64/6.0.0-preview.4.21220.1/tools/emscripten/emcc*
Problem 2: emcc (and possibly other emscripten files) don't have the right permissions