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

[8.0] Failing to build native components #94823

Closed
carlossanlop opened this issue Nov 16, 2023 · 9 comments
Closed

[8.0] Failing to build native components #94823

carlossanlop opened this issue Nov 16, 2023 · 9 comments
Labels
area-Infrastructure-coreclr Known Build Error Use this to report build issues in the .NET Helix tab
Milestone

Comments

@carlossanlop
Copy link
Member

carlossanlop commented Nov 16, 2023

The release/8.0 branch is currently hitting this build error in multiple PRs like this arcade codeflow: #94792

I see at least 3 different error messages.

dotnet-linker windows-x64 release Runtime_Release

...
  Processing C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\oaidl.acf
  oaidl.acf
  Processing C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\ocidl.acf
  ocidl.acf
  waiting for D:/a/_work/1/s/artifacts/obj/win-x64.Release/corehost/test/typelibs\dlldata.c ...
  
  ninja: build stopped: subcommand failed.
  Failed to generate native component build project!
D:\a\_work\1\s\src\native\corehost\corehost.proj(159,5): error MSB3073: The command ""D:\a\_work\1\s\src\native\corehost\build.cmd" Release x64 commit eecd22f78b4b093807d3c73d5b4f3d777c841338 outputrid win-x64 portable incremental-native-build rootdir D:\a\_work\1\s\ runtimeflavor CoreCLR runtimeconfiguration Release" exited with code 1.
##[error]src\native\corehost\corehost.proj(159,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command ""D:\a\_work\1\s\src\native\corehost\build.cmd" Release x64 commit eecd22f78b4b093807d3c73d5b4f3d777c841338 outputrid win-x64 portable incremental-native-build rootdir D:\a\_work\1\s\ runtimeflavor CoreCLR runtimeconfiguration Release" exited with code 1.

Build FAILED.

runtime CoreCLR Product Build windows x64 checked

- Output:
...
[244/367] Building CXX object Interop\IJW\IjwNativeCallingManagedDll\CMakeFiles\IjwNativeCallingManagedDll.dir\IjwNativeCallingManagedDll.cpp.obj
[245/367] Building CXX object Interop\COM\ComWrappers\WeakReference\CMakeFiles\WeakReferenceNative.dir\WeakReferenceNative.cpp.obj
[246/367] Building CXX object Interop\COM\ComWrappers\MockReferenceTrackerRuntime\CMakeFiles\MockReferenceTrackerRuntime.dir\ReferenceTrackerRuntime.cpp.obj
[247/367] Linking CXX shared library JIT\Directed\Convert\out_of_range_fp_to_int_conversionsnative.dll
[248/367] Linking CXX shared library Interop\IJW\ijwhostmock\ijwhost.dll
ninja: build stopped: subcommand failed.
BUILDTEST: Error: native test build failed.
##[error]Cmd.exe exited with code '1'.

runtime windows-arm64 Release NativeAOT_Libraries

 D:\a\_work\1\s\src\native\corehost\test\ijw\ijw.cpp(22): note: This diagnostic occurred while importing type 'System::Decimal' from assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
  [187/206] Building CXX object comhost\CMakeFiles\comhost.dir\__\hostmisc\longfile.windows.cpp.obj
  [188/206] Linking CXX executable test\nativehost\nativehost.exe
  [189/206] Building CXX object comhost\CMakeFiles\comhost.dir\__\hostmisc\pal.windows.cpp.obj
  [190/206] Building CXX object ijwhost\CMakeFiles\ijwhost.dir\ijwthunk.cpp.obj
  [191/206] Building CXX object ijwhost\CMakeFiles\ijwhost.dir\ijwhost.cpp.obj
  ninja: build stopped: subcommand failed.
  Failed to generate native component build project!
D:\a\_work\1\s\src\native\corehost\corehost.proj(159,5): error MSB3073: The command ""D:\a\_work\1\s\src\native\corehost\build.cmd" Release arm64 commit eecd22f78b4b093807d3c73d5b4f3d777c841338 outputrid win-arm64 portable incremental-native-build rootdir D:\a\_work\1\s\ runtimeflavor CoreCLR runtimeconfiguration Release" exited with code 1.
##[error]src\native\corehost\corehost.proj(159,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command ""D:\a\_work\1\s\src\native\corehost\build.cmd" Release arm64 commit eecd22f78b4b093807d3c73d5b4f3d777c841338 outputrid win-arm64 portable incremental-native-build rootdir D:\a\_work\1\s\ runtimeflavor CoreCLR runtimeconfiguration Release" exited with code 1.

Build FAILED.

D:\a\_work\1\s\src\native\corehost\corehost.proj(159,5): error MSB3073: The command ""D:\a\_work\1\s\src\native\corehost\build.cmd" Release arm64 commit eecd22f78b4b093807d3c73d5b4f3d777c841338 outputrid win-arm64 portable incremental-native-build rootdir D:\a\_work\1\s\ runtimeflavor CoreCLR runtimeconfiguration Release" exited with code 1.
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:11:53.21
Build failed with exit code 1. Check errors above.
{
  "ErrorMessage": "ninja: build stopped: subcommand failed.",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": true
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=471724
Error message validated: ninja: build stopped: subcommand failed.
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 11/16/2023 2:08:57 AM UTC

Report

Build Definition Step Name Console log Pull Request
571134 dotnet/runtime Build CLR and Libraries Log
571133 dotnet/runtime Build CLR and Libraries Log
570767 dotnet/runtime Build CoreCLR Runtime Log #95565
570580 dotnet/runtime Build CLR and Libraries Log
570579 dotnet/runtime Build CLR and Libraries Log
570289 dotnet/runtime Build CoreCLR Runtime Log #98336
570201 dotnet/runtime Build CoreCLR Runtime Log #98258
570010 dotnet/runtime Build product Log #98397
570057 dotnet/runtime Build product Log #97135
570024 dotnet/runtime Build product Log
2381329 dotnet-runtime Build product Log
569974 dotnet/runtime Build product Log #97529
569943 dotnet/runtime Build product Log #98569
569936 dotnet/runtime Build product Log #91764
569928 dotnet/runtime Build product Log #98129
569900 dotnet/runtime Build product Log #98508
569732 dotnet/runtime Build product Log #98510
2381150 dotnet-runtime Build product Log
569667 dotnet/runtime Build product Log #98446
569601 dotnet/runtime Build product Log #98514
2381076 dotnet-runtime Build product Log
569339 dotnet/runtime Build CLR and Libraries Log
569340 dotnet/runtime Build CLR and Libraries Log
568770 dotnet/runtime Build product Log #98532
568140 dotnet/runtime Build CoreCLR Runtime Log #97079
567732 dotnet/runtime Build CLR and Libraries Log
567733 dotnet/runtime Build CLR and Libraries Log
567388 dotnet/runtime Build product Log #98250
566342 dotnet/runtime Build product Log #98118
566127 dotnet/runtime Build product Log #97865
565962 dotnet/runtime Build CLR and Libraries Log
565961 dotnet/runtime Build CLR and Libraries Log
565957 dotnet/runtime Build CLR and Libraries Log
565956 dotnet/runtime Build CLR and Libraries Log
565876 dotnet/runtime Build CoreCLR JIT Log #98409
565873 dotnet/runtime Build CoreCLR Runtime Log #98409
565877 dotnet/runtime Build CoreCLR JIT Log #98409
565305 dotnet/runtime Build product Log #89204
565003 dotnet/runtime Build product Log #89204
564782 dotnet/runtime Build CoreCLR Runtime Log #98336
564783 dotnet/runtime Build product Log #98336
564607 dotnet/runtime Build product Log #98118
564305 dotnet/runtime Build CLR and Libraries Log
564302 dotnet/runtime Build CLR and Libraries Log
564299 dotnet/runtime Build CLR and Libraries Log
564303 dotnet/runtime Build CLR and Libraries Log
562502 dotnet/runtime Build CLR and Libraries Log
562498 dotnet/runtime Build CLR and Libraries Log
562499 dotnet/runtime Build CLR and Libraries Log
562500 dotnet/runtime Build CLR and Libraries Log
561871 dotnet/runtime Build CLR and Libraries Log
561870 dotnet/runtime Build CLR and Libraries Log
561872 dotnet/runtime Build CLR and Libraries Log
561873 dotnet/runtime Build CLR and Libraries Log
561765 dotnet/runtime Build CoreCLR Runtime Log #98261
561769 dotnet/runtime Build CoreCLR JIT Log #98261
561768 dotnet/runtime Build CoreCLR JIT Log #98261
561767 dotnet/runtime Build product Log #98261
561766 dotnet/runtime Build product Log #98261
561509 dotnet/runtime Build CLR and Libraries Log
561508 dotnet/runtime Build CLR and Libraries Log
561511 dotnet/runtime Build CLR and Libraries Log
561510 dotnet/runtime Build CLR and Libraries Log
561175 dotnet/runtime Build product Log #98250
560760 dotnet/runtime Build product Log #98118
560759 dotnet/runtime Build product Log #98118
560082 dotnet/runtime Build CLR and Libraries Log
560081 dotnet/runtime Build CLR and Libraries Log
560077 dotnet/runtime Build CLR and Libraries Log
560078 dotnet/runtime Build CLR and Libraries Log
559517 dotnet/runtime Build product Log #97096
559207 dotnet/runtime Build CoreCLR Runtime Log #98189
559209 dotnet/runtime Build product Log #98189
559104 dotnet/runtime Build product Log #98077
558520 dotnet/runtime Build CLR and Libraries Log
558519 dotnet/runtime Build CLR and Libraries Log
558523 dotnet/runtime Build CLR and Libraries Log
558524 dotnet/runtime Build CLR and Libraries Log
558495 dotnet/runtime Build product Log #98154
557841 dotnet/runtime Build product Log #98077
557670 dotnet/runtime Build product Log #97789
557360 dotnet/runtime Build product Log #98118
556932 dotnet/runtime Build CLR and Libraries Log
556926 dotnet/runtime Build CLR and Libraries Log
556933 dotnet/runtime Build CLR and Libraries Log
556927 dotnet/runtime Build CLR and Libraries Log
555832 dotnet/runtime Build CoreCLR JIT Log #98048
555831 dotnet/runtime Build CoreCLR JIT Log #98048
555828 dotnet/runtime Build CoreCLR Runtime Log #98048
555829 dotnet/runtime Build product Log #98048
555830 dotnet/runtime Build product Log #98048
555639 dotnet/runtime Build CoreCLR JIT Log #98048
555637 dotnet/runtime Build product Log #98048
555638 dotnet/runtime Build product Log #98048
555004 dotnet/runtime Build CLR and Libraries Log
555005 dotnet/runtime Build CLR and Libraries Log
555001 dotnet/runtime Build CLR and Libraries Log
555000 dotnet/runtime Build CLR and Libraries Log
554412 dotnet/runtime Build product Log #97959
554414 dotnet/runtime Build product Log #97959
Displaying 100 of 252 results

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
2 50 252
@ghost
Copy link

ghost commented Nov 16, 2023

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

Issue Details

Error Blob

{
  "ErrorMessage": "",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": true
}

Reproduction Steps

The release/8.0 branch is currently hitting this build error in multiple PRs like this arcade codeflow: #94792

I see at least 3 different error messages.

dotnet-linker windows-x64 release Runtime_Release

...
  Processing C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\oaidl.acf
  oaidl.acf
  Processing C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\ocidl.acf
  ocidl.acf
  waiting for D:/a/_work/1/s/artifacts/obj/win-x64.Release/corehost/test/typelibs\dlldata.c ...
  
  ninja: build stopped: subcommand failed.
  Failed to generate native component build project!
D:\a\_work\1\s\src\native\corehost\corehost.proj(159,5): error MSB3073: The command ""D:\a\_work\1\s\src\native\corehost\build.cmd" Release x64 commit eecd22f78b4b093807d3c73d5b4f3d777c841338 outputrid win-x64 portable incremental-native-build rootdir D:\a\_work\1\s\ runtimeflavor CoreCLR runtimeconfiguration Release" exited with code 1.
##[error]src\native\corehost\corehost.proj(159,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command ""D:\a\_work\1\s\src\native\corehost\build.cmd" Release x64 commit eecd22f78b4b093807d3c73d5b4f3d777c841338 outputrid win-x64 portable incremental-native-build rootdir D:\a\_work\1\s\ runtimeflavor CoreCLR runtimeconfiguration Release" exited with code 1.

Build FAILED.

runtime CoreCLR Product Build windows x64 checked

- Output:
...
[244/367] Building CXX object Interop\IJW\IjwNativeCallingManagedDll\CMakeFiles\IjwNativeCallingManagedDll.dir\IjwNativeCallingManagedDll.cpp.obj
[245/367] Building CXX object Interop\COM\ComWrappers\WeakReference\CMakeFiles\WeakReferenceNative.dir\WeakReferenceNative.cpp.obj
[246/367] Building CXX object Interop\COM\ComWrappers\MockReferenceTrackerRuntime\CMakeFiles\MockReferenceTrackerRuntime.dir\ReferenceTrackerRuntime.cpp.obj
[247/367] Linking CXX shared library JIT\Directed\Convert\out_of_range_fp_to_int_conversionsnative.dll
[248/367] Linking CXX shared library Interop\IJW\ijwhostmock\ijwhost.dll
ninja: build stopped: subcommand failed.
BUILDTEST: Error: native test build failed.
##[error]Cmd.exe exited with code '1'.

runtime windows-arm64 Release NativeAOT_Libraries

 D:\a\_work\1\s\src\native\corehost\test\ijw\ijw.cpp(22): note: This diagnostic occurred while importing type 'System::Decimal' from assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
  [187/206] Building CXX object comhost\CMakeFiles\comhost.dir\__\hostmisc\longfile.windows.cpp.obj
  [188/206] Linking CXX executable test\nativehost\nativehost.exe
  [189/206] Building CXX object comhost\CMakeFiles\comhost.dir\__\hostmisc\pal.windows.cpp.obj
  [190/206] Building CXX object ijwhost\CMakeFiles\ijwhost.dir\ijwthunk.cpp.obj
  [191/206] Building CXX object ijwhost\CMakeFiles\ijwhost.dir\ijwhost.cpp.obj
  ninja: build stopped: subcommand failed.
  Failed to generate native component build project!
D:\a\_work\1\s\src\native\corehost\corehost.proj(159,5): error MSB3073: The command ""D:\a\_work\1\s\src\native\corehost\build.cmd" Release arm64 commit eecd22f78b4b093807d3c73d5b4f3d777c841338 outputrid win-arm64 portable incremental-native-build rootdir D:\a\_work\1\s\ runtimeflavor CoreCLR runtimeconfiguration Release" exited with code 1.
##[error]src\native\corehost\corehost.proj(159,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command ""D:\a\_work\1\s\src\native\corehost\build.cmd" Release arm64 commit eecd22f78b4b093807d3c73d5b4f3d777c841338 outputrid win-arm64 portable incremental-native-build rootdir D:\a\_work\1\s\ runtimeflavor CoreCLR runtimeconfiguration Release" exited with code 1.

Build FAILED.

D:\a\_work\1\s\src\native\corehost\corehost.proj(159,5): error MSB3073: The command ""D:\a\_work\1\s\src\native\corehost\build.cmd" Release arm64 commit eecd22f78b4b093807d3c73d5b4f3d777c841338 outputrid win-arm64 portable incremental-native-build rootdir D:\a\_work\1\s\ runtimeflavor CoreCLR runtimeconfiguration Release" exited with code 1.
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:11:53.21
Build failed with exit code 1. Check errors above.
Author: carlossanlop
Assignees: -
Labels:

area-Infrastructure-coreclr

Milestone: 8.0.x

@carlossanlop carlossanlop added the Known Build Error Use this to report build issues in the .NET Helix tab label Nov 16, 2023
@build-analysis build-analysis bot removed this from the 8.0.x milestone Nov 16, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Nov 16, 2023
@lewing
Copy link
Member

lewing commented Nov 16, 2023

#94723

@akoeplinger
Copy link
Member

This was worked around by bumping to the windows.vs2022preview.amd64 build image.

@akoeplinger akoeplinger added this to the 8.0.x milestone Nov 24, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Nov 24, 2023
@khushal1996
Copy link
Contributor

Anyone found how can I compile coreclr without hitting this error? or do i revert back to a commit for now?

@akoeplinger
Copy link
Member

@khushal1996 make sure you use latest Visual Studio.

@khushal1996
Copy link
Contributor

@khushal1996 make sure you use latest Visual Studio.

Thanks. It worked.

@carlossanlop
Copy link
Member Author

Seems we are hitting this in 7.0 too. Example: #96778

@matouskozak
Copy link
Member

matouskozak commented Feb 19, 2024

The error message (ninja: build stopped: subcommand failed.) is too general and it is matching unrelated failures such as

C:\PROGRA~1\MICROS~1\2022\Preview\VC\Tools\MSVC\1439~1.333\bin\Hostx86\arm64\cl.exe  /nologo -DHAVE_CONFIG_H -DLLVM_API_VERSION=1600 -DNO_GLOBALIZATION_SHIM -ID:\a\_work\1\s\artifacts\obj -ID:\a\_work\1\s\src\native -ID:\a\_work\1\s\artifacts\obj\mono\android.arm64.Release\cross\mono\mini -ID:\a\_work\1\s\artifacts\obj\mono\android.arm64.Release\cross\mono\mini\..\.. -ID:\a\_work\1\s\src\mono\mono\mini\..\.. -ID:\a\_work\1\s\src\mono\mono\mini\.. -ID:\a\_work\1\s\src\mono\mono\mini\..\eventpipe -ID:\a\_work\1\s\artifacts\obj\mono\android.arm64.Release\cross\mono\mini\eventpipe -ID:\a\_work\1\s\src\native\public\. -ID:\a\_work\1\s\artifacts\obj\mono\android.arm64.Release\cross\mono\eglib -ID:\a\_work\1\s\src\mono\mono\eglib -external:ID:\a\_work\1\s\artifacts\obj\mono\android.arm64.Release\llvm\arm64\include -external:W0 -DHOST_WIN32 -D__WIN32__ -DWIN32 -DWIN32_LEAN_AND_MEAN -DWIN64 -DUSE_SOFT_INTRINSICS -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_THREADS -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DFD_SETSIZE=1024 -DNVALGRIND -ID:\a\_work\1\s\artifacts\obj\mono\android.arm64.Release\llvm\\arm64/include -D__STDC_CONSTANT_MACROS -D__STD_FORMAT_MACROS -D__STDC_LIMIT_MACROS /O2 /Ob2 /DNDEBUG -std:c11 -MT /source-charset:utf-8 /wd4100 /wd4702 /wd4706 /wd4245 /wd4389 /W4 /WX /wd4324 /EHsc /FC /Oi /GF /GL /Zi -O2 /showIncludes /Fomono\mini\CMakeFiles\monosgen-objects.dir\mini-llvm.c.obj /Fdmono\mini\CMakeFiles\monosgen-objects.dir\ /FS -c D:\a\_work\1\s\src\mono\mono\mini\mini-llvm.c
  D:\a\_work\1\s\src\mono\mono\mini\mini-llvm.c(11638): error C2220: the following warning is treated as an error
  D:\a\_work\1\s\src\mono\mono\mini\mini-llvm.c(11638): warning C4018: '<': signed/unsigned mismatch
  D:\a\_work\1\s\src\mono\mono\mini\mini-llvm.c(11653): warning C4018: '<': signed/unsigned mismatch
  [278/354] Building RC object mono\mini\CMakeFiles\monosgen-objects.dir\D_\a\_work\1\s\artifacts\obj\NativeVersion.rc.res
  [279/354] Building CXX object mono\mini\CMakeFiles\monosgen-objects.dir\llvm-runtime.cpp.obj
  cl : Command line warning D9002 : ignoring unknown option '-fno-exceptions'
  cl : Command line warning D9002 : ignoring unknown option '-fno-rtti'
  [280/354] Building C object mono\mini\CMakeFiles\monosgen-objects.dir\debugger-agent-external.c.obj
  [281/354] Building CXX object mono\mini\CMakeFiles\monosgen-objects.dir\llvm-jit.cpp.obj
  cl : Command line warning D9002 : ignoring unknown option '-fno-exceptions'
  cl : Command line warning D9002 : ignoring unknown option '-fno-rtti'
  [282/354] Building CXX object mono\mini\CMakeFiles\monosgen-objects.dir\mini-llvm-cpp.cpp.obj
  cl : Command line warning D9002 : ignoring unknown option '-fno-exceptions'
  cl : Command line warning D9002 : ignoring unknown option '-fno-rtti'
  ninja: build stopped: subcommand failed.

from https://dev.azure.com/dnceng-public/public/_build/results?buildId=568770&view=logs&jobId=8bc6aff5-1400-5bca-e671-ee99bfbeafc5&j=8bc6aff5-1400-5bca-e671-ee99bfbeafc5&t=81713026-4c8d-5b63-02ce-dd6e5e4b94da. Is this issue still active or could we close it?

@akoeplinger
Copy link
Member

I agree that this error message pattern is way too broad since it'd match any native build error.
I also don't see the original issue in 8.0 anymore so let's close this and open more specific issues for new build errors.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-coreclr Known Build Error Use this to report build issues in the .NET Helix tab
Projects
None yet
Development

No branches or pull requests

5 participants