[llvm-dev] can't build/run after adding lib to Fibonacci example, even reverting the complete llvm tree does not help

Dennis Luehring via llvm-dev llvm-dev at lists.llvm.org
Fri Sep 21 06:55:53 PDT 2018


my build environment:

Win7 x64
VStudio 2017 Community Edition 15.8.4 (latest)
CMake 3.12.1 (x86)
git 2.19.0 (latest, x64)
Python 2.7.2 (x86)
x64 Native Tools Command Prompt for VS 2017

directory structure:

test
     llvm <-- git clone https://github.com/llvm-mirror/llvm, git checkout
release_70
       tools
         clang <-- git clone https://github.com/llvm-mirror/clang, git
checkout release_70
     llvm_build

build steps:

cd llvm_build
cmake -Thost=x64 -G "Visual Studio 15 2017 Win64"
-DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_EXAMPLES=1
-DCLANG_BUILD_EXAMPLES=1 -DLLVM_INCLUDE_TESTS=OFF
-DLLVM_INCLUDE_DOCS=OFF ..\llvm
cmake --build . --config Debug

after building i open llvm-build\LLVM.sln in VS2017 ... loading 273 projects

question1: if left click on the solution root and select "build
solution" (to check if everyhing is built) two files
DummyClangFuzzer.cpp and ClangFuzzer.cpp getting compiled - is that
indendet?

then i want to add some tests to the Fibonacci example and added
IRReader to llvm\examples\Fibonacci\CMakeLists.txt

set(LLVM_LINK_COMPONENTS
    Core
    ExecutionEngine
    Interpreter
    MC
    MCJIT
    Support
    nativecodegen
    IRReader # <-- new
    )

and then build the Fibonacci example

but the build will fail with this log - even git revert on the llvm root 
does not get me back to an buildable state,
i tried to build the Fibonacci project and the solution

the projects ZERO_CHECK and Fibonacci giving these errors

Severity    Code    Description    Project    File    Line Suppression State
Error    MSB6006    "cmd.exe" exited with code -1073741819.
ZERO_CHECK    C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets
209
Severity    Code    Description    Project    File    Line Suppression State
Error    MSB6006    "cmd.exe" exited with code 1.    Fibonacci
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 
209


"DIA SDK not found" msg seems to be related to
https://stackoverflow.com/questions/44481648/llvm-cmake-install-cannot-find-dia-sdk
but why do i (maybe) need to set the VSINSTALLDIR when inside of the IDE?

any ideas?


this is the log that is create

... many... generate.stamp is up-to-date.
1>CMake does not need to re-run because
D:/projects/fun/jit_tests/clang_from_src/llvm-build/runtimes/CMakeFiles/generate.stamp 

is up-to-date.
1>CMake does not need to re-run because
D:/projects/fun/jit_tests/clang_from_src/llvm-build/examples/CMakeFiles/generate.stamp 

is up-to-date.
1>CMake does not need to re-run because
D:/projects/fun/jit_tests/clang_from_src/llvm-build/examples/BrainF/CMakeFiles/generate.stamp 

is up-to-date.
1>CMake is re-running because
D:/projects/fun/jit_tests/clang_from_src/llvm-build/examples/Fibonacci/CMakeFiles/generate.stamp 

is out-of-date.
1>  the file
'D:/projects/fun/jit_tests/clang_from_src/llvm/examples/Fibonacci/CMakeLists.txt'
1>  is newer than
'D:/projects/fun/jit_tests/clang_from_src/llvm-build/examples/Fibonacci/CMakeFiles/generate.stamp.depend'
1>  result='-1'
1>CMake Deprecation Warning at CMakeLists.txt:14 (cmake_policy):
1>  The OLD behavior for policy CMP0051 will be removed from a future
version
1>  of CMake.
1>
1>  The cmake-policies(7) manual explains that the OLD behaviors of all
1>  policies are deprecated and that a policy should be set to OLD only
under
1>  specific short-term circumstances.  Projects should be ported to the NEW
1>  behavior and not rely on setting a policy to OLD.
1>
1>
1>-- Selecting Windows SDK version 10.0.17134.0 to target Windows 6.1.7601.
1>-- Could NOT find Backtrace (missing: Backtrace_LIBRARY
Backtrace_INCLUDE_DIR)
1>-- Native target architecture is X86
1>CMake Error at cmake/config-ix.cmake:466 (message):
1>  DIA SDK not found.  If you have both VS 2012 and 2013 installed, you may
1>  need to uninstall the former and re-install the latter afterwards.
1>Call Stack (most recent call first):
1>  CMakeLists.txt:600 (include)
1>
1>
1>-- Configuring incomplete, errors occurred!
1>See also
"D:/projects/fun/jit_tests/clang_from_src/llvm-build/CMakeFiles/CMakeOutput.log".
1>See also
"D:/projects/fun/jit_tests/clang_from_src/llvm-build/CMakeFiles/CMakeError.log".
1>CMake Configure step failed.  Build files cannot be regenerated
correctly.  Attempting to stop IDE build.
1>C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): 

error MSB6006: "cmd.exe" exited with code -1073741819.
1>Done building project "ZERO_CHECK.vcxproj" -- FAILED.
2>------ Build started: Project: llvm_vcsrevision_h, Configuration:
Debug x64 ------
3>------ Build started: Project: intrinsics_gen, Configuration: Debug
x64 ------
4>------ Build started: Project: InstCombineTableGen, Configuration:
Debug x64 ------
5>------ Build started: Project: AttributeCompatFuncTableGen,
Configuration: Debug x64 ------
6>------ Build started: Project: X86CommonTableGen, Configuration: Debug
x64 ------
7>------ Build started: Project: Fibonacci, Configuration: Debug x64 ------
7>Building Custom Rule
D:/projects/fun/jit_tests/clang_from_src/llvm/examples/Fibonacci/CMakeLists.txt
7>CMake is re-running because
D:/projects/fun/jit_tests/clang_from_src/llvm-build/examples/Fibonacci/CMakeFiles/generate.stamp 

is out-of-date.
7>  the file
'D:/projects/fun/jit_tests/clang_from_src/llvm/examples/Fibonacci/CMakeLists.txt'
7>  is newer than
'D:/projects/fun/jit_tests/clang_from_src/llvm-build/examples/Fibonacci/CMakeFiles/generate.stamp.depend'
7>  result='-1'
7>CMake Deprecation Warning at CMakeLists.txt:14 (cmake_policy):
7>  The OLD behavior for policy CMP0051 will be removed from a future
version
7>  of CMake.
7>
7>  The cmake-policies(7) manual explains that the OLD behaviors of all
7>  policies are deprecated and that a policy should be set to OLD only
under
7>  specific short-term circumstances.  Projects should be ported to the NEW
7>  behavior and not rely on setting a policy to OLD.
7>
7>
7>-- Selecting Windows SDK version 10.0.17134.0 to target Windows 6.1.7601.
7>-- Could NOT find Backtrace (missing: Backtrace_LIBRARY
Backtrace_INCLUDE_DIR)
7>-- Native target architecture is X86
7>CMake Error at cmake/config-ix.cmake:466 (message):
7>  DIA SDK not found.  If you have both VS 2012 and 2013 installed, you may
7>  need to uninstall the former and re-install the latter afterwards.
7>Call Stack (most recent call first):
7>  CMakeLists.txt:600 (include)
7>
7>
7>-- Configuring incomplete, errors occurred!
7>See also
"D:/projects/fun/jit_tests/clang_from_src/llvm-build/CMakeFiles/CMakeOutput.log".
7>See also
"D:/projects/fun/jit_tests/clang_from_src/llvm-build/CMakeFiles/CMakeError.log".
7>C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): 

error MSB6006: "cmd.exe" exited with code 1.
7>Done building project "Fibonacci.vcxproj" -- FAILED.
========== Build: 5 succeeded, 2 failed, 35 up-to-date, 0 skipped ==========



More information about the llvm-dev mailing list