keystone
keystone copied to clipboard
Build instructions for Windows
It seems that the build instructions for Windows (https://github.com/keystone-engine/keystone/blob/master/docs/COMPILE-WINDOWS.md) do not work out of the box.
c:\Users\aballman\Desktop\sandboxes\keystone\build>..\nmake-dll.bat
-- The C compiler identification is MSVC 19.27.29009.1
-- The CXX compiler identification is MSVC 19.27.29009.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.27.29009/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.27.29009/bin/Hostx64/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/2019/Preview/VC/Tools/MSVC/14.27.29009/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.27.29009/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:27 (cmake_policy):
The OLD behavior for policy CMP0051 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Deprecation Warning at llvm/CMakeLists.txt:22 (cmake_policy):
The OLD behavior for policy CMP0051 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.27.29009/bin/Hostx64/x64/cl.exe
-- 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 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 - 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: x86_64-pc-win32
-- Native target architecture is X86
-- Performing Test HAVE_ELMCB_PCSTR
-- Performing Test HAVE_ELMCB_PCSTR - Success
-- Threads enabled.
-- Using Release VC++ CRT: MT
-- Performing Test SUPPORTS_SIZED_DEALLOC
-- Performing Test SUPPORTS_SIZED_DEALLOC - Success
-- Found PythonInterp: C:/cygwin/bin/python2.7.exe (found version "2.7.14")
-- Constructing LLVMBuild project information
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/LLVMBuild.txt does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:28 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/lib/LLVMBuild.txt does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:30 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/lib/Target/LLVMBuild.txt does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:32 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/lib/Target/ARM/LLVMBuild.txt does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:34 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/lib/Target/AArch64/LLVMBuild.txt does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:36 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/lib/Target/Hexagon/LLVMBuild.txt does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:38 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/lib/Target/Mips/LLVMBuild.txt does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:40 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/lib/Target/PowerPC/LLVMBuild.txt does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:42 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/lib/Target/Sparc/LLVMBuild.txt does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:44 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/lib/Target/SystemZ/LLVMBuild.txt does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:46 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/lib/Target/X86/LLVMBuild.txt does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:48 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/utils/llvm-build/llvmbuild/__init__.py does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:50 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/utils/llvm-build/llvmbuild/configutil.py does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:52 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/utils/llvm-build/llvmbuild/main.py does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:54 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/utils/llvm-build/llvmbuild/componentinfo.py does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:56 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
CMake Error: File /cygdrive/c/Users/aballman/Desktop/sandboxes/keystone/llvm/utils/llvm-build/llvmbuild/util.py does not exist.
CMake Error at build/llvm/LLVMBuild.cmake:58 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
llvm/CMakeLists.txt:402 (include)
-- Targeting AArch64
-- Targeting ARM
-- Targeting Hexagon
-- Targeting Mips
-- Targeting PowerPC
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting X86
-- Found PkgConfig: C:/cygwin/bin/pkg-config.exe (found version "0.29.1")
-- Configuring incomplete, errors occurred!
See also "C:/Users/aballman/Desktop/sandboxes/keystone/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/aballman/Desktop/sandboxes/keystone/build/CMakeFiles/CMakeError.log".
Microsoft (R) Program Maintenance Utility Version 14.27.29009.1
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.
Using the manual instructions gives the same issues with not finding LLVMBuild.txt. This is performed within a Visual Studio 2019 Preview developer command prompt. It looks like something about the CMake files is confused and looking for cygwin paths instead of real paths.
Also, as a related question: are the build instructions accurate that compilation requires VS 2013 or older? If so, it would be nice to update so that the project can be compiled with a newer MSVC, like 2017 or 2019 since VS 2013 reached its mainstream end of life in 2019.