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

Blazor WASM AOT not working on MacOS 10.13.6 #57431

Closed
ar0311 opened this issue Aug 14, 2021 · 10 comments · Fixed by #57507
Closed

Blazor WASM AOT not working on MacOS 10.13.6 #57431

ar0311 opened this issue Aug 14, 2021 · 10 comments · Fixed by #57507
Assignees
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono
Milestone

Comments

@ar0311
Copy link

ar0311 commented Aug 14, 2021

Installed 6.0-preview-7 SDK on MacOS 10.13.6 (High Sierra)

Ran "sudo dotnet workload install wasm-tools", installed OK

dotnet new blazorwasm, add "RunAOTCompilation" to csproj.

dotnet publish -c Release generates the following error:

/usr/local/share/dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/6.0.0-preview.7.21377.19/Sdk/WasmApp.Native.targets(443,5): warning : [/Users/adam/Repos/blazorwasm60pre7/obj/Release/net6.0/linked/Microsoft.AspNetCore.Components.dll] dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin [/Users/adam/Repos/blazorwasm60pre7/blazorwasm60pre7.csproj]

Some Googling leads me to suspect it may have something to do with the workload package itself being built on MacOS 10.15

@pranavkm pranavkm transferred this issue from dotnet/aspnetcore Aug 15, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Aug 15, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@pranavkm
Copy link
Contributor

FYI @radical / @lewing

@radical radical added the arch-wasm WebAssembly architecture label Aug 15, 2021
@ghost
Copy link

ghost commented Aug 15, 2021

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

Issue Details

Installed 6.0-preview-7 SDK on MacOS 10.13.6 (High Sierra)

Ran "sudo dotnet workload install wasm-tools", installed OK

dotnet new blazorwasm, add "RunAOTCompilation" to csproj.

dotnet publish -c Release generates the following error:

/usr/local/share/dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/6.0.0-preview.7.21377.19/Sdk/WasmApp.Native.targets(443,5): warning : [/Users/adam/Repos/blazorwasm60pre7/obj/Release/net6.0/linked/Microsoft.AspNetCore.Components.dll] dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin [/Users/adam/Repos/blazorwasm60pre7/blazorwasm60pre7.csproj]

Some Googling leads me to suspect it may have something to do with the workload package itself being built on MacOS 10.15

Author: ar0311
Assignees: -
Labels:

arch-wasm, untriaged

Milestone: -

@radical
Copy link
Member

radical commented Aug 15, 2021

cc @vargaz

@vargaz
Copy link
Contributor

vargaz commented Aug 15, 2021

Probably needs to target a lower osx version with -mmacosx-version-min=10.13 or something.

@vargaz
Copy link
Contributor

vargaz commented Aug 15, 2021

The mono/mono repo had:
MACOS_VERSION_MIN?=10.9

@lewing lewing added this to the 6.0.0 milestone Aug 15, 2021
@lewing lewing removed the untriaged New issue has not been triaged by the area owner label Aug 15, 2021
@lewing
Copy link
Member

lewing commented Aug 15, 2021

this is going to be a problem for any of the cross runtimes correct?

@lambdageek
Copy link
Member

this is going to be a problem for any of the cross runtimes correct?

yea, this will affect every cross-compiler /cc @akoeplinger

@akoeplinger
Copy link
Member

.NET 6 only supports macOS 10.14+ according to https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md#macos

@akoeplinger
Copy link
Member

akoeplinger commented Aug 16, 2021

Though right now we're still targeting 10.13 as the min version for mono here:

<macOSVersionMin>10.13</macOSVersionMin>

We're missing this condition for wasm/android so it correctly sets the -mmacosx-version-min for the AOT compiler:

runtime/src/mono/mono.proj

Lines 556 to 558 in 6acb72b

<ItemGroup Condition="'$(TargetstvOS)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">
<MonoAOTCMakeArgs Include="-DCMAKE_OSX_DEPLOYMENT_TARGET=$(macOSVersionMin)" />
</ItemGroup>

@akoeplinger akoeplinger self-assigned this Aug 16, 2021
akoeplinger added a commit to akoeplinger/runtime that referenced this issue Aug 16, 2021
Not just if we're targetting iOS/tvOS/macOS since the AOT compiler for WASM or Android can run on macOS too.

Fixes dotnet#57431
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Aug 16, 2021
lewing pushed a commit that referenced this issue Aug 17, 2021
…57507)

* Set CMAKE_OSX_DEPLOYMENT_TARGET for all Mono AOT compilers on macOS

Not just if we're targetting iOS/tvOS/macOS since the AOT compiler for WASM or Android can run on macOS too.

Fixes #57431

* Use RealTargetOS if it's available
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Aug 17, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants