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

Support running on M1 Macs [PowerShell] #752

Closed
ejizba opened this issue Feb 4, 2022 · 5 comments
Closed

Support running on M1 Macs [PowerShell] #752

ejizba opened this issue Feb 4, 2022 · 5 comments
Assignees

Comments

@ejizba
Copy link

ejizba commented Feb 4, 2022

I'm testing an arm64 build of core tools and the PowerShell worker cannot run. Note, I'm testing with PowerShell 7.2 as that is the first version that supports arm64 (see here).

This is the error I'm running into:

Unhandled exception. System.IO.IOException: Error loading native library "/Users/erijiz/tools/func-arm/workers/powershell/7.2/runtimes/osx/native/libgrpc_csharp_ext.x64.dylib".
[2022-02-04T21:37:02.426Z] at Grpc.Core.Internal.UnmanagedLibrary..ctor(String[] libraryPathAlternatives)

I tried updating the Grpc.Core package, but it didn't help. The latest source code for the Grpc.Core package does not list osx-arm64 (see here) and I don't expect them to add it considering the package is in maintenance mode. I believe the only fix will be to switch to the new grpc-dotnet package (see #751), which does not use any native dependencies.

The only workaround for users right now is to try x64 emulation.

I recommend the PowerShell worker team addresses #751 and then I'd be happy to test the worker on my M1 Mac again.

@ejizba
Copy link
Author

ejizba commented May 17, 2022

I tested func start with an http, timer, & queue function on v4.5.0 of the host (which includes the fix for #751) and everything appears to be working now on an M1 Mac 🎉

As noted earlier, this only applies to PowerShell 7.2

@ejizba ejizba closed this as completed May 17, 2022
@bshea5
Copy link

bshea5 commented May 31, 2022

Is there an additional step I'm missing? I appears to error still for myself. I get the following output from func start

Azure Functions Core Tools
Core Tools Version: 4.0.4544 Commit hash: N/A (64-bit)
Function Runtime Version: 4.3.2.18186

And I get the following error

[2022-05-31T18:09:19.777Z] Unhandled exception. System.IO.IOException: Error loading native library "/opt/homebrew/Cellar/azure-functions-core-tools@4/4.0.4544/workers/powershell/7.2/runtimes/osx/native/libgrpc_csharp_ext.x64.dylib". 

@ejizba
Copy link
Author

ejizba commented May 31, 2022

No you're not missing anything. This will be included in v4.5.0 of the host which has not been released yet. The latest version of the host released is 4.3.2 as shown in your comment. I expect it to go out sometime in the next few weeks

See here for a list of core tools releases:
https://github.com/Azure/azure-functions-core-tools/releases

@ejizba
Copy link
Author

ejizba commented Jun 15, 2022

FYI - The release of core tools with this fix finished a few days ago:

https://github.com/Azure/azure-functions-core-tools/releases/tag/4.0.4590

@invisibleaxm
Copy link

i know its an old issue but wanted to say thanks as this was a major blocker for me. Thumbs up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants