Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

WSL2 Ubuntu ARM64 build error #38958

Open

Description

@pgovind

Just logging an issue I ran into while building dotnet/runtime on WSL2 Arm64:

_$ ./build.sh clr -c release_
.
.
.
Build FAILED.

/home/prgovi/repos/runtime_2/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj(87,5): error MSB3030: Could not copy the file "/home/prgovi/repos/runtime_2/artifacts/bin/coreclr/Linux.arm64.Release//x64/libjitinterface.so" because it was not found.
/home/prgovi/.nuget/packages/microsoft.build.traversal/2.0.34/Sdk/Sdk.targets(116,5): error MSB4181: The "MSBuild" task returned false but did not log an error. [/home/prgovi/repos/runtime_2/Build.proj]
    0 Warning(s)
    2 Error(s)

I'm not super familiar with the build infra, but it looks like a bad path? I see a "/x64" in the error message. Running find . -name libjitinterface* gives this:

./artifacts/obj/coreclr/Linux.arm64.Release/src/tools/aot/jitinterface/libjitinterface.so
./artifacts/bin/coreclr/Linux.arm64.Release/libjitinterface.so
./artifacts/bin/coreclr/Linux.arm64.Release/crossgen2/libjitinterface.so

@carlossanlop @safern @eiriktsarpalis

Activity

  1. added this to the Future milestone on Jul 8, 2020
  2. added
    untriaged
    on Jul 8, 2020
  3. added
    area-Infrastructure-coreclr
    and removed on Jul 8, 2020
  4. safern commented on Jul 8, 2020

    @safern
    Member
  5. removed
    untriaged
    on Jul 8, 2020
  6. carlossanlop commented on Jul 9, 2020

    @carlossanlop
    Contributor

    I hit this too:

    /home/carlos/runtime/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj(87,5):
    error MSB3030:
    Could not copy the file "/home/carlos/runtime/artifacts/bin/coreclr/Linux.arm64.Release//x64/libjitinterface.so" because it was not found.
    

    I think the problem is in the path creation - notice the second string has a double // - I suspect the string was expecting something to get embedded in there.

  7. safern commented on Jul 9, 2020

    @safern
    Member

    The problem is here:

    <PackageFile Include="$(BinDir)\$(CrossHostArch)\$(JitInterfaceLibraryName)" />

    since that is using CrossHostArch which defaults to x64 if TargetArchitecture == arm64 -- I think this is very specialized for cross build inside an x64 host.

    <CrossHostArch Condition="'$(TargetArchitecture)' == 'arm64'">x64</CrossHostArch>

    As a temporary workaround you could just pass that property globally as empty: /p:CrossHostArch=.

    @trylek @jkoritzinsky maybe we should check the host architecture instead to see if it differs from TargetArchitecture or is there a way to know if it is a cross build?

  8. jkoritzinsky commented on Jul 9, 2020

    @jkoritzinsky
    Member

    Yes we should. We have checks in the installer build for not using the "cross host arch" when Host = Target Arch.

  9. safern commented on Jul 9, 2020

    @safern
    Member

    Yeah, $(BuildArchitecture) is the property.

    <BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>

    And we have some properties for this apparently:

    <CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'arm64' and '$(BuildArchitecture)' != 'arm64'">x64</CoreCLRCrossTargetComponentDirName>

    We should probably just use that property instead to construct the file path.

  10. AndyAyersMS commented on Feb 20, 2022

    @AndyAyersMS
    Member

    Hitting this now too, building natively for arm64 on a Macbook.

  11. added and removed
    area-Infrastructure-coreclr
    on Apr 13, 2026
  12. dotnet-policy-service commented on Apr 13, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/runtime-infrastructure
    See info in area-owners.md if you want to be subscribed.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions