Arrow build fails in windows - windows

I am trying to build Apache Arrow on Windows offline. As per instruction in the website, I have downloaded all the dependencies and set the environment variables:
SET ARROW_BOOST_URL=%ARROW_DEPENDENCY_ROOT%boost-1.67.0.tar.gz
SET ARROW_BROTLI_URL=%ARROW_DEPENDENCY_ROOT%brotli-v1.0.7.tar.gz
SET ARROW_CARES_URL=%ARROW_DEPENDENCY_ROOT%cares-1.15.0.tar.gz
SET ARROW_DOUBLE_CONVERSION_URL=%ARROW_DEPENDENCY_ROOT%double-conversion-v3.1.4.tar.gz
SET ARROW_FLATBUFFERS_URL=%ARROW_DEPENDENCY_ROOT%flatbuffers-v1.10.0.tar.gz
SET ARROW_GBENCHMARK_URL=%ARROW_DEPENDENCY_ROOT%gbenchmark-v1.4.1.tar.gz
SET ARROW_GFLAGS_URL=%ARROW_DEPENDENCY_ROOT%gflags-v2.2.0.tar.gz
SET ARROW_GLOG_URL=%ARROW_DEPENDENCY_ROOT%glog-v0.3.5.tar.gz
SET ARROW_GRPC_URL=%ARROW_DEPENDENCY_ROOT%grpc-v1.20.0.tar.gz
SET ARROW_GTEST_URL=%ARROW_DEPENDENCY_ROOT%gtest-1.8.1.tar.gz
SET ARROW_JEMALLOC_URL=%ARROW_DEPENDENCY_ROOT%jemalloc-5.2.0.tar.gz
SET ARROW_LZ4_URL=%ARROW_DEPENDENCY_ROOT%lz4-v1.8.3.tar.gz
SET ARROW_ORC_URL=%ARROW_DEPENDENCY_ROOT%orc-1.5.5.tar.gz
SET ARROW_PROTOBUF_URL=%ARROW_DEPENDENCY_ROOT%protobuf-v3.7.1.tar.gz
SET ARROW_RAPIDJSON_URL=%ARROW_DEPENDENCY_ROOT%rapidjson-2bbd33b33217ff4a73434ebf10cdac41e2ef5e34.tar.gz
SET ARROW_RE2_URL=%ARROW_DEPENDENCY_ROOT%re2-2019-04-01.tar.gz
SET ARROW_SNAPPY_URL=%ARROW_DEPENDENCY_ROOT%snappy-1.1.7.tar.gz
SET ARROW_THRIFT_URL=%ARROW_DEPENDENCY_ROOT%thrift-0.12.0.tar.gz
SET ARROW_URIPARSER_URL=%ARROW_DEPENDENCY_ROOT%uriparser-0.9.2.tar.gz
SET ARROW_ZLIB_URL=%ARROW_DEPENDENCY_ROOT%zlib-1.2.11.tar.gz
SET ARROW_ZSTD_URL=%ARROW_DEPENDENCY_ROOT%zstd-v1.4.0.tar.gz
I am running the build using the follwoing command:
if not defined DevEnvDir (
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64
)
cmake -G %GENERATOR% %CMAKE_ARGS% ^
-DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
-DARROW_BUILD_TESTS=OFF ^
-DARROW_BUILD_EXAMPLES=OFF ^
-DARROW_BUILD_STATIC=ON ^
-DARROW_PARQUET=ON ^
-DPARQUET_BUILD_EXECUTABLES=OFF ^
-DARROW_IPC=OFF ^
-DARROW_BUILD_UTILITIES=OFF ^
-DARROW_HDFS=OFF ^
-DARROW_CXXFLAGS="%ARROW_CXXFLAGS%" ^
-DCMAKE_CXX_FLAGS_RELEASE="/MD %CMAKE_CXX_FLAGS_RELEASE%" ^
-DCMAKE_VERBOSE_MAKEFILE=OFF ^
-DARROW_BOOST_USE_SHARED=OFF ^
-DCMAKE_VERBOSE_MAKEFILE=OFF ^
..
cmake --build . --target install --config %CONFIGURATION%
where my variables are set as follows:
set CMAKE_ARGS=%CMAKE_ARGS% ^
-DARROW_DEPENDENCY_SOURCE=BUNDLED ^
-DBOOST_SOURCE=SYSTEM ^
-DTHRIFT_SOURCE=SYSTEM ^
-DBOOST_DEBUG=OFF ^
-DBOOST_USE_STATIC_LIBS=ON ^
-DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% ^
-DBOOST_INCLUDEDIR=%BOOST_INCLUDEDIR% ^
-DRAPIDJSON_ROOT=%RAPIDJSON_ROOTDIR% ^
-DTHRIFT_ROOT=%THRIFT_ROOT%
When i run this i will get the following error complaining about not finding the rapidjson header files (even though they exist in the above list):
cpp\src\arrow\json\chunker.cc(25): fatal error C1083: Cannot open include file: 'rapidjson/reader.h': No such file or directory
I was able to go around this by manually copying rapidjson header files next to my source code (ideally I dont want to do this and rather the build system pick it up automatically). Even after this step I am getting the following error:
This seems to be happening due to the fact that thrift was not built properly:
Performing download step (verify and extract) for 'thrift_ep'
-- verifying file...
file='t:\src\apache-arrow\cpp\thirdparty\arrow-dependencies\thrift-0.12.0.tar.gz'
-- verifying file... done
-- extracting...
src='T:/src/apache-arrow/cpp/thirdparty/arrow-dependencies/thrift-0.12.0.tar.gz'
dst='T:/src/apache-arrow/cpp/build_Release/thrift_ep-prefix/src/thrift_ep'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
No update step for 'thrift_ep'
No patch step for 'thrift_ep'
Performing configure step for 'thrift_ep'
-- The C compiler identification is MSVC 19.16.27031.1
-- The CXX compiler identification is MSVC 19.16.27031.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Parsed Thrift package version: 0.12.0
-- Parsed Thrift version: 0.12.0 (0.2.0)
-- Setting C++11 as the default language level.
-- To specify a different C++ language level, set CMAKE_CXX_STANDARD
BOOST_ROOT:
Boost_LIBRARY_DIR_RELEASE:
BOOST_LIBRARYDIR:
BOOST_INCLUDEDIR:
Boost_USE_STATIC_LIBS: OFF
Boost_DEBUG:
-- libevent NOT found.
-- Could NOT find RUN_HASKELL (missing: RUN_HASKELL)
-- Could NOT find CABAL (missing: CABAL)
-- Looking for arpa/inet.h
-- Looking for arpa/inet.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for getopt.h
-- Looking for getopt.h - not found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for netdb.h
-- Looking for netdb.h - not found
-- Looking for netinet/in.h
-- Looking for netinet/in.h - not found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - not found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - not found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - not found
-- Looking for sys/un.h
-- Looking for sys/un.h - not found
-- Looking for poll.h
-- Looking for poll.h - not found
-- Looking for sys/poll.h
-- Looking for sys/poll.h - not found
-- Looking for sys/select.h
-- Looking for sys/select.h - not found
-- Looking for sched.h
-- Looking for sched.h - not found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for strings.h
-- Looking for strings.h - not found
-- Looking for gethostbyname
-- Looking for gethostbyname - not found
-- Looking for gethostbyname_r
-- Looking for gethostbyname_r - not found
-- Looking for strerror_r
-- Looking for strerror_r - not found
-- Looking for sched_get_priority_max
-- Looking for sched_get_priority_max - not found
-- Looking for sched_get_priority_min
-- Looking for sched_get_priority_min - not found
-- Performing Test STRERROR_R_CHAR_P
-- Performing Test STRERROR_R_CHAR_P - Failed
-- Looking for pthread.h
-- Looking for pthread.h - not found
Why all these files were not found? Also, why the path to boost libraries are not set? when building arrow itself the path to Boost is automatically resolved.
This is happening while other dependencies like snappy or brotli are building fine. Any idea why this is happening? is there a dependency that i'm missing here in Windows?
Any help is highly appreciate.

First issue with rapidjson:
According to ThirdpartyToolchain.cmake from apache-arrow-0.14.1.tar.gz, rapidjson building depends on ARROW_WITH_RAPIDJSON,
which is automatically set for ARROW_FLIGHT OR ARROW_IPC.
So you need ARROW_WITH_RAPIDJSON=ON or ARROW_FLIGHT=ON or ARROW_IPC=ON.
Second issue with BOOST:
It is only quess, but I'm using BOOST_ROOT+BOOST_LIBRARYDIR and not BOOST_LIBRARYDIR+BOOST_INCLUDEDIR as I see in your code.
In ThirdpartyToolchain.cmake is following code in build_thrift macro, which can explain your problems with thrift compilation:
#Thrift also uses boost. Forward important boost settings if there were ones passed.
if(DEFINED BOOST_ROOT)
set(THRIFT_CMAKE_ARGS ${THRIFT_CMAKE_ARGS} "-DBOOST_ROOT=${BOOST_ROOT}")
endif()

Related

Building LLVM with CMake error: NMake Makefiles does not support toolset specification

I am trying to build LLVM on Windows 10 using this tutorial from the LLVM docs.
However, CMake gives the error NMake Makefiles does not support toolset specification, but toolset host=x64 was specified, which I have sadly been unable to surmount.
Error:
In the VS2022 developer prompt, I get to configure LLVM using CMake (step #12), which results in the following error:
C:\Users\Name\Documents\name\code\tools\llvm> cmake -S .\llvm -B build -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=X86
CMake Error at CMakeLists.txt:44 (project):
Generator
NMake Makefiles
does not support toolset specification, but toolset
host=x64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/Name/Documents/name/code/tools/llvm/build/CMakeFiles/CMakeOutput.log".
And CMakeOutput.log simply reads:
The system is: Windows - 10.0.19042 - AMD64
Attempts at remediation:
I referred to this answer but was unclear as to what to do.
Line 44 simply consists of:
project(LLVM
VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}
LANGUAGES C CXX ASM)
Again, thank you very much in advance for any help on this issue!
Update #1
As per tsyvarev's suggestion, I tried: cmake -G "Visual Studio 17 2022" -A x64 -S .\llvm -B build -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=X86 -Thost=x64
This results in:
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.30.30705.0
-- The CXX compiler identification is MSVC 19.30.30705.0
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/Hostx64/x64/cl.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- cross-project-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- libcxx project is disabled
-- libcxxabi project is disabled
-- libunwind project is disabled
-- lld project is disabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- Looking for dlfcn.h
-- Looking for dlfcn.h - not found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for link.h
-- Looking for link.h - not found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - not found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - not found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sysexits.h
-- Looking for sysexits.h - not found
-- Looking for termios.h
-- Looking for termios.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not found
-- Looking for histedit.h
-- Looking for histedit.h - not found
-- Looking for CrashReporterClient.h
-- Looking for CrashReporterClient.h - not found
-- Looking for pfm_initialize in pfm
-- Looking for pfm_initialize in pfm - not found
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY) (found version "2.9.9")
-- Looking for xar_open in xar
-- Looking for xar_open in xar - not found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for backtrace
-- Looking for backtrace - not found
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Failed
-- Looking for __register_frame
-- Looking for __register_frame - not found
-- Looking for __deregister_frame
-- Looking for __deregister_frame - not found
-- Looking for __unw_add_dynamic_fde
-- Looking for __unw_add_dynamic_fde - not found
-- Looking for _Unwind_Backtrace
-- Looking for _Unwind_Backtrace - not found
-- Looking for getpagesize
-- Looking for getpagesize - not found
-- Looking for sysconf
-- Looking for sysconf - not found
-- Looking for getrusage
-- Looking for getrusage - not found
-- Looking for setrlimit
-- Looking for setrlimit - not found
-- Looking for isatty
-- Looking for isatty - not found
-- Looking for futimens
-- Looking for futimens - not found
-- Looking for futimes
-- Looking for futimes - not found
-- Looking for posix_fallocate
-- Looking for posix_fallocate - not found
-- Looking for sigaltstack
-- Looking for sigaltstack - not found
-- Looking for lseek64
-- Looking for lseek64 - not found
-- Looking for mallctl
-- Looking for mallctl - not found
-- Looking for mallinfo
-- Looking for mallinfo - not found
-- Looking for mallinfo2
-- Looking for mallinfo2 - not found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - not found
-- Looking for getrlimit
-- Looking for getrlimit - not found
-- Looking for posix_spawn
-- Looking for posix_spawn - not found
-- Looking for pread
-- Looking for pread - not found
-- Looking for sbrk
-- Looking for sbrk - not found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strerror_r
-- Looking for strerror_r - not found
-- Looking for strerror_s
-- Looking for strerror_s - found
-- Looking for setenv
-- Looking for setenv - not found
-- Looking for _chsize_s
-- Looking for _chsize_s - found
-- Looking for _alloca
-- Looking for _alloca - not found
-- Looking for __alloca
-- Looking for __alloca - not found
-- Looking for __chkstk
-- Looking for __chkstk - found
-- Looking for __chkstk_ms
-- Looking for __chkstk_ms - not found
-- Looking for ___chkstk
-- Looking for ___chkstk - not found
-- Looking for ___chkstk_ms
-- Looking for ___chkstk_ms - not found
-- Looking for __ashldi3
-- Looking for __ashldi3 - not found
-- Looking for __ashrdi3
-- Looking for __ashrdi3 - not found
-- Looking for __divdi3
-- Looking for __divdi3 - not found
-- Looking for __fixdfdi
-- Looking for __fixdfdi - not found
-- Looking for __fixsfdi
-- Looking for __fixsfdi - not found
-- Looking for __floatdidf
-- Looking for __floatdidf - not found
-- Looking for __lshrdi3
-- Looking for __lshrdi3 - not found
-- Looking for __moddi3
-- Looking for __moddi3 - not found
-- Looking for __udivdi3
-- Looking for __udivdi3 - not found
-- Looking for __umoddi3
-- Looking for __umoddi3 - not found
-- Looking for __main
-- Looking for __main - not found
-- Looking for __cmpdi2
-- Looking for __cmpdi2 - not found
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC - Failed
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - Failed
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Looking for proc_pid_rusage
-- Looking for proc_pid_rusage - not found
-- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE
-- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE - Success
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Failed
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Failed
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- LLVM host triple: x86_64-pc-windows-msvc
-- LLVM default target triple: x86_64-pc-windows-msvc
-- Using Debug VC++ CRT: MDd
-- Using Release VC++ CRT: MD
-- Using MinSizeRel VC++ CRT: MD
-- Using RelWithDebInfo VC++ CRT: MD
-- Looking for os_signpost_interval_begin
-- Looking for os_signpost_interval_begin - not found
-- Found Python3: C:/Users/Name/AppData/Local/Programs/Python/Python39/python.exe (found suitable version "3.9.5", minimum required is "3.6") found components: Interpreter
-- Performing Test HAS_WERROR_GLOBAL_CTORS
-- Performing Test HAS_WERROR_GLOBAL_CTORS - Failed
CMake Error at CMakeLists.txt:1008 (add_subdirectory):
add_subdirectory given source "utils/TableGen" which is not an existing
directory.
CMake Error at cmake/modules/TableGen.cmake:9 (message):
LLVM_TABLEGEN_EXE not set
Call Stack (most recent call first):
include/llvm/IR/CMakeLists.txt:2 (tablegen)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Name/Documents/name/code/tools/llvm/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Name/Documents/name/code/tools/llvm/build/CMakeFiles/CMakeError.log".
I had the same problem, the difference was that I was using vs2019
By comparison, I found that in the repo on github,
https://github.com/llvm/llvm-project/tree/main/llvm/utils and
https://github.com/llvm/llvm-project/tree/main/utils
The content in it is different from that of my local folder.
I don't understand why, but when I do the copy: D:\llvm\utils => D:\llvm\llvm\utils
Everything works fine and the output is as follows:
❯ cmake -DLLVM_ENABLE_PROJECTS=clang -G "Visual Studio 16 2019" -A x64 -Thost=x64 ..\llvm
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- bolt project is disabled
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- cross-project-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- libcxx project is disabled
-- libcxxabi project is disabled
-- libunwind project is disabled
-- lld project is disabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-pc-windows-msvc
-- LLVM default target triple: x86_64-pc-windows-msvc
-- Using Debug VC++ CRT: MDd
-- Using Release VC++ CRT: MD
-- Using MinSizeRel VC++ CRT: MD
-- Using RelWithDebInfo VC++ CRT: MD
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.27.0.windows.1")
-- LLVMHello ignored -- Loadable modules not supported on this platform.
-- Targeting AArch64
-- Targeting AMDGPU
-- Targeting ARM
-- Targeting AVR
-- Targeting BPF
-- Targeting Hexagon
-- Targeting Lanai
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting RISCV
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting VE
-- Targeting WebAssembly
-- Targeting X86
-- Targeting XCore
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Clang version: 14.0.0
-- Not building amdgpu-arch: hsa-runtime64 not found
-- PrintFunctionNames ignored -- Loadable modules not supported on this platform.
-- AnnotateFunctions ignored -- Loadable modules not supported on this platform.
-- Attribute ignored -- Loadable modules not supported on this platform.
-- CallSuperAttr ignored -- Loadable modules not supported on this platform.
-- PluginsOrder ignored -- Loadable modules not supported on this platform.
-- BugpointPasses ignored -- Loadable modules not supported on this platform.
-- git version: v0.0.0-dirty normalized to 0.0.0
-- Version: 1.6.0
-- Looking for shm_open in rt
-- Looking for shm_open in rt - not found
-- Performing Test HAVE_CXX_FLAG_EHS_
-- Performing Test HAVE_CXX_FLAG_EHS_ - Success
-- Performing Test HAVE_CXX_FLAG_EHA_
-- Performing Test HAVE_CXX_FLAG_EHA_ - Success
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- failed to compile
CMake Warning at D:/llvm/third-party/benchmark/CMakeLists.txt:308 (message):
Using std::regex with exceptions disabled is not fully supported
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: D:/llvm/build
By the way, I noticed a similar problem
https://cxuesong.com/archives/1056
It is mentioned here:
Obviously, they decided to exclude this part of the feature in the packed installer.
Perhaps for the same reason? I do not know.
update:
If you use Download ZIP then there is no problem of folder contents being different from repo.
But I'm getting tens of thousands of compile errors, not sure if it's because I use vcpkg install llvm12, I'll try it later.
update2:
Build succeeded
I encountered similar issues, and found a comment on the MSDN blog site:
It’s better to mention that the toolset name working with cmake is “ClangCL”. I’ve tried clang-cl, clang, llvm. None of them works untils I’ve found this page https://tracker.dev.opencascade.org/view.php?id=31060 mentioning the “ClangCL”
And the follow-up comment to it from Tim Hutton [MSFT]:
And for 64-bit builds, set the CMake toolset to ‘ClangCL,host=x64’ https://cmake.org/cmake/help/latest/variable/CMAKE_GENERATOR_TOOLSET.html
Sure enough, using -T ClangCL,host=x64 in the cmake command line worked for me.

LLVM build on Windows: Visual Studio cl.exe skipped [duplicate]

This question already has an answer here:
Check for working C compiler: "cl.exe - skipped" : Visual Studio 2019
(1 answer)
Closed 1 year ago.
I try to build and install the LLVM source on Windows (specifically LLVM-8, but the issue exists on the latest version as well), using Visual Studio 2019 and CMake 3.18.2, following the guide from http://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm.
The output however looks the same as discussed in Building LLVM using Visual Studio, but the solution did not change anything for me.
I ran the following commands:
git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build
cd build
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall" x64
cmake ../llvm -G "Visual Studio 16 2019" -DLLVM_OPTIMIZED_TABLEGEN=TRUE -DLLVM_ENABLE_PROJECTS=clang -Thost=x64
I also tried the following:
not explicitly specifying a Generator (or any cmake arguments for that matter)
using the x64 Native Tools Command Prompt for VS 2019 instead of calling vcvarsall
running the command prompt / native tools command prompt as admin
Here is an extract of the output. As you can see, on the Check for working C / CXX compiler it says skipped at the end, which I suspect to be the issue.. But failed to resolve.
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
-- The C compiler identification is MSVC 19.27.29111.0
-- The CXX compiler identification is MSVC 19.27.29111.0
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- debuginfo-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- libcxx project is disabled
-- libcxxabi project is disabled
-- libunwind project is disabled
-- lld project is disabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- parallel-libs project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- Looking for dlfcn.h
-- Looking for dlfcn.h - not found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for link.h
-- Looking for link.h - not found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - not found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - not found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sysexits.h
-- Looking for sysexits.h - not found
-- Looking for termios.h
-- Looking for termios.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not found
-- Looking for histedit.h
-- Looking for histedit.h - not found
-- Looking for CrashReporterClient.h
-- Looking for CrashReporterClient.h - not found
-- Looking for pfm_initialize in pfm
-- Looking for pfm_initialize in pfm - not found
I've built it recently in VS 2019, using clang-cl toolset. As I recall, other VS toolsets still have issues.
CMakeSettings.json:
{
"configurations": [
{
"name": "x64-Clang-Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${projectDir}\\..\\_build\\${name}",
"installRoot": "${projectDir}\\..\\_install",
"cmakeCommandArgs": "-DLLVM_ENABLE_PROJECTS=\"clang\"",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64" ],
"variables": []
}
]
}

cmake on mac fails to find /usr/local/include (libevhtp)

I am trying to compile libevhtp (https://github.com/criticalstack/libevhtp) on my mac (10.13.3), but the cmake process does not seem to consider /usr/local/include (and thus wont find the required libevent headers):
16:43:42 me:~/Development/libevhtp/build> cmake -DCMAKE_INCLUDE_PATH=/usr/local/include ..
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find ONIGURUMA (missing: ONIGURUMA_LIBRARY ONIGURUMA_INCLUDE_DIR)
-- Looking for strndup
-- Looking for strndup - found
-- Looking for strnlen
-- Looking for strnlen - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file errno.h
-- Looking for include file errno.h - found
-- Looking for include file strings.h
-- Looking for include file strings.h - found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file limits.h
-- Looking for include file limits.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file stdarg.h
-- Looking for include file stdarg.h - found
-- Looking for include file sys/tree.h
-- Looking for include file sys/tree.h - not found
-- Looking for include file sys/queue.h
-- Looking for include file sys/queue.h - found
-- Looking for include file sys/un.h
-- Looking for include file sys/un.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- Check size of short
-- Check size of short - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Performing Test has_c99
-- Performing Test has_c99 - Success
-- Performing Test has_stack_protector
-- Performing Test has_stack_protector - Success
...
-- Found LIBEVENT: /usr/local/lib/libevent.dylib;/usr/local/lib/libevent_openssl.dylib;/usr/local/lib/libevent_core.dylib;/usr/local/lib/libevent_extra.dylib;/usr/local/lib/libevent_pthreads.dylib;/usr/local/lib/libevent_extra.dylib
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR)
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Could NOT find ONIGURUMA (missing: ONIGURUMA_LIBRARY ONIGURUMA_INCLUDE_DIR)
-- ONIGURUMA NOT FOUND, DISABLING REGEX SUPPORT
Trying to compile:
16:51:34 me:~/Development/libevhtp/build> make
[ 20%] Building C object CMakeFiles/evhtp.dir/evhtp.c.o
/Users/myself/Development/libevhtp/evhtp.c:30:10: fatal error: 'event2/dns.h' file not found
#include <event2/dns.h>
^~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/evhtp.dir/evhtp.c.o] Error 1
make[1]: *** [CMakeFiles/evhtp.dir/all] Error 2
make: *** [all] Error 2
But the file exists:
16:51:36 me:~/Development/libevhtp/build> ll /usr/local/include/event2/dns.h
-rw-r--r-- 1 myself admin 26K Jan 26 2017 /usr/local/include/event2/dns.h
I am not familiar with cmake, so I don't know how to fix this. I tried cmake -DCMAKE_INCLUDE_PATH=/usr/local/include .. but it didn.t help.

Compile wireshark 64bit failed under win7 with Cmake,what is the cause?

I tried to compile wireshark at WIN7 with CMAKE under 64bit option,however the result is failed
I can not figure out the reason,could you help me to have a check.I appreciate any suggestions
from you.Thanks a lot,i like this platform.below is the environment setting and command.
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
set WIRESHARK_BASE_DIR=E:\Wireshark_Plugin\SecVersion\wireshark-master
set WIRESHARK_CYGWIN_INSTALL_PATH==E:\Software\Cygwin\bin
set WIRESHARK_TARGET_PLATFORM=win64
set QT5_BASE_DIR=E:\Software\QT\5.6\msvc2013_64
set VISUALSTUDIOVERSION=12.0
set MSVC_VARIANT=MSVC2013EE
e:
cd E:\Wireshark_Plugin\SecVersion\wsbuild
cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 12 Win64" ..\wireshark-master
pause
E:\Wireshark_Plugin\SecVersion\wsbuild>call "C:\Program Files (x86)\Microsoft Vi
sual Studio 12.0\VC\vcvarsall.bat" x86_amd64
-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
-- Check for working C compiler using: Visual Studio 12 2013 Win64
-- Check for working C compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Generating build using CMake 3.5.2
-- Found POWERSHELL: C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe
-- Building for win64 using Visual Studio 12 2013 Win64
Working in E:\Wireshark_Plugin\SecVersion\wireshark-master\wireshark-win64-libs
Tag 2016-05-10 found. Skipping.
-- No custom file found in E:/Wireshark_Plugin/SecVersion/wireshark-master
-- Configuration types: Debug;Release;MinSizeRel;RelWithDebInfo
-- CMAKE_C_FLAGS_RELWITHDEBINFO: /MD /Zi /O2 /Ob1 /D NDEBUG
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: /MD /Zi /O2 /Ob1 /D NDEBUG
-- V: 2.1.0-git, MaV: 2, MiV: 1, PL: 0, EV: -git.
-- Found PythonInterp: C:/Python27/python.exe (found version "2.7.8")
-- Found python module asn2wrs: E:\Wireshark_Plugin\SecVersion\wireshark-master\
tools\asn2wrs.py
-- Checking for c-compiler flag: /MP
-- Performing Test C__MP_VALID
-- Performing Test C__MP_VALID - Success
-- Checking for c-compiler flag: /Zo
-- Performing Test C__Zo_VALID
-- Performing Test C__Zo_VALID - Success
-- Checking for c-compiler flag: /w34295 /w34189
-- Performing Test C__w34295_w34189_VALID
-- Performing Test C__w34295_w34189_VALID - Success
-- Checking for c++-compiler flag: /MP
-- Performing Test CXX__MP_VALID
-- Performing Test CXX__MP_VALID - Success
-- Checking for c++-compiler flag: /Zo
-- Performing Test CXX__Zo_VALID
-- Performing Test CXX__Zo_VALID - Success
-- Checking for c++-compiler flag: /w34295 /w34189
-- Performing Test CXX__w34295_w34189_VALID
-- Performing Test CXX__w34295_w34189_VALID - Success
statuscheck linker flag - test linker flags: -Wl,--as-needed
-- Performing Test WS_LD_FLAG_VALID0
-- Performing Test WS_LD_FLAG_VALID0 - Failed
statuscheck linker flag - test linker flags: -pie
-- Performing Test WS_LD_FLAG_VALID1
-- Performing Test WS_LD_FLAG_VALID1 - Failed
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Packagelist: AIRPCAP;CAP;CARES;GCRYPT;GEOIP;GLIB2;GMODULE2;GNUTLS;GTHREAD2;GT
K2;Gettext;Git;KERBEROS;LEX;LIBSSH;LUA;M;PCAP;POD;PORTAUDIO;Perl;PythonInterp;Qt
5Core;Qt5LinguistTools;Qt5Multimedia;Qt5PrintSupport;Qt5Svg;Qt5Widgets;Qt5WinExt
ras;SBC;SED;SETCAP;SH;SMI;WINSPARKLE;YACC;YAPP;ZLIB
-- Found AIRPCAP: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win6
4-libs/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/include
-- AIRPCAP FOUND
-- AIRPCAP includes: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-w
in64-libs/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/include
-- AIRPCAP libs: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64
-libs/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/lib/airpcap.lib
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'libcap'
-- Could NOT find CAP (missing: CAP_LIBRARY CAP_INCLUDE_DIR)
-- CAP NOT FOUND
-- Found CARES: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-
libs/c-ares-1.11.0-win64ws/lib/libcares-2.lib
-- CARES FOUND
-- CARES includes: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win
64-libs/c-ares-1.11.0-win64ws/include
-- CARES libs: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-l
ibs/c-ares-1.11.0-win64ws/lib/libcares-2.lib
-- Found GCRYPT: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64
-libs/gnutls-3.2.15-2.9-win64ws/bin/libgcrypt-20.lib (found suitable version "1.
6.2", minimum required is "1.4.2")
-- GCRYPT FOUND
-- GCRYPT includes: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-wi
n64-libs/gnutls-3.2.15-2.9-win64ws/include
-- GCRYPT libs: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-
libs/gnutls-3.2.15-2.9-win64ws/bin/libgcrypt-20.lib;E:/Wireshark_Plugin/SecVersi
on/wireshark-master/Wireshark-win64-libs/gnutls-3.2.15-2.9-win64ws/bin/libgpg-er
ror6-0.lib
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'geoip'
-- Found GEOIP: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-
libs/GeoIP-1.6.6-win64ws/lib/libGeoIP-1.lib
-- Looking for GeoIP_country_name_by_ipnum_v6
-- Looking for GeoIP_country_name_by_ipnum_v6 - found
-- GEOIP FOUND
-- GEOIP includes: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win
64-libs/GeoIP-1.6.6-win64ws/include
-- GEOIP libs: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-l
ibs/GeoIP-1.6.6-win64ws/lib/libGeoIP-1.lib
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'glib-2.0>=2.14.0'
-- Found GLIB2: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-
libs/gtk2/lib/glib-2.0.lib
-- GLIB2 FOUND
-- GLIB2 includes: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win
64-libs/gtk2/include/glib-2.0;E:/Wireshark_Plugin/SecVersion/wireshark-master/Wi
reshark-win64-libs/gtk2/lib/glib-2.0/include
-- GLIB2 libs: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-l
ibs/gtk2/lib/glib-2.0.lib
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'gmodule-2.0'
-- Found GMODULE2: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win
64-libs/gtk2/lib/gmodule-2.0.lib
-- GMODULE2 FOUND
-- GMODULE2 includes: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-
win64-libs/gtk2/include/glib-2.0
-- GMODULE2 libs: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win6
4-libs/gtk2/lib/gmodule-2.0.lib
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'gnutls'
-- Found GNUTLS: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64
-libs/gnutls-3.2.15-2.9-win64ws/bin/libgnutls-28.lib (found suitable version "3.
2.15", minimum required is "2.12.0")
-- GNUTLS FOUND
-- GNUTLS includes: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-wi
n64-libs/gnutls-3.2.15-2.9-win64ws/include
-- GNUTLS libs: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-
libs/gnutls-3.2.15-2.9-win64ws/bin/libgnutls-28.lib
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'gthread-2.0'
-- Found GTHREAD2: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win
64-libs/gtk2/lib/glib-2.0.lib
-- GTHREAD2 FOUND
-- GTHREAD2 includes: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-
win64-libs/gtk2/include/glib-2.0/glib
-- GTHREAD2 libs: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win6
4-libs/gtk2/lib/glib-2.0.lib
-- Found GTK2_GTK: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win
64-libs/gtk2/lib/gtk-win32-2.0.lib
-- GTK2 FOUND
-- GTK2 includes: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win6
4-libs/gtk2/include/gtk-2.0;E:/Wireshark_Plugin/SecVersion/wireshark-master/Wire
shark-win64-libs/gtk2/include;E:/Wireshark_Plugin/SecVersion/wireshark-master/Wi
reshark-win64-libs/gtk2/include/freetype2;E:/Wireshark_Plugin/SecVersion/wiresha
rk-master/Wireshark-win64-libs/gtk2/include/glib-2.0;E:/Wireshark_Plugin/SecVers
ion/wireshark-master/Wireshark-win64-libs/gtk2/lib/glib-2.0/include;E:/Wireshark
_Plugin/SecVersion/wireshark-master/Wireshark-win64-libs/gtk2/include/atk-1.0;E:
/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-libs/gtk2/include/
gdk-pixbuf-2.0;E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-l
ibs/gtk2/include/cairo;E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark
-win64-libs/gtk2/include/pango-1.0;E:/Wireshark_Plugin/SecVersion/wireshark-mast
er/Wireshark-win64-libs/gtk2/lib/gtk-2.0/include
-- GTK2 libs: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-li
bs/gtk2/lib/glib-2.0.lib;E:/Wireshark_Plugin/SecVersion/wireshark-master/Wiresha
rk-win64-libs/gtk2/lib/gobject-2.0.lib;E:/Wireshark_Plugin/SecVersion/wireshark-
master/Wireshark-win64-libs/gtk2/lib/atk-1.0.lib;E:/Wireshark_Plugin/SecVersion/
wireshark-master/Wireshark-win64-libs/gtk2/lib/gmodule-2.0.lib;E:/Wireshark_Plug
in/SecVersion/wireshark-master/Wireshark-win64-libs/gtk2/lib/gdk_pixbuf-2.0.lib;
E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-libs/gtk2/lib/ca
iro.lib;E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win64-libs/gtk
2/lib/pango-1.0.lib;E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-wi
n64-libs/gtk2/lib/pangocairo-1.0.lib;E:/Wireshark_Plugin/SecVersion/wireshark-ma
ster/Wireshark-win64-libs/gtk2/lib/gdk-win32-2.0.lib;E:/Wireshark_Plugin/SecVers
ion/wireshark-master/Wireshark-win64-libs/gtk2/lib/gtk-win32-2.0.lib
-- Could NOT find Gettext (missing: GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_
EXECUTABLE)
-- GETTEXT NOT FOUND
-- Could NOT find Git (missing: GIT_EXECUTABLE)
-- Git NOT FOUND
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'krb5;mit-krb5;heimdal-krb5'
-- Found KERBEROS: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win
64-libs/kfw-3-2-2-x64-ws/lib/krb5_64.lib
-- Looking for heimdal_version
-- Looking for heimdal_version - not found
-- KERBEROS FOUND
-- KERBEROS includes: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-
win64-libs/kfw-3-2-2-x64-ws/include
-- KERBEROS libs: E:/Wireshark_Plugin/SecVersion/wireshark-master/Wireshark-win6
4-libs/kfw-3-2-2-x64-ws/lib/krb5_64.lib
CMake Error at cmake/modules/FindCygwin.cmake:59 (message):
Cygwin installation path was not detected. You can set it with
WIRESHARK_CYGWIN_INSTALL_PATH environment variable.
Call Stack (most recent call first):
cmake/modules/FindLEX.cmake:5 (INCLUDE)
CMakeLists.txt:835 (find_package)
-- Configuring incomplete, errors occurred!
See also "E:/Wireshark_Plugin/SecVersion/wsbuild/CMakeFiles/CMakeOutput.log".
See also "E:/Wireshark_Plugin/SecVersion/wsbuild/CMakeFiles/CMakeError.log".

Building Clang on Windows: DiagnosticCommonKinds.inc header doesn't exist

I'm trying to build Clang on Windows 8.1 with MS Visual Studio 2013 following instructions at http://clang.llvm.org/get_started.html in "Using Visual Studio" section.
I have checked out llvm to D:\Current\llvm, clang to D:\Current\llvm\tools\clang, created D:\Current\llvm_build and run "D:\Program Files (x86)\cmake-3.3.0-win32-x86\bin\cmake.exe" -G "Visual Studio 12" ..\llvm in llvm_build directory.
LLVM.sln and other files are created in llvm_build directory without any critical errors. But when I open this solution in Visual Studio and try to compile clang project I get errors like this:
1>D:\Current\llvm\tools\clang\include\clang/Basic/DiagnosticIDs.h(53): fatal error C1083: Cannot open include file: 'clang/Basic/DiagnosticCommonKinds.inc': No such file or directory (D:\Current\llvm\tools\clang\tools\driver\cc1as_main.cpp)
Indeed, DiagnosticCommonKinds.inc file is nowhere to be found both in llvm and llvm_build folders. I suppose it should be generated by CMake during build process but for some reason this doesn't happen and I do not get any meaningful errors.
Here's output from CMake that I get:
-- No build type selected, default to Debug
-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- Check for working C compiler using: Visual Studio 12 2013
-- Check for working C compiler using: Visual Studio 12 2013 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013
-- Check for working CXX compiler using: Visual Studio 12 2013 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Warning: Did not find file Compiler/MSVC-ASM
-- Looking for dirent.h
-- Looking for dirent.h - not found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - not found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for limits.h
-- Looking for limits.h - found
-- Looking for link.h
-- Looking for link.h - not found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for ndir.h
-- Looking for ndir.h - not found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for sys/dir.h
-- Looking for sys/dir.h - not found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - not found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - not found
-- Looking for sys/ndir.h
-- Looking for sys/ndir.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - not found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - not found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - not found
-- Looking for termios.h
-- Looking for termios.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for utime.h
-- Looking for utime.h - not found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for zlib.h
-- Looking for zlib.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not found
-- Looking for mach-o/dyld.h
-- Looking for mach-o/dyld.h - not found
-- Looking for histedit.h
-- Looking for histedit.h - not found
-- Performing Test HAVE_CXXABI_H
-- Performing Test HAVE_CXXABI_H - Failed
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for backtrace
-- Looking for backtrace - not found
-- Looking for getpagesize
-- Looking for getpagesize - not found
-- Looking for getrusage
-- Looking for getrusage - not found
-- Looking for setrlimit
-- Looking for setrlimit - not found
-- Looking for isatty
-- Looking for isatty - not found
-- Looking for futimens
-- Looking for futimens - not found
-- Looking for futimes
-- Looking for futimes - not found
-- Looking for mallctl
-- Looking for mallctl - not found
-- Looking for mallinfo
-- Looking for mallinfo - not found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - not found
-- Looking for mkdtemp
-- Looking for mkdtemp - not found
-- Looking for mkstemp
-- Looking for mkstemp - not found
-- Looking for mktemp
-- Looking for mktemp - not found
-- Looking for closedir
-- Looking for closedir - not found
-- Looking for opendir
-- Looking for opendir - not found
-- Looking for readdir
-- Looking for readdir - not found
-- Looking for getcwd
-- Looking for getcwd - not found
-- Looking for gettimeofday
-- Looking for gettimeofday - not found
-- Looking for getrlimit
-- Looking for getrlimit - not found
-- Looking for posix_spawn
-- Looking for posix_spawn - not found
-- Looking for pread
-- Looking for pread - not found
-- Looking for realpath
-- Looking for realpath - not found
-- Looking for sbrk
-- Looking for sbrk - not found
-- Looking for srand48
-- Looking for srand48 - not found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoq
-- Looking for strtoq - not found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strerror_r
-- Looking for strerror_r - not found
-- Looking for strerror_s
-- Looking for strerror_s - found
-- Looking for setenv
-- Looking for setenv - not found
-- Looking for _chsize_s
-- Looking for _chsize_s - found
-- Looking for _alloca
-- Looking for _alloca - not found
-- Looking for __alloca
-- Looking for __alloca - not found
-- Looking for __chkstk
-- Looking for __chkstk - not found
-- Looking for __chkstk_ms
-- Looking for __chkstk_ms - not found
-- Looking for ___chkstk
-- Looking for ___chkstk - not found
-- Looking for ___chkstk_ms
-- Looking for ___chkstk_ms - not found
-- Looking for __ashldi3
-- Looking for __ashldi3 - not found
-- Looking for __ashrdi3
-- Looking for __ashrdi3 - not found
-- Looking for __divdi3
-- Looking for __divdi3 - not found
-- Looking for __fixdfdi
-- Looking for __fixdfdi - not found
-- Looking for __fixsfdi
-- Looking for __fixsfdi - not found
-- Looking for __floatdidf
-- Looking for __floatdidf - not found
-- Looking for __lshrdi3
-- Looking for __lshrdi3 - not found
-- Looking for __moddi3
-- Looking for __moddi3 - not found
-- Looking for __udivdi3
-- Looking for __udivdi3 - not found
-- Looking for __umoddi3
-- Looking for __umoddi3 - not found
-- Looking for __main
-- Looking for __main - not found
-- Looking for __cmpdi2
-- Looking for __cmpdi2 - not found
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Performing Test HAVE_INT64_T
-- Performing Test HAVE_INT64_T - Success
-- Performing Test HAVE_UINT64_T
-- Performing Test HAVE_UINT64_T - Success
-- Performing Test HAVE_U_INT64_T
-- Performing Test HAVE_U_INT64_T - Failed
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_NO_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_NO_VARIADIC_MACROS_FLAG - Failed
-- Target triple: i686-pc-win32
-- Native target architecture is X86
-- Performing Test HAVE_ELMCB_PCSTR
-- Performing Test HAVE_ELMCB_PCSTR - Success
-- Threads enabled.
-- Doxygen disabled.
-- Sphinx disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- Using Debug VC++ CRT: MDd
-- Using Release VC++ CRT: MD
-- Using MinSizeRel VC++ CRT: MD
-- Using RelWithDebInfo VC++ CRT: MD
-- Using Debug VC++ CRT: MDd
-- Performing Test SUPPORTS_SIZED_DEALLOC
-- Performing Test SUPPORTS_SIZED_DEALLOC - Failed
-- Found PythonInterp: E:/Python27/python.exe (found version "2.7.10")
-- Constructing LLVMBuild project information
-- LLVMHello ignored -- Loadable modules not supported on this platform.
-- Targeting AArch64
-- Targeting AMDGPU
-- Targeting ARM
-- Targeting BPF
-- Targeting CppBackend
-- Targeting Hexagon
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting X86
-- Targeting XCore
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
-- Clang version: 3.8.0
-- SampleAnalyzerPlugin ignored -- Loadable modules not supported on this platform.
-- PrintFunctionNames ignored -- Loadable modules not supported on this platform.
-- BugpointPasses ignored -- Loadable modules not supported on this platform.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Current/llvm_build
Can someone advise how should I fix this problem? Am I doing something wrong?
It turned out that instruction at http://clang.llvm.org/get_started.html is partially misleading:
Build the "clang" project for just the compiler driver and front end, or the "ALL_BUILD" project to build everything, including tools.
Is it actually impossible to compile clang project in newly created solution, but ALL_BUILD project compiles without any problems and generates all necessary files including DiagnosticCommonKinds.inc.

Resources