Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
The emsdk fails to build the blazorwasm
template using the wasm-tools
workload on CBL Mariner 2.0 and .NET 6.0 because it cannot find python
on the $PATH.
Expected Behavior
The build is successful.
Steps To Reproduce
Build the following Dockerfile:
FROM mcr.microsoft.com/dotnet/sdk:6.0-cbl-mariner2.0
ARG TARGETARCH
WORKDIR /source
RUN . /etc/os-release \
&& case $ID in \
alpine) apk add --no-cache python3 ;; \
debian | ubuntu) apt-get update \
&& apt-get install -y --no-install-recommends python3 \
&& rm -rf /var/lib/apt/lists/* ;; \
mariner) tdnf install -y python3 \
&& tdnf clean all ;; \
esac \
&& dotnet workload install --skip-manifest-update wasm-tools
RUN dotnet new blazorwasm -o app --no-restore
WORKDIR /source/app
RUN dotnet restore -r linux-x64
RUN dotnet build --no-restore
RUN dotnet publish -r linux-x64 -c Release --self-contained true -o out
Try out 7.0/8.0
in the FROM
instruction and see that it works for .NET versions > 6.0. Other operating systems also work with this Dockerfile.
Exceptions (if any)
The error presents as an issue with emcc
:
/usr/share/dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/6.0.5/Sdk/WasmApp.Native.targets(429,5): error MSB3073: The command "emcc --version" exited with code 1. [/source/app/app.csproj]
Enabling diagnostic output then reveals the actual error:
emcc --version (TaskId:227)
unable to find python in $PATH (TaskId:227)
python3
is installed on Mariner 2.0. Other distros alias python
> python3
, but not Mariner 2.0. I am guessing this is a fix that didn't get backported to .NET 6.0?
.NET Version
SDK 6.0.418, Runtime 6.0.26
Anything else?
I also found this similar PR: dotnet/emsdk#19
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done