prose icon indicating copy to clipboard operation
prose copied to clipboard

Failed to run the tutorial on Mac M1

Open fiza11 opened this issue 2 years ago • 4 comments

I installed .NET 6 GA Arm64 SDK and ran the build command which worked successfully but when I try running the dotnet test command, it fails and throws an error.

Steps to reproduce:

  1. After cloning the repository, cd prose/dsl-samples/tutorial/part1a.
  2. Run dotnet build.
  3. Run dotnet test. It will throw the following error:
Testhost process exited with error: It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.1.0' (arm64) was not found.
  - The following frameworks were found:
      6.0.0 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.1.0&arch=arm64&rid=osx.11.1-arm64
. Please check the diagnostic logs for more information.

Test Run Aborted.

fiza11 avatar Mar 28 '22 20:03 fiza11

Sorry, PROSE dslc does indeed have a dependency on the out-of-support .NET Core 2.1 SDK. We're working on removing that dependency so it can work on more recent versions of .NET, but it involves a pretty major rewrite, so it's taking a while.

There is no Arm64 build of .NET Core 2.1, but you should be able to install the x64 build using Rosetta.

danpere avatar Mar 29 '22 01:03 danpere

There is no Arm64 build of .NET Core 2.1, but you should be able to install the x64 build using Rosetta.

I installed the .NET Core 2.1, the x64 build using Rosetta but when I run dotnet build, it throws the error:

Failed to load A, error: dlopen(/usr/local/share/dotnet/host/fxr/6.0.0/libhostfxr.dylib, 0x0001): tried: '/usr/local/share/dotnet/host/fxr/6.0.0/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
The library libhostfxr.dylib was found, but loading it from /usr/local/share/dotnet/host/fxr/6.0.0/libhostfxr.dylib failed
  - Installing .NET Core prerequisites might help resolve this problem.
     https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

And after I install the .NET Core prerequisites, it again throws the original error: The framework 'Microsoft.NETCore.App', version '2.1.0' (x64) was not found.

It's an infinite loop. What is the solution to this problem?

fiza11 avatar Apr 02 '22 12:04 fiza11

Same here. Is there a resolution to this problem? @fiza11 were you able to resolve this?

Vaishnvi avatar Jun 20 '23 13:06 Vaishnvi

Sorry, there has been no change here from the PROSE side. We still need to complete that rewrite of our internals.

danpere avatar Jun 20 '23 16:06 danpere