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

VS2022 project build failed #6682

Closed
TheArheus opened this issue Jun 9, 2024 · 5 comments
Closed

VS2022 project build failed #6682

TheArheus opened this issue Jun 9, 2024 · 5 comments
Labels
needs-triage Awaiting triage user-support Issues from users requesting support.

Comments

@TheArheus
Copy link

TheArheus commented Jun 9, 2024

Hi, I have an issues with building using vs2022. While building, there is this kind of errors:

MSBuild version 17.10.4+10fbfbf2e for .NET Framework

  Checking Build System
  Building DxcDisassembler.inc...
  Building Custom Rule C:/DirectXShaderCompiler/tools/clang/tools/dxcompiler/CMakeLists.txt
  Updating DxcDisassembler.inc...
  Verifying clang-format results...
  Building instrumentation manifest ...
  Generating version.inc.gen
  Generating version
  Building DxilValidation.inc...
  Building Custom Rule C:/DirectXShaderCompiler/projects/include/Tracing/CMakeLists.txt
  Building DxcOptimizer.inc...
  Building DxilInstructions.h...
  Building DxilConstants.h...
  Building docs/DXIL.rst...
  Building DxilCounters.h...
  Building DxilMetadataHelper.cpp...
  Building DxilSigPoint.inl...
  Updating instrumentation manifest ...
  Building DxilShaderModel.h...
  Building gen_intrin_main_tables_15.h...
  Building DxilShaderModel.cpp...
  Building DxilValidationImpl.inc...
  Building DxilOperations.cpp...
  Building DxilPIXPasses.inc...
  Building Custom Rule C:/DirectXShaderCompiler/include/dxc/HLSL/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/lib/HLSL/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/include/dxc/DXIL/CMakeLists.txt
  Updating DxilValidation.inc...
  Building Custom Rule C:/DirectXShaderCompiler/include/dxc/DXIL/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/lib/HLSL/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/lib/DxilPIXPasses/CMakeLists.txt
  Updating DxcOptimizer.inc...
  Building Custom Rule C:/DirectXShaderCompiler/include/dxc/DXIL/CMakeLists.txt
  Verifying clang-format results...
  Building Custom Rule C:/DirectXShaderCompiler/include/dxc/DXIL/CMakeLists.txt
  Verifying clang-format results...
  Verifying clang-format results...
  Verifying clang-format results...
  Updating DxilPIXPasses.inc...
  Updating DxilValidationImpl.inc...
  Verifying clang-format results...
  Verifying clang-format results...
  Verifying clang-format results...
  Verifying clang-format results...
  Verifying clang-format results...
  Building Custom Rule C:/DirectXShaderCompiler/lib/DXIL/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/utils/version/CMakeLists.txt
  Building HlslIntrinsicOp.h...
  Verifying clang-format results...
  Building HLSLOptions.td...
  Building Custom Rule C:/DirectXShaderCompiler/lib/DXIL/CMakeLists.txt
  Building RDAT_LibraryTypes.inl...
  Verifying clang-format results...
  Building Custom Rule C:/DirectXShaderCompiler/include/dxc/Support/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/lib/MSSupport/CMakeLists.txt
  Verifying clang-format results...
  Building Custom Rule C:/DirectXShaderCompiler/lib/TableGen/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/include/dxc/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/include/dxc/DxilContainer/CMakeLists.txt
  Verifying clang-format results...
  Touch GetCommitInfo.py to trigger rebuild
  Generating dxcversion.inc.gen
  Generating version
  Verifying clang-format results...
  Building Custom Rule C:/DirectXShaderCompiler/tools/clang/lib/Basic/CMakeLists.txt
  MSFileSystemImpl.cpp
  Error.cpp
  Main.cpp
  Record.cpp
  SetTheory.cpp
  StringMatcher.cpp
  TableGenBackend.cpp
  TGLexer.cpp
  TGParser.cpp
  Building Custom Rule C:/DirectXShaderCompiler/include/dxc/DXIL/CMakeLists.txt
  Building instrumentation manifest ...
  Verifying clang-format results...
  Building Custom Rule C:/DirectXShaderCompiler/include/dxc/Tracing/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/lib/DXIL/CMakeLists.txt
  Verifying clang-format results...
  Updating instrumentation manifest ...
  dndxc -> C:\DirectXShaderCompiler.bin\Debug\bin\dndxc.exe
C:\DirectXShaderCompiler\include\dxc\Support\WinIncludes.h(44,10): error C1083: Cannot open include file: 'atlbase.h': No such file or directory [C:\Direct
XShaderCompiler.bin\lib\MSSupport\LLVMMSSupport.vcxproj]
  Building Custom Rule C:/DirectXShaderCompiler/utils/version/CMakeLists.txt
  LLVMTableGen.vcxproj -> C:\DirectXShaderCompiler.bin\Debug\lib\LLVMTableGen.lib
  Building Custom Rule C:/DirectXShaderCompiler/tools/clang/lib/Sema/CMakeLists.txt
  Updating gen_intrin_main_tables_15.h...
  Verifying clang-format results...
  Building Custom Rule C:/DirectXShaderCompiler/include/dxc/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/utils/unittest/UnitTestMain/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/utils/unittest/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/projects/dxilconv/lib/DxilConvPasses/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/lib/Option/CMakeLists.txt
  TestMain.cpp
  Building Custom Rule C:/DirectXShaderCompiler/utils/count/CMakeLists.txt
  Building Custom Rule C:/DirectXShaderCompiler/tools/dxexp/CMakeLists.txt
  NormalizeDxil.cpp
  ScopeNestedCFG.cpp
  InitializePasses.cpp
  ScopeNestInfo.cpp
  DxilCleanup.cpp
  Building Custom Rule C:/DirectXShaderCompiler/projects/dxilconv/lib/ShaderBinary/CMakeLists.txt
  gtest-all.cc
  gmock-all.cc
  Arg.cpp
  ArgList.cpp
  Option.cpp
  OptTable.cpp
  ShaderBinary.cpp
  dxexp.cpp
  count.c
C:\DirectXShaderCompiler\tools\dxexp\dxexp.cpp(16,10): error C1083: Cannot open include file: 'atlbase.h': No such file or directory [C:\DirectXShaderCompi
ler.bin\tools\dxexp\dxexp.vcxproj]
  count.vcxproj -> C:\DirectXShaderCompiler.bin\Debug\bin\count.exe
  LLVMOption.vcxproj -> C:\DirectXShaderCompiler.bin\Debug\lib\LLVMOption.lib
C:\DirectXShaderCompiler\include\dxc\Support\WinIncludes.h(44,10): error C1083: Cannot open include file: 'atlbase.h': No such file or directory [C:\Direct
XShaderCompiler.bin\projects\dxilconv\lib\DxilConvPasses\DxilConvPasses.vcxproj]
  ShaderBinary.vcxproj -> C:\DirectXShaderCompiler.bin\Debug\lib\ShaderBinary.lib
  gtest_main.vcxproj -> C:\DirectXShaderCompiler.bin\Debug\lib\gtest_main.lib
  gtest.vcxproj -> C:\DirectXShaderCompiler.bin\Debug\lib\gtest.lib

cmake-log.txt

I've tried to configure the project with both cmake and hctstart, but it make no changes in building, there is still errors for includes.

Also, this issue only happened on windows, on linux there is no issue. So, I guess, on windows there is just an issue with generating LLVM.sln or something because it totally doesn't see anything related to llvm

@TheArheus TheArheus added needs-triage Awaiting triage user-support Issues from users requesting support. labels Jun 9, 2024
@llvm-beanz
Copy link
Collaborator

@TheArheus atlbase.h comes as part of the Visual Studio "Visual C++ ATL Support" add-on for visual studio. You can install that through the visual studio installer. See this Stack Overflow answer for more details: https://stackoverflow.com/a/46304843.

If that doesn't resolve your issue please re-open this issue.

@llvm-beanz llvm-beanz closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2024
@TheArheus
Copy link
Author

TheArheus commented Jun 10, 2024

@llvm-beanz, The thing is that I have everything installed already: visual studio modules v143(atl also was already installed at the time), win sdk and wdk ver 10.0.22621.0. I wish it would help, but I wouldn't create the issue if I hadn't check for that. Also tried to reinstall the modules and sdk, the issue is still remains. I don't know why it cannot see the things to build the project:

96>------ Build started: Project: ClangDiagnosticAST, Configuration: Release x64 ------
45>eliminate_dead_io_components_pass.cpp
89>C:\DirectXShaderCompiler\include\llvm\IR\Intrinsics.h(40,10): error C1083: Cannot open include file: 'llvm/IR/Intrinsics.gen': No such file or directory
89>LazyValueInfo.cpp
92>C:\DirectXShaderCompiler\include\dxc\Support\WinIncludes.h(44,10): error C1083: Cannot open include file: 'atlbase.h': No such file or directory
92>C:\DirectXShaderCompiler\include\dxc\Support\WinIncludes.h(44,10): error C1083: Cannot open include file: 'atlbase.h': No such file or directory
92>DxilDiaTableInputAssemblyFile.cpp
92>DxilDiaTableLineNumbers.cpp
92>C:\DirectXShaderCompiler\include\dxc\Support\WinIncludes.h(44,10): error C1083: Cannot open include file: 'atlbase.h': No such file or directory
89>LibCallAliasAnalysis.cpp
92>C:\DirectXShaderCompiler\include\dxc\Support\WinIncludes.h(44,10): error C1083: Cannot open include file: 'atlbase.h': No such file or directory
92>DxilDiaTableSections.cpp
92>C:\DirectXShaderCompiler\include\dxc\Support\WinIncludes.h(44,10): error C1083: Cannot open include file: 'atlbase.h': No such file or directory
92>DxilDiaTableSegmentMap.cpp
45>eliminate_dead_members_pass.cpp
92>DxilDiaTableSourceFiles.cpp
92>C:\DirectXShaderCompiler\include\dxc\Support\WinIncludes.h(44,10): error C1083: Cannot open include file: 'atlbase.h': No such file or directory
45>eliminate_dead_output_stores_pass.cpp
92>C:\DirectXShaderCompiler\include\dxc\Support\WinIncludes.h(44,10): error C1083: Cannot open include file: 'atlbase.h': No such file or directory
81>Done building project "LLVMDxilCompression.vcxproj" -- FAILED.

And the rule fail:

Error	MSB8066	Custom build for 'C:\DirectXShaderCompiler.bin\CMakeFiles\cb7f3b97dd901a5e35b234d5e177d851\AttrPCHWrite.inc.tmp.rule;C:\DirectXShaderCompiler.bin\CMakeFiles\cb7f3b97dd901a5e35b234d5e177d851\AttrPCHWrite.inc.rule;C:\DirectXShaderCompiler.bin\CMakeFiles\a913bedd23636a962ae8753702c4bdd4\ClangAttrPCHWrite.rule' exited with code 9009.	ClangAttrPCHWrite	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets	254		

@llvm-beanz
Copy link
Collaborator

Can you verify that your visual studio installation includes "Visual C++ ATL Support"?

@TheArheus
Copy link
Author

TheArheus commented Jun 11, 2024

@llvm-beanz yeah, definetly:

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\atlmfc\include
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\UnitTest\include
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um

So, I've checked if the library was actually there, and I didn't found it even though it was installed(don't know why). I decided to copy it from sdk and the build was succesful

@devshgraphicsprogramming

@AnastaZIuk this might affect you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Awaiting triage user-support Issues from users requesting support.
Projects
Archived in project
Development

No branches or pull requests

3 participants