-
Notifications
You must be signed in to change notification settings - Fork 58
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
Build cross-platform packages for supported OS+CPU matrix #56
Comments
We implemented build of a cross platform packages for OSX. |
Should this work currently on MacOS Arm64? We have been unsuccessful with loading the node-api-dotnet module: with dotnet 6 installed we get: 0x80131621 failed to load managed host assembly SDK's installed using MS installers. |
@reidatlokblok Sorry it is not yet tested on Mac arm64. We'd like to add that support soon. |
I appreciate the quick response. We can get it to work if we pull source from origin/main and build on mac min m1. That so far seems to work but we have alot more testing to do. There may be an issue with the build for macos arm64 in your npm release. |
That's good to know. The Mac arm64 npm package is currently built on an Intel Mac machine. I think that's supposed to work (?) but there might be some misconfiguration with that build, as you say. We're trying to get a build/test pipeline set up for Mac arm64. |
So actually we do already have a macOS arm64 build agent in our Azure DevOps release pipeline. But I found a bug in the .NET install task that causes it to install x64 instead of arm64 build of .NET. Apparently the binary produced in that compatibility mode doesn't work on a real arm64 system. |
Thanks for continuing to look into this. We did try swapping out the osx-arm64 folder in the release on npm with the one built on the m1/m2 and that did not work. We found that the dotnet assemblies in net6.0 folder if built on the m1/m2 work on the m1/m2 but no where else AND if we use the ones from npm they work everywhere except on the m1/m2. We are now looking at how those are built differently on m1/m2 vs other platforms. |
In case it helps, if we build on m1/m2 and try on macos x64 this exception is thrown (but if we use the npm package it works fine): Error: Failed to load managed host assembly. HRESULT: 0x80131621 and if we use the one from npm on the m1/m2 we get the following exception (but if we use the one we built on the m1/m2 it works): Error: Failed to load managed host assembly. HRESULT: 0x80131621 |
There was no difference in the code between what we built on the m1/m2 and what is released in npm (except for the source paths). The ProcessorArchitectures were different. On the npm build GetAssemblyName contains Amd64 (and the decompiled project file targeted Amd64) and our build on the m1/m2 GetAssemblyName contains 'none' (though the decompiled project was set to Arm64); we expected the files in the net6.0 and other dotnet directories to have a ProcessorArchitecture set to MSIL? Could that explain why we saw the dll built on m1/m2 only worked on Arm64 MacOS and the one in npm worked everywhere else (that is Amd64 - we dont have an win-arm or lin-arm machines). |
No description provided.
The text was updated successfully, but these errors were encountered: