Fixing DIA related issues in LLVM unit tests

1

I'm trying to build LLVM and run the unit tests, but I get multiple unit test errors. The failures have errors like the following

  $ ":" "RUN: at line 1"
  $ "c:\users\xxx\documents\llvm-project\build\release\bin\llvm-pdbutil.exe" "pretty" "C:\Users\xxx\Documents\llvm-project\llvm\test\DebugInfo\PDB\DIA/../Inputs/empty.pdb"
  # command stderr:
  llvm-pdbutil: An unknown error has occurred. HRESULT: 0x800700C1: Calling NoRegCoCreate

I've done a little digging and apparently this is something to do with the Debug Information Access SDK, but I don't know much about that.

I've seen this question, however the answers to that question suggest setting the VSINSTALLDIR environment variable and I do have that variable correctly set.

Any ideas on how to fix these errors? I presume it's something in my environment but I've no idea what to look for.

Background info: I'm on windows 7 64 bit, using Visual Studio 2017.

The is the command I used to generate the VS projects

cmake -G "Visual Studio 15 2017" -A x64 -T host=x64 -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;compiler-rt;lld" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_LIT_TOOLS_DIR="C:/Users/xxx/Documents/GnuWin32/bin" -DCMAKE_INSTALL_PREFIX="C:\Users\xxx\Documents\llvm" ../llvm

This is the command I used to build

msbuild .\ALL_BUILD.vcxproj -m:1 -p:Configuration=Release -fl2 -flp2:Verbosity=quiet

and this is the command I used to run the tests

msbuild .\check-all.vcxproj -m:1 -p:Configuration=Release -fl4 -flp4:Verbosity=normal

All commands were run from inside the VS 2017 developer command prompt.

visual-studio-2017
llvm
asked on Stack Overflow Jul 15, 2019 by john • edited Jul 15, 2019 by john

1 Answer

1

Solved this. The version of msdia140.dll supplied with VS 2017 is a 32-bit one. Using a 64-bit version works fine.

answered on Stack Overflow Jul 15, 2019 by john

User contributions licensed under CC BY-SA 3.0