[llvm-dev] Error in Windows build from release_40 branch

Stephan Mühlstrasser via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 7 11:13:25 PST 2017


Am 06.03.2017 um 23:25 schrieb Hans Wennborg:
> On Sun, Mar 5, 2017 at 12:45 AM, Stephan Mühlstrasser via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> I'm trying to do a build and install on Windows 10 with Visual Studio 2015
>> Community Edition for the X86 and ARM targets, from the current release_40
>> branch. While compilation completes without error, the INSTALL target fails
>> with the following error:
>>
>> 54>  CMake Error at projects/compiler-rt/lib/builtins/cmake_install.cmake:34
>> (file):
>> 54>    file INSTALL cannot find
>> 54>
>> "E:/Users/stm/Documents/GIT/llvm-build-4.0/$(Configuration)/lib/clang/4.0.0/lib/windows/clang_rt.builtins-x86_64.lib".
>> 54>  Call Stack (most recent call first):
>> 54>    projects/compiler-rt/lib/cmake_install.cmake:33 (include)
>> 54>    projects/compiler-rt/cmake_install.cmake:33 (include)
>> 54>    projects/cmake_install.cmake:32 (include)
>> 54>    cmake_install.cmake:57 (include)
>>
>> I found a similar issue described in this thread:
>>
>> http://lists.llvm.org/pipermail/llvm-dev/2014-March/070889.html
>>
>> I'm assuming that I made a mistake, as otherwise others would have the
>> problem too, but it is unclear to me what I could be doing wrong. I'm
>> building from the Git mirror, with the following repository hierarchy:
>>
>> llvm
>> llvm\projects\compiler-rt
>> llvm\tools\clang
>> llvm\tools\clang\tools\extra
>> llvm\tools\lld
>>
>> I would be grateful for any hints, thanks!
>
> Can you share how you ran "cmake" and then how you're building?

Sure, this what I did (sorry, long protocol following):

1) Opened a Visual Studio 2015 Native Tools command prompt and launched 
cmake-gui.exe from there.

2) Configured "E:/Users/stm/Documents/GIT/llvm" as the source directory 
and "E:/Users/stm/Documents/GIT/llvm-build-4.0" as the build directory.

3) Clicked the "Configure" button.

4) Confirmed that the build directory should be created.

5) In the dialog box for the specifying the generator, left the defaults 
"Visual Studio 14 2015 Win64" and "Use default native compilers", 
clicked "Finish". This results in the following report in the output window:

-----------------------------------------------------------
The C compiler identification is MSVC 19.0.24215.1
The CXX compiler identification is MSVC 19.0.24215.1
The ASM compiler identification is MSVC
Found assembler: C:/Program Files (x86)/Microsoft Visual Studio 
14.0/VC/bin/x86_amd64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/x86_amd64/cl.exe -- 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 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/types.h
Looking for sys/types.h - 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 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 histedit.h
Looking for histedit.h - not found
Looking for CrashReporterClient.h
Looking for CrashReporterClient.h - not found
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
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 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 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 strtoll
Looking for strtoll - 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_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.
Sphinx disabled.
Go bindings disabled.
Could NOT find OCaml (missing:  OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
OCaml bindings disabled.
LLVM host triple: x86_64-pc-win32
LLVM default target triple: x86_64-pc-win32
Using Debug VC++ CRT: MDd
Using Release VC++ CRT: MD
Using MinSizeRel VC++ CRT: MD
Using RelWithDebInfo VC++ CRT: MD
Found PythonInterp: C:/Program Files/Python36/python.exe (found version 
"3.6")
Constructing LLVMBuild project information
LLVMHello ignored -- Loadable modules not supported on this platform.
Targeting AArch64
Targeting AMDGPU
Targeting ARM
Targeting BPF
Targeting Hexagon
Targeting Lanai
Targeting Mips
Targeting MSP430
Targeting NVPTX
Targeting PowerPC
Targeting RISCV
Targeting Sparc
Targeting SystemZ
Targeting X86
Targeting XCore
Looking for unwind.h
Looking for unwind.h - not found
Performing Test COMPILER_RT_HAS_FPIC_FLAG
Performing Test COMPILER_RT_HAS_FPIC_FLAG - Failed
Performing Test COMPILER_RT_HAS_FPIE_FLAG
Performing Test COMPILER_RT_HAS_FPIE_FLAG - Failed
Performing Test COMPILER_RT_HAS_FNO_BUILTIN_FLAG
Performing Test COMPILER_RT_HAS_FNO_BUILTIN_FLAG - Failed
Performing Test COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG
Performing Test COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG - Failed
Performing Test COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG
Performing Test COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG - Failed
Performing Test COMPILER_RT_HAS_FUNWIND_TABLES_FLAG
Performing Test COMPILER_RT_HAS_FUNWIND_TABLES_FLAG - Failed
Performing Test COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG
Performing Test COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG - Failed
Performing Test COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG
Performing Test COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG - Failed
Performing Test COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG
Performing Test COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG - Failed
Performing Test COMPILER_RT_HAS_FRTTI_FLAG
Performing Test COMPILER_RT_HAS_FRTTI_FLAG - Failed
Performing Test COMPILER_RT_HAS_FNO_RTTI_FLAG
Performing Test COMPILER_RT_HAS_FNO_RTTI_FLAG - Failed
Performing Test COMPILER_RT_HAS_FFREESTANDING_FLAG
Performing Test COMPILER_RT_HAS_FFREESTANDING_FLAG - Failed
Performing Test COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG
Performing Test COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG - Failed
Performing Test COMPILER_RT_HAS_STD_CXX11_FLAG
Performing Test COMPILER_RT_HAS_STD_CXX11_FLAG - Success
Performing Test COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC
Performing Test COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC - Failed
Performing Test COMPILER_RT_HAS_FNO_LTO_FLAG
Performing Test COMPILER_RT_HAS_FNO_LTO_FLAG - Failed
Performing Test COMPILER_RT_HAS_MSSE3_FLAG
Performing Test COMPILER_RT_HAS_MSSE3_FLAG - Failed
Performing Test COMPILER_RT_HAS_MSSE4_2_FLAG
Performing Test COMPILER_RT_HAS_MSSE4_2_FLAG - Failed
Performing Test COMPILER_RT_HAS_SYSROOT_FLAG
Performing Test COMPILER_RT_HAS_SYSROOT_FLAG - Failed
Performing Test COMPILER_RT_HAS_GR_FLAG
Performing Test COMPILER_RT_HAS_GR_FLAG - Success
Performing Test COMPILER_RT_HAS_GS_FLAG
Performing Test COMPILER_RT_HAS_GS_FLAG - Success
Performing Test COMPILER_RT_HAS_MT_FLAG
Performing Test COMPILER_RT_HAS_MT_FLAG - Success
Performing Test COMPILER_RT_HAS_Oy_FLAG
Performing Test COMPILER_RT_HAS_Oy_FLAG - Success
Performing Test COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG
Performing Test COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG - Failed
Performing Test COMPILER_RT_HAS_G_FLAG
Performing Test COMPILER_RT_HAS_G_FLAG - Failed
Performing Test COMPILER_RT_HAS_Zi_FLAG
Performing Test COMPILER_RT_HAS_Zi_FLAG - Success
Performing Test COMPILER_RT_HAS_WALL_FLAG
Performing Test COMPILER_RT_HAS_WALL_FLAG - Success
Performing Test COMPILER_RT_HAS_WERROR_FLAG
Performing Test COMPILER_RT_HAS_WERROR_FLAG - Failed
Performing Test COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG
Performing Test COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG - Failed
Performing Test COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG
Performing Test COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG - Failed
Performing Test COMPILER_RT_HAS_WC99_EXTENSIONS_FLAG
Performing Test COMPILER_RT_HAS_WC99_EXTENSIONS_FLAG - Failed
Performing Test COMPILER_RT_HAS_WGNU_FLAG
Performing Test COMPILER_RT_HAS_WGNU_FLAG - Failed
Performing Test COMPILER_RT_HAS_WNON_VIRTUAL_DTOR_FLAG
Performing Test COMPILER_RT_HAS_WNON_VIRTUAL_DTOR_FLAG - Failed
Performing Test COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG
Performing Test COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG - Failed
Performing Test COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG
Performing Test COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG - Failed
Performing Test COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG
Performing Test COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG - Failed
Performing Test COMPILER_RT_HAS_W4_FLAG
Performing Test COMPILER_RT_HAS_W4_FLAG - Success
Performing Test COMPILER_RT_HAS_WX_FLAG
Performing Test COMPILER_RT_HAS_WX_FLAG - Success
Performing Test COMPILER_RT_HAS_WD4146_FLAG
Performing Test COMPILER_RT_HAS_WD4146_FLAG - Success
Performing Test COMPILER_RT_HAS_WD4291_FLAG
Performing Test COMPILER_RT_HAS_WD4291_FLAG - Success
Performing Test COMPILER_RT_HAS_WD4221_FLAG
Performing Test COMPILER_RT_HAS_WD4221_FLAG - Success
Performing Test COMPILER_RT_HAS_WD4391_FLAG
Performing Test COMPILER_RT_HAS_WD4391_FLAG - Success
Performing Test COMPILER_RT_HAS_WD4722_FLAG
Performing Test COMPILER_RT_HAS_WD4722_FLAG - Success
Performing Test COMPILER_RT_HAS_WD4800_FLAG
Performing Test COMPILER_RT_HAS_WD4800_FLAG - Success
Looking for __func__
Looking for __func__ - found
Looking for fopen in c
Looking for fopen in c - not found
Looking for dlopen in dl
Looking for dlopen in dl - not found
Looking for shm_open in rt
Looking for shm_open in rt - not found
Looking for pow in m
Looking for pow in m - not found
Looking for pthread_create in pthread
Looking for pthread_create in pthread - not found
Looking for __cxa_throw in stdc++
Looking for __cxa_throw in stdc++ - not found
Compiler-RT supported architectures: x86_64
Looking for rpc/xdr.h
Looking for rpc/xdr.h - not found
Looking for tirpc/rpc/xdr.h
Looking for tirpc/rpc/xdr.h - not found
Performing Test COMPILER_RT_HAS_STD_C11_FLAG
Performing Test COMPILER_RT_HAS_STD_C11_FLAG - Failed
Performing Test COMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG
Performing Test COMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG - Failed
Performing Test COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG
Performing Test COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG - Failed
Performing Test COMPILER_RT_HAS_FREESTANDING_FLAG
Performing Test COMPILER_RT_HAS_FREESTANDING_FLAG - Failed
Performing Test COMPILER_RT_HAS_XRAY_COMPILER_FLAG
Performing Test COMPILER_RT_HAS_XRAY_COMPILER_FLAG - Failed
Performing Test COMPILER_RT_HAS_ATOMIC_KEYWORD
Performing Test COMPILER_RT_HAS_ATOMIC_KEYWORD - Failed
Builtin supported architectures: x86_64
Performing Test COMPILER_RT_TARGET_HAS_ATOMICS
Performing Test COMPILER_RT_TARGET_HAS_ATOMICS - Success
Performing Test COMPILER_RT_TARGET_HAS_FCNTL_LCK
Performing Test COMPILER_RT_TARGET_HAS_FCNTL_LCK - Failed
Looking for sys/resource.h
Looking for sys/resource.h - not found
Clang version: 4.0.0
SampleAnalyzerPlugin ignored -- Loadable modules not supported on this 
platform.
PrintFunctionNames ignored -- Loadable modules not supported on this 
platform.
AnnotateFunctions ignored -- Loadable modules not supported on this 
platform.
LLD version: 4.0.0
BugpointPasses ignored -- Loadable modules not supported on this platform.
Configuring done
---------------------------------------------------

6) Changed the following configuration variables to new values:

CMAKE_INSTALL_PREFIX: E:/Users/stm/local/llvm-4.0
LLVM_TARGETS_TO_BUILD: ARM;X86

7) Clicked "Configure" again. This results in the following report in 
the output window:

----------------------------------------------------
Warning: Did not find file Compiler/MSVC-ASM
Native target architecture is X86
Threads enabled.
Doxygen disabled.
Sphinx disabled.
Go bindings disabled.
Could NOT find OCaml (missing:  OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
OCaml bindings disabled.
LLVM host triple: x86_64-pc-win32
LLVM default target triple: x86_64-pc-win32
Using Debug VC++ CRT: MDd
Using Release VC++ CRT: MD
Using MinSizeRel VC++ CRT: MD
Using RelWithDebInfo VC++ CRT: MD
Constructing LLVMBuild project information
LLVMHello ignored -- Loadable modules not supported on this platform.
Targeting ARM
Targeting X86
Compiler-RT supported architectures: x86_64
Builtin supported architectures: x86_64
Clang version: 4.0.0
SampleAnalyzerPlugin ignored -- Loadable modules not supported on this 
platform.
PrintFunctionNames ignored -- Loadable modules not supported on this 
platform.
AnnotateFunctions ignored -- Loadable modules not supported on this 
platform.
LLD version: 4.0.0
BugpointPasses ignored -- Loadable modules not supported on this platform.
Configuring done
----------------------------------------------

8) Now clicked "Generate", which completed successfully.

9) Launched Visual Studio 2015 Community Edition and opened the solution 
"E:\Users\stm\Documents\GIT\llvm-build-4.0\LLVM.sln" generated by 
cmake-gui.exe.

10) In Visual Studio's project explorer, in folder 
"CMakePredefinedTargets" right-clicked the "INSTALL" to build it. After 
successful compilation the installation step itself fails with the 
previously described error message:

286>  CMake Error at 
projects/compiler-rt/lib/builtins/cmake_install.cmake:32 (file):
286>    file INSTALL cannot find
286> 
"E:/Users/stm/Documents/GIT/llvm-build-4.0/$(Configuration)/lib/clang/4.0.0/lib/windows/clang_rt.builtins-x86_64.lib".
286>  Call Stack (most recent call first):
286>    projects/compiler-rt/lib/cmake_install.cmake:33 (include)
286>    projects/compiler-rt/cmake_install.cmake:33 (include)
286>    projects/cmake_install.cmake:32 (include)
286>    cmake_install.cmake:57 (include)

> The mailing list thread you linked to talkes about
> "multi-configuration generators", such as MSBuild. Have you tried
> building with ninja (https://ninja-build.org/) instead?

No, I didn't try yet, I can try that next.

> Cheers,
> Hans

Thank you
--
Stephan




More information about the llvm-dev mailing list