Skip to content

./configure fails on Windows/MSYS2 #34489

Closed
@petrochenkov

Description

@petrochenkov

The PR causing this is #34055
cc @brson @alexcrichton

How to reproduce: simply run ./configure on fresh or not so fresh clone of Rust repo using relatively recent MSYS2 (msys2-x86_64-20160205).
cmake package used: mingw64/mingw-w64-x86_64-cmake 3.4.1-1
Errors:

-- Constructing LLVMBuild project information
CMake Error: File /home/we/rust/src/llvm/LLVMBuild.txt does not exist.
CMake Error at C:/msys64/home/we/rust/x86_64-pc-windows-gnu/llvm/LLVMBuild.cmake:28 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:489 (include)


CMake Error: File /home/we/rust/src/llvm/bindings/LLVMBuild.txt does not exist.
CMake Error at C:/msys64/home/we/rust/x86_64-pc-windows-gnu/llvm/LLVMBuild.cmake:30 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:489 (include)


// ...
// Lots of "File does not exist" errors are skipped
// ...

CMake Error: File /home/we/rust/src/llvm/utils/llvm-build/llvmbuild/componentinfo.py does not exist.
CMake Error at C:/msys64/home/we/rust/x86_64-pc-windows-gnu/llvm/LLVMBuild.cmake:362 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:489 (include)


CMake Error: File /home/we/rust/src/llvm/utils/llvm-build/llvmbuild/util.py does not exist.
CMake Error at C:/msys64/home/we/rust/x86_64-pc-windows-gnu/llvm/LLVMBuild.cmake:364 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:489 (include)


-- LLVMHello ignored -- Loadable modules not supported on this platform.
-- Targeting X86
-- Targeting ARM
-- Targeting AArch64
-- Targeting Mips
-- Targeting PowerPC
-- BugpointPasses ignored -- Loadable modules not supported on this platform.
-- Configuring incomplete, errors occurred!
See also "C:/msys64/home/we/rust/x86_64-pc-windows-gnu/llvm/CMakeFiles/CMakeOutput.log".
See also "C:/msys64/home/we/rust/x86_64-pc-windows-gnu/llvm/CMakeFiles/CMakeError.log".
configure: error: LLVM cmake configure failed

All the files reported by CMake as missing actually exist, so there is probably some mis-translation between Linux-style msys file paths and Windows paths or something like that.

Non-mingw cmake package (msys/cmake 3.2.3-1) gives other errors (EDIT: irrelevant):

configure:  -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_ENABLE_ZLIB=OFF -DWITH_POLY=OFF -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_ENABLE_LIBEDIT=OFF -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ '-DCMAKE_C_FLAGS=' '-DCMAKE_CXX_FLAGS=' -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_TARGETS_TO_BUILD='X86;ARM;AArch64;Mips;PowerPC' -G 'Unix Makefiles' /home/we/rust/src/llvm/
-- The C compiler identification is GNU 4.9.3
-- The CXX compiler identification is GNU 4.9.3
-- The ASM compiler identification is GNU
-- Found assembler: /c/mingw-w64/x86_64-4.9.3-win32-seh-rt_v4-rev1/mingw64/bin/gcc.exe
System is unknown to cmake, create:
Platform/MINGW64_NT-6.3 to use this system, please send your config file to [email protected] so it can be added to cmake
-- Check for working C compiler: /c/mingw-w64/x86_64-4.9.3-win32-seh-rt_v4-rev1/mingw64/bin/gcc.exe
System is unknown to cmake, create:
Platform/MINGW64_NT-6.3 to use this system, please send your config file to [email protected] so it can be added to cmake
-- Check for working C compiler: /c/mingw-w64/x86_64-4.9.3-win32-seh-rt_v4-rev1/mingw64/bin/gcc.exe -- works
-- Detecting C compiler ABI info
System is unknown to cmake, create:
Platform/MINGW64_NT-6.3 to use this system, please send your config file to [email protected] so it can be added to cmake
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /c/mingw-w64/x86_64-4.9.3-win32-seh-rt_v4-rev1/mingw64/bin/g++.exe
System is unknown to cmake, create:
Platform/MINGW64_NT-6.3 to use this system, please send your config file to [email protected] so it can be added to cmake
-- Check for working CXX compiler: /c/mingw-w64/x86_64-4.9.3-win32-seh-rt_v4-rev1/mingw64/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
System is unknown to cmake, create:
Platform/MINGW64_NT-6.3 to use this system, please send your config file to [email protected] so it can be added to cmake
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for dirent.h
System is unknown to cmake, create:
Platform/MINGW64_NT-6.3 to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for dirent.h - found
-- Looking for dlfcn.h
System is unknown to cmake, create:
Platform/MINGW64_NT-6.3 to use this system, please send your config file to [email protected] so it can be added to cmake
-- Looking for dlfcn.h - not found

// ...
// etc
// ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windowsOperating system: WindowsO-windows-gnuToolchain: GNU, Operating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions