Add MSYS2 MinGW support for Windows

Issue #105 new
Denisov Timofey created an issue

Official site: https://www.msys2.org/

Current state when trying to compile on this toolchain:

ofry@games MINGW64 ~/vera
$ rm -rf build &&mkdir build && cd build && cmake -G"MSYS Makefiles" ..
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.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:/msys64/mingw64/bin/g++.exe
-- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Tclsh: C:/msys64/mingw64/bin/tclsh.exe (found version "8.6")
-- Found TCL: C:/msys64/mingw64/lib/libtcl.dll.a
-- Found TCLTK: C:/msys64/mingw64/lib/libtcl.dll.a
-- Found TK: C:/msys64/mingw64/lib/libtk.dll.a
-- Found PythonInterp: C:/msys64/mingw64/bin/python2.exe (found suitable version "2.7.16", minimum required is "2.0")
-- Found PythonLibs: C:/msys64/mingw64/lib/libpython2.7.dll.a (found suitable version "2.7.16", minimum required is "2.0")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
CMake Error at C:/msys64/mingw64/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Boost (missing: python) (found version "1.70.0")
Call Stack (most recent call first):
  C:/msys64/mingw64/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  C:/msys64/mingw64/share/cmake-3.15/Modules/FindBoost.cmake:2142 (find_package_handle_standard_args)
  src/boost.cmake:25 (find_package)
  src/CMakeLists.txt:16 (include)


-- Configuring incomplete, errors occurred!
See also "C:/msys64/home/ofry/vera/build/CMakeFiles/CMakeOutput.log".

But I have Boost with both Python 2 and Python 3 support.

Attachment with file list of mingw-w64-x86_64-boost pacman package included below.

Comments (1)

  1. Denisov Timofey reporter

    https://cmake.org/cmake/help/latest/module/FindBoost.html

    Note that Boost Python components require a Python version suffix (Boost 1.67 and later), e.g. python36 or python27 for the versions built against Python 3.6 and 2.7, respectively. This also applies to additional components using Python including mpi_python and numpy. Earlier Boost releases may use distribution-specific suffixes such as 2, 3 or 2.7. These may also be used as suffixes, but note that they are not portable.

  2. Log in to comment