Skip to content

Build is broken on Apple Silicon #51447

Closed

Description

@mfilippov

Description

./build.sh fail with error:

  ILCompiler.ReadyToRun -> /Users/mfilippov/GitHub/runtime/artifacts/bin/ILCompiler.ReadyToRun/arm64/Debug/ILCompiler.ReadyToRun.dll
  crossgen2 -> /Users/mfilippov/GitHub/runtime/artifacts/bin/coreclr/OSX.arm64.Debug/crossgen2/crossgen2.dll
/Users/mfilippov/GitHub/runtime/.dotnet/sdk/6.0.100-preview.2.21155.3/Microsoft.Common.CurrentVersion.targets(4941,5): error MSB3030: Could not copy the file "/Users/mfilippov/GitHub/runtime/artifacts/bin/coreclr/OSX.arm64.Debug/x64/libjitinterface_x64.dylib" because it was not found. [/Users/mfilippov/GitHub/runtime/src/coreclr/tools/aot/crossgen2/crossgen2_crossarch.csproj]

Build FAILED.

/Users/mfilippov/GitHub/runtime/.dotnet/sdk/6.0.100-preview.2.21155.3/Microsoft.Common.CurrentVersion.targets(4941,5): error MSB3030: Could not copy the file "/Users/mfilippov/GitHub/runtime/artifacts/bin/coreclr/OSX.arm64.Debug/x64/libjitinterface_x64.dylib" because it was not found. [/Users/mfilippov/GitHub/runtime/src/coreclr/tools/aot/crossgen2/crossgen2_crossarch.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:03:18.49
Build failed with exit code 1. Check errors above.

Configuration

Apple Mac Mini with M1 chip. macOS 11.2.3 (20D91)

Regression?

Yes

Other information

Looks like it connected with #51349

Activity

  1. ghost added
    untriaged
    on Apr 17, 2021
  2. danmoseley commented on Apr 18, 2021

    @danmoseley
    Contributor
  3. davidwrighton commented on Apr 19, 2021

    @davidwrighton
    Member

    @sdmaclea Can you take this? I don't have access to any Mac hardware much less any hardware with Apple Silicon. Presumably we could either disable build of the cross-arch variant of crossgen2 when building on actual arm64 apple hardware (which is what I would suggest), or ensure that the x64 native components were built as they are when we build on x64. You may also need to adjust the rules for running crossgen2 in our build so that the crossgen compiler used is the arm64 one, but that shouldn't be difficult either.

  4. mangod9 commented on Apr 19, 2021

    @mangod9
    Member

    this is known issue till we get the native arm64 sdk enabled for macos arm64 builds. Believe that is waiting on various runtime stability fixes.

  5. mangod9 commented on Apr 19, 2021

    @mangod9
    Member

    current workaround is to run without crossgen2: ./build.sh /p:UseCrossgen2=false

  6. added
    os-macos
    and removed
    untriaged
    on Apr 19, 2021
  7. added this to the 6.0.0 milestone on Apr 19, 2021
  8. sdmaclea commented on Apr 21, 2021

    @sdmaclea
    Contributor

    This is working with macOS 11.3 which just release + updating to global json to the .NET6 preview3 sdk and building natively.

    I would guess the glbal.json update is partially gated by the monthly infra breaking change cycle (which might want to be shifted for the preview release schedule).

  9. omajid commented on Apr 22, 2021

    @omajid
    Member

    I am also seeing this on Fedora 32, building on arm64:

      crossgen2 -> /home/tester/runtime/artifacts/bin/coreclr/Linux.arm64.Release/crossgen2/crossgen2.dll
    /home/tester/runtime/.dotnet/sdk/6.0.100-preview.2.21155.3/Microsoft.Common.CurrentVersion.targets(4941,5): error MSB3030: Could not copy the file "/home/tester/runtime/artifacts/bin/coreclr/Linux.arm64.Release/x64/libjitinterface_x64.so" because it was not found. [/home/tester/runtime/src/coreclr/tools/aot/crossgen2/crossgen2_crossarch.csproj]
    

    This is an arm64 machine, so the x64 binary, if it existed, wouldn't work.

  10. davidwrighton commented on Apr 22, 2021

    @davidwrighton
    Member

    @omajid do you have a requirement to be able to self-build on arm64 hardware, or is it a nice-to-have?

  11. omajid commented on Apr 22, 2021

    @omajid
    Member

    @davidwrighton We have shipped .NET Core 3.1 and .NET 5.0 as a part of Fedora on arm64. Fedora doesn't use cross-compilation. All our builds of .NET for arm64 are done on arm64. It's more of a requirement than a nice-to-have (though it isn't urgent for an in-development version of .NET).

    We are also trying to get this working on RHEL, but there are other issues preventing us, like #43349. RHEL has the same policy of build-on-arm64-for-arm64 instead of cross compilation.

  12. davidwrighton commented on Apr 23, 2021

    @davidwrighton
    Member

    This looks to be fixed by #51706 . Please let us know if that isn't the case.

  13. ghost locked as resolved and limited conversation to collaborators on May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions