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

Supporting Apple Silicon M1 ARM Architecture #192

Closed
2 tasks
timdinh opened this issue Nov 11, 2021 · 7 comments
Closed
2 tasks

Supporting Apple Silicon M1 ARM Architecture #192

timdinh opened this issue Nov 11, 2021 · 7 comments
Labels
feature-request A feature should be added or improved. module/cli-ext response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@timdinh
Copy link

timdinh commented Nov 11, 2021

We get the following error when issuing the command dotnet lambda on Apple M1 machine

Failed to load /usr/local/share/dotnet/shared/Microsoft.NETCore.App/3.1.20/libhostpolicy.dylib, error: dlopen(/usr/local/share/dotnet/shared/Microsoft.NETCore.App/3.1.20/libhostpolicy.dylib, 0x0001): tried: '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/3.1.20/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/libhostpolicy.dylib' (no such file), '/usr/lib/libhostpolicy.dylib' (no such file)
An error occurred while loading required library libhostpolicy.dylib from [/usr/local/share/dotnet/shared/Microsoft.NETCore.App/3.1.20]

The machine has the following dotnet SDKs and runtimes installed

.NET SDK (reflecting any global.json):
 Version:   6.0.100
 Commit:    9e8b04bbff

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  12.0
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /usr/local/share/dotnet/sdk/6.0.100/

Host (useful for support):
  Version: 6.0.0
  Commit:  4822e3c3aa

.NET SDKs installed:
  3.1.414 [/usr/local/share/dotnet/sdk]
  5.0.402 [/usr/local/share/dotnet/sdk]
  6.0.100 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

Describe the Feature

Add support so that the command dotnet lambda run without error on Apple M1 machine

Is your Feature Request related to a problem?

see above

Describe alternatives you've considered

There are no solutions that we know of

Additional Context

We have an ASPNET Core WebApi solution that we are publishing as a serverless to AWS.

Environment

  • MacOS Monterey

  • dotnet 6.0

  • Apple M1 arm64 architect

  • 👋 I may be able to implement this feature request

  • ⚠️ This feature might incur a breaking change


This is a 🚀 Feature Request

@timdinh timdinh added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 11, 2021
@timdinh
Copy link
Author

timdinh commented Nov 11, 2021

I was able to follow the instruction at https://github.com/aws/aws-extensions-for-dotnet-cli/blob/master/CONTRIBUTING.md and create a working version. Thanks.

@normj
Copy link
Member

normj commented Nov 20, 2021

I have tested the Amazon.Lambda.Tools in my Apple M1 machine and it works for me but I think that is because I have just .NET 6 installed. I suspect having the 3.1 SDK also installed is getting things confused because currently the shipped tool is targeting .NET Core 2.1 and the 3.1 is the closest match and is being used.

I'm in the process of pushing out a new version of the tool that will target .NET Core 3.1 and .NET 6 which should mean on your machine it will pick the .NET 6 version.

@ashishdhingra
Copy link
Contributor

ashishdhingra commented Jan 31, 2022

Waiting on .NET 6 target support on AWS .NET CLI extensions.

@ashishdhingra ashishdhingra added needs-review and removed needs-triage This issue or PR still needs to be triaged. labels Jan 31, 2022
@normj
Copy link
Member

normj commented Feb 15, 2022

I have pushed version 5.3.0 of the Lambda tool that adds a .NET 6 target framework for build. This should unblock M1 users with only the ARM version of .NET 6 installed.

@ashishdhingra
Copy link
Contributor

I have pushed version 5.3.0 of the Lambda tool that adds a .NET 6 target framework for build. This should unblock M1 users with only the ARM version of .NET 6 installed.

@timdinh Please upgrade to latest version and verify if the issue is resolved.

@ashishdhingra ashishdhingra added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-review labels Feb 15, 2022
@timdinhdotcom
Copy link

@normj @ashishdhingra Thanks guys, version 5.3.0 works now.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. module/cli-ext response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

4 participants