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

Enable Apple Silicon SDK builds #8990

Merged
merged 5 commits into from Nov 18, 2020
Merged

Conversation

sdmaclea
Copy link
Contributor

@sdmaclea sdmaclea commented Oct 30, 2020

Enable Apple Silicon SDK builds

  • Add macos arm64 to readme
  • Enable osx-arm64 builds
  • Use vmImage: 'macOS-10.15'

Fixes #8840

The Apple Silicon build is likely to be unstable for general usage. Known issues.

  • Runtime hasn't fully implemented the Apple Silicon ABI. This means interop with native C is not working. It may affect lots of areas. One known area is in the call to fork a process
  • The runtime is missing the FlushProcessWriteBuffers changes needed for Apple Silicon. This means there could be GC issues
  • The runtime stack probing code doesn't support 16k pages
  • The ASP.NET runtime doesn't have native binaries for Apple Silicon. Some scenarios will not work yet.

@sdmaclea sdmaclea added this to the 6.0.1xx milestone Oct 30, 2020
@sdmaclea sdmaclea self-assigned this Oct 30, 2020
@sdmaclea sdmaclea marked this pull request as draft October 30, 2020 18:06
@sdmaclea sdmaclea added this to In progress in Enable .NET Core on Apple Silicon via automation Oct 30, 2020
@sdmaclea
Copy link
Contributor Author

@janvorli This is my draft for the osx-arm64 SDK.

I have a few hacks at the moment:

  • I have disabled aspnetcore download
  • I have not marked aspnetcore as supported
  • I have disabled building the macos installer. I can't seem to figure out why some of the *osx-arm64.pkg files are missing.

I haven't tried the resulting SDK tgz yet, but I thought it would help us understand how important the interop issues were going to be to the SDK.

I have it left as draft because the workarounds are intended to be temporary.

/cc @mangod9 @sandreenko

.vsts-ci.yml Show resolved Hide resolved
@sdmaclea
Copy link
Contributor Author

sdmaclea commented Oct 30, 2020

I haven't tested them yet, but they are built:

artifacts/packages/Release/NonShipping/dotnet-sdk-internal-6.0.100-ci-osx-arm64.tar.gz
artifacts/packages/Release/Shipping/dotnet-sdk-6.0.100-ci-osx-arm64.tar.gz

@sdmaclea
Copy link
Contributor Author

sdmaclea commented Oct 30, 2020

Still needs work Note seg fault below. I'll take a look next week.

$dotnet-sdk/dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100-ci
 Commit:    23dc3eb5b2

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  11.0
 OS Platform: Darwin
 RID:         osx.11.0-arm64
 Base Path:   /Users/steve/dotnet-sdk/sdk/6.0.100-ci/

Host (useful for support):
  Version: 6.0.0-alpha.1.20513.9
  Commit:  eea2256e56

.NET SDKs installed:
  6.0.100-ci [/Users/steve/dotnet-sdk/sdk]

.NET runtimes installed:
  Microsoft.NETCore.App 6.0.0-alpha.1.20513.9 [/Users/steve/dotnet-sdk/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download
$dotnet-sdk/dotnet new console -o nc

Welcome to .NET 6.0!
---------------------
SDK Version: 6.0.100-ci

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
zsh: segmentation fault  dotnet-sdk/dotnet new console -o nc

@sdmaclea
Copy link
Contributor Author

sdmaclea commented Nov 4, 2020

This is closer.

  • 864c314 Will need to be removed when [master] Update dependencies from dotnet/aspnetcore sdk#14338 merges and is integrated in installer. (Marked as draft because of this). I removed this in fe7815f below, because it was causing the other legs to fail.
  • I am using the osx-x64 netstandard-targeting-pack pkg. This should be OK as the osx-arm64 targeting pack is just an archive with reference assemblies and runtime independent manifexts.
  • I removed the updates to the readme for osx-x64. These had a merge conflict and I wanted to merge them separately.

@sdmaclea
Copy link
Contributor Author

Blocked on #9064

@mangod9
Copy link
Member

mangod9 commented Nov 17, 2020

#9064 has now merged.

@sdmaclea sdmaclea marked this pull request as ready for review November 17, 2020 18:01
@sdmaclea
Copy link
Contributor Author

This should build successfully and is ready for review.

Copy link
Member

@mangod9 mangod9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hoyosjs
Copy link
Member

hoyosjs commented Nov 17, 2020

@sfoslund can you please review here? I would like to have a repo maintainer confirm this looks correct.

README.md Show resolved Hide resolved
@mangod9
Copy link
Member

mangod9 commented Nov 18, 2020

Is this good to merge?

@sfoslund
Copy link
Member

Sorry for the delay, looks good to me

@sdmaclea sdmaclea merged commit cfa5bc4 into dotnet:master Nov 18, 2020
Enable .NET Core on Apple Silicon automation moved this from In progress to Done Nov 18, 2020
@sdmaclea
Copy link
Contributor Author

I have updated the top post with known issues, just so expectation are not completely uncalibrated.

@sdmaclea
Copy link
Contributor Author

Thanks @sfoslund

@sdmaclea sdmaclea deleted the AppleSilicon branch November 18, 2020 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Build .NET SDK for Apple Silicon
5 participants