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

Cannot create layout on unknown arch Loongarch #78854

Open
kant2002 opened this issue Nov 25, 2022 · 7 comments
Open

Cannot create layout on unknown arch Loongarch #78854

kant2002 opened this issue Nov 25, 2022 · 7 comments

Comments

@kant2002
Copy link
Contributor

I manage to complete build.sh -s clr+libs for new architecture, but running ./src/tests/build.sh generatelayoutonly produce following error

__DistroRid: linux-loongarch64
Building Tests...
__TargetOS: Linux
__TargetArch: loongarch64
__BuildType: Debug
__TestIntermediatesDir: /home/loongson/runtime/artifacts/tests/coreclr/obj/Linux.loongarch64.Debug
__NativeTestIntermediatesDir: /home/loongson/runtime/artifacts/tests/coreclr/obj/Linux.loongarch64.Debug/Native
__ManagedTestIntermediatesDir: /home/loongson/runtime/artifacts/tests/coreclr/obj/Linux.loongarch64.Debug/Managed
Creating TestBinDir: /home/loongson/runtime/artifacts/tests/coreclr/Linux.loongarch64.Debug
Creating LogsDir: /home/loongson/runtime/artifacts/log
Creating MsbuildDebugLogsDir: /home/loongson/runtime/artifacts/log/MsbuildDebugLogs
Building tests via "/home/loongson/runtime/eng/common/msbuild.sh"  --warnAsError false /home/loongson/runtime/src/tests/build.proj /t:TestBuild /p:TargetArchitecture=loongarch64 /p:Configuration=Debug /p:TargetOS=Linux /nodeReuse:false    /maxcpucount "/flp:Verbosity=normal;LogFile=/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.log" "/flp1:WarningsOnly;LogFile=/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.wrn" "/flp2:ErrorsOnly;LogFile=/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.err" "/bl:/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.binlog" /p:NUMBER_OF_PROCESSORS=4
/home/loongson/runtime/.dotnet/sdk/7.0.100/MSBuild.dll /nologo -maxcpucount /m /maxcpucount -verbosity:m /v:minimal /bl:/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.binlog /clp:Summary /flp1:WarningsOnly;LogFile=/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.wrn /flp2:ErrorsOnly;LogFile=/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.err /flp:Verbosity=normal;LogFile=/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.log /nr:true /nodeReuse:false /p:TreatWarningsAsErrors=false /p:ContinuousIntegrationBuild=false /p:TargetArchitecture=loongarch64 /p:Configuration=Debug /p:TargetOS=Linux /p:NUMBER_OF_PROCESSORS=4 /t:TestBuild /home/loongson/runtime/src/tests/build.proj
  [00:10:29.96] Restoring all packages...
    Determining projects to restore...
/home/loongson/runtime/src/tests/Common/test_dependencies_fs/test_dependencies.fsproj : error NU1101: Unable to find package Microsoft.NETCore.App.Runtime.linux-loongarch64. No packages exist with this id in source(s): /home/loongson/runtime/.dotnet/sdk/7.0.100/FSharp/library-packs, dotnet-eng, dotnet-libraries, dotnet-public, dotnet-tools, dotnet7, dotnet7-transport, dotnet8, dotnet8-transport, richnav [/home/loongson/runtime/src/tests/build.proj]
    Failed to restore /home/loongson/runtime/src/tests/Common/test_dependencies_fs/test_dependencies.fsproj (in 9.94 sec).
/home/loongson/runtime/src/tests/build.proj(438,5): error MSB3073: 命令“"/home/loongson/runtime/.dotnet/dotnet" restore -r linux-loongarch64 Common/test_dependencies_fs/test_dependencies.fsproj  /p:SetTFMForRestore=true /p:TargetOS=Linux /p:TargetArchitecture=loongarch64 /p:Configuration=Debug /p:CrossBuild=”已退出,代码为 1。

生成失败。

/home/loongson/runtime/src/tests/Common/test_dependencies_fs/test_dependencies.fsproj : error NU1101: Unable to find package Microsoft.NETCore.App.Runtime.linux-loongarch64. No packages exist with this id in source(s): /home/loongson/runtime/.dotnet/sdk/7.0.100/FSharp/library-packs, dotnet-eng, dotnet-libraries, dotnet-public, dotnet-tools, dotnet7, dotnet7-transport, dotnet8, dotnet8-transport, richnav [/home/loongson/runtime/src/tests/build.proj]
/home/loongson/runtime/src/tests/build.proj(438,5): error MSB3073: 命令“"/home/loongson/runtime/.dotnet/dotnet" restore -r linux-loongarch64 Common/test_dependencies_fs/test_dependencies.fsproj  /p:SetTFMForRestore=true /p:TargetOS=Linux /p:TargetArchitecture=loongarch64 /p:Configuration=Debug /p:CrossBuild=”已退出,代码为 1。
    0 个警告
    2 个错误

已用时间 00:00:25.87
Build failed with exit code 1. Check errors above.
Failed to build tests. See the build logs:
    /home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.log
    /home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.wrn
    /home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.err
    /home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.binlog

is there a way how I can use Microsoft.NETCore.App.Runtime.linux-loongarch64 from local build.

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Nov 25, 2022
@kant2002
Copy link
Contributor Author

/cc @shushanhf

@kant2002
Copy link
Contributor Author

Even if I build ./build.sh -s packs -bl /p:PublishReadyToRun=false and artifacts/packages/Debug/Shipping/ has Microsoft.NETCore.App.Runtime.linux-loongarch64.8.0.0-dev.nupkg

@ghost
Copy link

ghost commented Nov 25, 2022

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

Issue Details

I manage to complete build.sh -s clr+libs for new architecture, but running ./src/tests/build.sh generatelayoutonly produce following error

__DistroRid: linux-loongarch64
Building Tests...
__TargetOS: Linux
__TargetArch: loongarch64
__BuildType: Debug
__TestIntermediatesDir: /home/loongson/runtime/artifacts/tests/coreclr/obj/Linux.loongarch64.Debug
__NativeTestIntermediatesDir: /home/loongson/runtime/artifacts/tests/coreclr/obj/Linux.loongarch64.Debug/Native
__ManagedTestIntermediatesDir: /home/loongson/runtime/artifacts/tests/coreclr/obj/Linux.loongarch64.Debug/Managed
Creating TestBinDir: /home/loongson/runtime/artifacts/tests/coreclr/Linux.loongarch64.Debug
Creating LogsDir: /home/loongson/runtime/artifacts/log
Creating MsbuildDebugLogsDir: /home/loongson/runtime/artifacts/log/MsbuildDebugLogs
Building tests via "/home/loongson/runtime/eng/common/msbuild.sh"  --warnAsError false /home/loongson/runtime/src/tests/build.proj /t:TestBuild /p:TargetArchitecture=loongarch64 /p:Configuration=Debug /p:TargetOS=Linux /nodeReuse:false    /maxcpucount "/flp:Verbosity=normal;LogFile=/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.log" "/flp1:WarningsOnly;LogFile=/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.wrn" "/flp2:ErrorsOnly;LogFile=/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.err" "/bl:/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.binlog" /p:NUMBER_OF_PROCESSORS=4
/home/loongson/runtime/.dotnet/sdk/7.0.100/MSBuild.dll /nologo -maxcpucount /m /maxcpucount -verbosity:m /v:minimal /bl:/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.binlog /clp:Summary /flp1:WarningsOnly;LogFile=/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.wrn /flp2:ErrorsOnly;LogFile=/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.err /flp:Verbosity=normal;LogFile=/home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.log /nr:true /nodeReuse:false /p:TreatWarningsAsErrors=false /p:ContinuousIntegrationBuild=false /p:TargetArchitecture=loongarch64 /p:Configuration=Debug /p:TargetOS=Linux /p:NUMBER_OF_PROCESSORS=4 /t:TestBuild /home/loongson/runtime/src/tests/build.proj
  [00:10:29.96] Restoring all packages...
    Determining projects to restore...
/home/loongson/runtime/src/tests/Common/test_dependencies_fs/test_dependencies.fsproj : error NU1101: Unable to find package Microsoft.NETCore.App.Runtime.linux-loongarch64. No packages exist with this id in source(s): /home/loongson/runtime/.dotnet/sdk/7.0.100/FSharp/library-packs, dotnet-eng, dotnet-libraries, dotnet-public, dotnet-tools, dotnet7, dotnet7-transport, dotnet8, dotnet8-transport, richnav [/home/loongson/runtime/src/tests/build.proj]
    Failed to restore /home/loongson/runtime/src/tests/Common/test_dependencies_fs/test_dependencies.fsproj (in 9.94 sec).
/home/loongson/runtime/src/tests/build.proj(438,5): error MSB3073: 命令“"/home/loongson/runtime/.dotnet/dotnet" restore -r linux-loongarch64 Common/test_dependencies_fs/test_dependencies.fsproj  /p:SetTFMForRestore=true /p:TargetOS=Linux /p:TargetArchitecture=loongarch64 /p:Configuration=Debug /p:CrossBuild=”已退出,代码为 1。

生成失败。

/home/loongson/runtime/src/tests/Common/test_dependencies_fs/test_dependencies.fsproj : error NU1101: Unable to find package Microsoft.NETCore.App.Runtime.linux-loongarch64. No packages exist with this id in source(s): /home/loongson/runtime/.dotnet/sdk/7.0.100/FSharp/library-packs, dotnet-eng, dotnet-libraries, dotnet-public, dotnet-tools, dotnet7, dotnet7-transport, dotnet8, dotnet8-transport, richnav [/home/loongson/runtime/src/tests/build.proj]
/home/loongson/runtime/src/tests/build.proj(438,5): error MSB3073: 命令“"/home/loongson/runtime/.dotnet/dotnet" restore -r linux-loongarch64 Common/test_dependencies_fs/test_dependencies.fsproj  /p:SetTFMForRestore=true /p:TargetOS=Linux /p:TargetArchitecture=loongarch64 /p:Configuration=Debug /p:CrossBuild=”已退出,代码为 1。
    0 个警告
    2 个错误

已用时间 00:00:25.87
Build failed with exit code 1. Check errors above.
Failed to build tests. See the build logs:
    /home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.log
    /home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.wrn
    /home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.err
    /home/loongson/runtime/artifacts/log/TestBuild.Linux.loongarch64.Debug.binlog

is there a way how I can use Microsoft.NETCore.App.Runtime.linux-loongarch64 from local build.

Author: kant2002
Assignees: -
Labels:

area-Infrastructure-coreclr, untriaged

Milestone: -

@kant2002
Copy link
Contributor Author

I customize src/tests/build.proj to use that location as additional restore source, but it require version of that package to match version of runtime from .dotnet folder

@AaronRobinsonMSFT AaronRobinsonMSFT removed the untriaged New issue has not been triaged by the area owner label Nov 25, 2022
@AaronRobinsonMSFT AaronRobinsonMSFT added this to the Future milestone Nov 25, 2022
@kant2002
Copy link
Contributor Author

Actually after I add additional package source to the build, I receive another error

/home/loongson/runtime/src/tests/Common/ilasm/ilasm.ilproj : error NU1603: ilasm depends on runtime.linux-loongarch64.Microsoft.NETCore.ILAsm (>= 8.0.0-alpha.1.22559.2) but runtime.linux-loongarch64.Microsoft.NETCore.ILAsm 8.0.0-alpha.1.22559.2 was not found. An approximate best match of runtime.linux-loongarch64.Microsoft.NETCore.ILAsm 8.0.0-dev was resolved. [/home/loongson/runtime/src/tests/build.proj]
/home/loongson/runtime/src/tests/Common/ilasm/ilasm.ilproj : error NU1603: ilasm depends on runtime.linux-loongarch64.Microsoft.NETCore.ILDAsm (>= 8.0.0-alpha.1.22559.2) but runtime.linux-loongarch64.Microsoft.NETCore.ILDAsm 8.0.0-alpha.1.22559.2 was not found. An approximate best match of runtime.linux-loongarch64.Microsoft.NETCore.ILDAsm 8.0.0-dev was resolved. [/home/loongson/runtime/src/tests/build.proj]
/home/loongson/runtime/src/tests/build.proj(440,5): error MSB3073: 命令“"/home/loongson/runtime/.dotnet/dotnet" restore -r linux-loongarch64 Common/ilasm/ilasm.ilproj  /p:SetTFMForRestore=true /p:TargetOS=Linux /p:TargetArchitecture=loongarch64 /p:Configuration=Debug /p:CrossBuild= /p:RestoreAdditionalProjectSources=/home/loongson/runtime/artifacts/packages/Debug/”已退出, 代码为 1。

so after I patch ilasm.ilproj to ignore this Nuget warnig, I was able to produce test layout. So that's great.

kant2002 added a commit to kant2002/runtime that referenced this issue Nov 30, 2022
Workaround for dotnet#78854
Basically feed built packages from `./build.sh packs` into test layout build process.
@shushanhf
Copy link
Contributor

Sorry for late response.
Right now building the runtime directly on LA is depends on the lots of nugets.
We have to build the whole runtime directly untile the nugets supports LA.

As the plan within #69705 , the testing pipeline for LA maybe in 2023 Q2 or Q3.

So we have to debug the runtime8 by the CoreRoot which liking our previous discusses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants