Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't go from build to wasm testing in one go on a M1 Mac #72722

Closed
yamachu opened this issue Jul 23, 2022 · 3 comments
Closed

Can't go from build to wasm testing in one go on a M1 Mac #72722

yamachu opened this issue Jul 23, 2022 · 3 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-Build-mono
Milestone

Comments

@yamachu
Copy link
Contributor

yamachu commented Jul 23, 2022

Description

build-all task, used when building under src/mono/wasm, can generate the necessary packages to install the wasm-tools workload.
The generated packages are OS and architecture dependent, e.g., on M1 Mac, Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.browser-wasm.7.0.0-dev.nupkg is generated.

However, wasm-tools dependency Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm specifies Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm as the alias of the dependency.

"Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm": {
"kind": "Sdk",
"version": "${PackageVersion}",
"alias-to": {
"win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm",
"linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.browser-wasm",
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm",
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm"
}
},

Since I am building in arm64 environment, only packages for arm64 exist, and wasm-tools try to install packages for x64 and it fails.

Reproduction Steps

  1. clone this repo
  2. make -C src/mono/wasm provision-wasm
  3. make -C src/mono/wasm build-all
  4. make -C src/mono/wasm run-build-tests

Expected behavior

We can install wasm-tools that for testing on M1 Mac

Actual behavior

When dotnet install Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm, it fali.

  ** Installing latest sdk for workload based tests into /Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/artifacts/bin/sdk-no-workload/
  "https://dot.net/v1/dotnet-install.sh" から "/Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/artifacts/obj/dotnet-install.sh" にダウンロードしています (56,139 バイト)。
  dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
  dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
  dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
  dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

  dotnet-install: Attempting to download using aka.ms link https://dotnetbuilds.azureedge.net/public/Sdk/7.0.100-rc.1.22371.5/dotnet-sdk-7.0.100-rc.1.22371.5-osx-arm64.tar.gz
  dotnet-install: Extracting zip from https://dotnetbuilds.azureedge.net/public/Sdk/7.0.100-rc.1.22371.5/dotnet-sdk-7.0.100-rc.1.22371.5-osx-arm64.tar.gz
  dotnet-install: Installed version is 7.0.100-rc.1.22371.5
  dotnet-install: Adding to current process PATH: `/Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/artifacts/bin/sdk-no-workload`. Note: This change will be visible only when sourcing script.
  dotnet-install: Note that the script does not resolve dependencies during installation.
  dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
  dotnet-install: Installation finished successfully.
  ** Installing latest sdk for workload based tests into /Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/artifacts/bin/dotnet-workload/

  ** Installing workload manifest wasm-tools **

  Installing workload manifest for Microsoft.NET.Workload.Mono.ToolChain/7.0.0-dev
  Installing workload manifest for Microsoft.NET.Workload.Emscripten/7.0.0-rc.1.22362.2

  ** workload install **

  Running: /Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/artifacts/bin/dotnet-workload/dotnet workload install --skip-manifest-update --no-cache --configfile "/var/folders/wj/8by1gzsn175986_lvjc2m1h00000gn/T/lrlgqbre.wvm" wasm-tools
  Using working directory: /var/folders/wj/8by1gzsn175986_lvjc2m1h00000gn/T/
  .NET 7.0 へようこそ!
  ---------------------
  SDK バージョン: 7.0.100-rc.1.22371.5
  テレメトリ
  ---------
  .NET ツールは、エクスペリエンスの向上のために利用状況データを収集します。データは Microsoft によって収集され、コミュニティと共有されます。テレメトリをオプトアウトするには、好みのシェルを使用して、DOTNET_CLI_TELEMETRY_OPTOUT 環境変数を '1' または 'true' に設定できます。
  .NET CLI ツールのテレメトリの詳細をご覧ください: https://aka.ms/dotnet-cli-telemetry
  ----------------
  ASP.NET Core の HTTPS 開発証明書をインストールしました。
  証明書を信頼するには、'dotnet dev-certs https --trust' (Windows および macOS のみ) を実行します。
  HTTPS の詳細については、https://aka.ms/dotnet-https を参照してください
  ----------------
  最初のアプリを作成するには、https://aka.ms/dotnet-hello-world を参照してください
  最新情報については、https://aka.ms/dotnet-whats-new を参照してください
  ドキュメントを探索するには、https://aka.ms/dotnet-docs を参照してください
  GitHub で問題の報告とソースの検索を行うには、https://github.com/dotnet/core を参照してください
  'dotnet --help' を使用して使用可能なコマンドを確認するか、https://aka.ms/dotnet-cli にアクセスしてください
  --------------------------------------------------------------------------------------
  Pack Microsoft.NET.Runtime.WebAssembly.Sdk バージョン 7.0.0-dev をインストールしています...
  Skipping NuGet package signature verification.
  Microsoft.NET.Runtime.WebAssembly.Sdk バージョン 7.0.0-dev のワークロード パックのインストール レコードを書き込んでいます...
  Pack Microsoft.NETCore.App.Runtime.Mono.browser-wasm バージョン 7.0.0-dev をインストールしています...
  Microsoft.NETCore.App.Runtime.Mono.browser-wasm バージョン 7.0.0-dev のワークロード パックのインストール レコードを書き込んでいます...
  Pack Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm バージョン 7.0.0-dev をインストールしています...
  ワークロードをインストールできませんでした。インストール パックをロールバックしています...
  パック Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm のインストールをロールバックしています...
  パック Microsoft.NETCore.App.Runtime.Mono.browser-wasm のインストールをロールバックしています...
  ワークロード パック Microsoft.NETCore.App.Runtime.Mono.browser-wasm バージョン 7.0.0-dev をアンインストールしています...
  パック Microsoft.NET.Runtime.WebAssembly.Sdk のインストールをロールバックしています...
  ワークロード パック Microsoft.NET.Runtime.WebAssembly.Sdk バージョン 7.0.0-dev をアンインストールしています...
/Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/eng/testing/workloads-testing.targets(151,5): warning : ワークロード microsoft.netcore.app.runtime.aot.osx-x64.cross.browser-wasm::7.0.0-dev が NuGet フィード /Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/artifacts/packages/Release/Shipping/;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7-transport/nuget/v3/index.json;https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json" に見つかりません。 をインストールできませんでした [/Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj]

Regression?

No response

Known Workarounds

  1. replace it with Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.browser-wasm
  2. make -C src/mono/wasm build-all

"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm"

However, we felt that incorporating this change would affect many users since it was not published on nuget.

Configuration

No response

Other information

Is osx-arm64 support like M1 Mac within the scope of .NET 7?
Please let me know if you have an issue that can be tracked.

ref?: #71622 (comment)

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 23, 2022
@radical radical added arch-wasm WebAssembly architecture area-Build-mono labels Jul 25, 2022
@ghost
Copy link

ghost commented Jul 25, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

build-all task, used when building under src/mono/wasm, can generate the necessary packages to install the wasm-tools workload.
The generated packages are OS and architecture dependent, e.g., on M1 Mac, Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.browser-wasm.7.0.0-dev.nupkg is generated.

However, wasm-tools dependency Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm specifies Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm as the alias of the dependency.

"Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm": {
"kind": "Sdk",
"version": "${PackageVersion}",
"alias-to": {
"win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm",
"linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.browser-wasm",
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm",
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm"
}
},

Since I am building in arm64 environment, only packages for arm64 exist, and wasm-tools try to install packages for x64 and it fails.

Reproduction Steps

  1. clone this repo
  2. make -C src/mono/wasm provision-wasm
  3. make -C src/mono/wasm build-all
  4. make -C src/mono/wasm run-build-tests

Expected behavior

We can install wasm-tools that for testing on M1 Mac

Actual behavior

When dotnet install Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm, it fali.

  ** Installing latest sdk for workload based tests into /Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/artifacts/bin/sdk-no-workload/
  "https://dot.net/v1/dotnet-install.sh" から "/Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/artifacts/obj/dotnet-install.sh" にダウンロードしています (56,139 バイト)。
  dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
  dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
  dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
  dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

  dotnet-install: Attempting to download using aka.ms link https://dotnetbuilds.azureedge.net/public/Sdk/7.0.100-rc.1.22371.5/dotnet-sdk-7.0.100-rc.1.22371.5-osx-arm64.tar.gz
  dotnet-install: Extracting zip from https://dotnetbuilds.azureedge.net/public/Sdk/7.0.100-rc.1.22371.5/dotnet-sdk-7.0.100-rc.1.22371.5-osx-arm64.tar.gz
  dotnet-install: Installed version is 7.0.100-rc.1.22371.5
  dotnet-install: Adding to current process PATH: `/Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/artifacts/bin/sdk-no-workload`. Note: This change will be visible only when sourcing script.
  dotnet-install: Note that the script does not resolve dependencies during installation.
  dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
  dotnet-install: Installation finished successfully.
  ** Installing latest sdk for workload based tests into /Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/artifacts/bin/dotnet-workload/

  ** Installing workload manifest wasm-tools **

  Installing workload manifest for Microsoft.NET.Workload.Mono.ToolChain/7.0.0-dev
  Installing workload manifest for Microsoft.NET.Workload.Emscripten/7.0.0-rc.1.22362.2

  ** workload install **

  Running: /Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/artifacts/bin/dotnet-workload/dotnet workload install --skip-manifest-update --no-cache --configfile "/var/folders/wj/8by1gzsn175986_lvjc2m1h00000gn/T/lrlgqbre.wvm" wasm-tools
  Using working directory: /var/folders/wj/8by1gzsn175986_lvjc2m1h00000gn/T/
  .NET 7.0 へようこそ!
  ---------------------
  SDK バージョン: 7.0.100-rc.1.22371.5
  テレメトリ
  ---------
  .NET ツールは、エクスペリエンスの向上のために利用状況データを収集します。データは Microsoft によって収集され、コミュニティと共有されます。テレメトリをオプトアウトするには、好みのシェルを使用して、DOTNET_CLI_TELEMETRY_OPTOUT 環境変数を '1' または 'true' に設定できます。
  .NET CLI ツールのテレメトリの詳細をご覧ください: https://aka.ms/dotnet-cli-telemetry
  ----------------
  ASP.NET Core の HTTPS 開発証明書をインストールしました。
  証明書を信頼するには、'dotnet dev-certs https --trust' (Windows および macOS のみ) を実行します。
  HTTPS の詳細については、https://aka.ms/dotnet-https を参照してください
  ----------------
  最初のアプリを作成するには、https://aka.ms/dotnet-hello-world を参照してください
  最新情報については、https://aka.ms/dotnet-whats-new を参照してください
  ドキュメントを探索するには、https://aka.ms/dotnet-docs を参照してください
  GitHub で問題の報告とソースの検索を行うには、https://github.com/dotnet/core を参照してください
  'dotnet --help' を使用して使用可能なコマンドを確認するか、https://aka.ms/dotnet-cli にアクセスしてください
  --------------------------------------------------------------------------------------
  Pack Microsoft.NET.Runtime.WebAssembly.Sdk バージョン 7.0.0-dev をインストールしています...
  Skipping NuGet package signature verification.
  Microsoft.NET.Runtime.WebAssembly.Sdk バージョン 7.0.0-dev のワークロード パックのインストール レコードを書き込んでいます...
  Pack Microsoft.NETCore.App.Runtime.Mono.browser-wasm バージョン 7.0.0-dev をインストールしています...
  Microsoft.NETCore.App.Runtime.Mono.browser-wasm バージョン 7.0.0-dev のワークロード パックのインストール レコードを書き込んでいます...
  Pack Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm バージョン 7.0.0-dev をインストールしています...
  ワークロードをインストールできませんでした。インストール パックをロールバックしています...
  パック Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm のインストールをロールバックしています...
  パック Microsoft.NETCore.App.Runtime.Mono.browser-wasm のインストールをロールバックしています...
  ワークロード パック Microsoft.NETCore.App.Runtime.Mono.browser-wasm バージョン 7.0.0-dev をアンインストールしています...
  パック Microsoft.NET.Runtime.WebAssembly.Sdk のインストールをロールバックしています...
  ワークロード パック Microsoft.NET.Runtime.WebAssembly.Sdk バージョン 7.0.0-dev をアンインストールしています...
/Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/eng/testing/workloads-testing.targets(151,5): warning : ワークロード microsoft.netcore.app.runtime.aot.osx-x64.cross.browser-wasm::7.0.0-dev が NuGet フィード /Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/artifacts/packages/Release/Shipping/;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7-transport/nuget/v3/index.json;https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json" に見つかりません。 をインストールできませんでした [/Users/yamachu/Projects/github.com/yamachu/dotnet-runtime/src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj]

Regression?

No response

Known Workarounds

  1. replace it with Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.browser-wasm
  2. make -C src/mono/wasm build-all

"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm"

However, we felt that incorporating this change would affect many users since it was not published on nuget.

Configuration

No response

Other information

Is osx-arm64 support like M1 Mac within the scope of .NET 7?
Please let me know if you have an issue that can be tracked.

ref?: #71622 (comment)

Author: yamachu
Assignees: -
Labels:

arch-wasm, area-Setup, untriaged, area-Build-mono

Milestone: -

@radical radical removed area-Setup untriaged New issue has not been triaged by the area owner labels Jul 25, 2022
@lewing lewing modified the milestones: 7.0.0, 8.0.0 Jul 25, 2022
@lewing
Copy link
Member

lewing commented Jan 5, 2023

cc @steveisok @directhex

@lewing
Copy link
Member

lewing commented Jul 17, 2023

I believe this works fine now, please reopen if not

@lewing lewing closed this as completed Jul 17, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono
Projects
None yet
Development

No branches or pull requests

4 participants