Topics

Build Under Windows

micheal.shoemaker@...
 

I've spent some time trying to get Dionysus 2 to build under Windows.  Here are my notes on getting it to build.  The versions listed are the ones that I used and I have some notes on versions that didn't work.  I hope this can help some people to get this working.

You'll need these dependencies:

MinGW 8.1.0 (The only other version I tried was 8.2.0, which will error on build.)  Download from: https://sourceforge.net/projects/mingw-w64/
- Install with these settings: Version: 8.1.0, Architecture: x86_64, Threads: posix, Exception: seh, Build version: 0
After installing, Copy C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\libexec\gcc\x86_64-w64-mingw32\8.1.0\liblto_plugin-0.dll to C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\lib\bfd-plugins

Boost 1.70 (Boost 1.69 requires a change to the CMakeLists.txt in dionysus.) Download from: https://www.boost.org/

Download and extract to C:\boost\
Add Variable 'BOOST_INCLUDE_DIR' with value 'C:\boost' to the environment variables.
This version of boost will give a warning on build:

BOOST_HEADER_DEPRECATED( "the facilities in <boost/timer/timer.hpp>" )

cmake 3.14.5 Download from: https://cmake.org/download/
Just install, no special notes.

Python 3.7.3 Download from: https://www.python.org/
Be sure to check the box to add to PATH

Build
Then, just clone the git (You may need to install git):

git clone https://github.com/mrzv/dionysus.git

Then run from the dionysus folder (from Powershell):

mkdir build
cd build
cmake -G “MinGW Makefiles” ..
 
mingw32-make.exe 

Then, you can copy the folder C:\path\to\dionysus\build\bindings\python\dionysus into your site-packages folder or project folder.

 

 

 

 

Dmitriy Morozov
 

This is fantastic. Thank you for these instructions. Building on Windows seems to be the most common question, and now we have this write-up to point people to.

Now if I could figure out how to get the conda script to follow these instructions automatically, it would probably eliminate the questions entirely.

I'm a little confused by the MinGW version issues. Can you say a little more about them? You mention version 8.1.0 and 8.2.0. Do you have a sense what the problem is with MinGW 8.2.0? That's probably worth addressing for future sanity.

Thanks again.
Dmitriy

On Wed, Jun 12, 2019 at 1:46 PM <micheal.shoemaker@...> wrote:
I've spent some time trying to get Dionysus 2 to build under Windows.  Here are my notes on getting it to build.  The versions listed are the ones that I used and I have some notes on versions that didn't work.  I hope this can help some people to get this working.

You'll need these dependencies:

MinGW 8.1.0 (The only other version I tried was 8.2.0, which will error on build.)  Download from: https://sourceforge.net/projects/mingw-w64/
- Install with these settings: Version: 8.1.0, Architecture: x86_64, Threads: posix, Exception: seh, Build version: 0
After installing, Copy C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\libexec\gcc\x86_64-w64-mingw32\8.1.0\liblto_plugin-0.dll to C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\lib\bfd-plugins

Boost 1.70 (Boost 1.69 requires a change to the CMakeLists.txt in dionysus.) Download from: https://www.boost.org/

Download and extract to C:\boost\
Add Variable 'BOOST_INCLUDE_DIR' with value 'C:\boost' to the environment variables.
This version of boost will give a warning on build:

BOOST_HEADER_DEPRECATED( "the facilities in <boost/timer/timer.hpp>" )

cmake 3.14.5 Download from: https://cmake.org/download/
Just install, no special notes.

Python 3.7.3 Download from: https://www.python.org/
Be sure to check the box to add to PATH

Build
Then, just clone the git (You may need to install git):

git clone https://github.com/mrzv/dionysus.git

Then run from the dionysus folder (from Powershell):

mkdir build
cd build
cmake -G “MinGW Makefiles” ..
 
mingw32-make.exe 

Then, you can copy the folder C:\path\to\dionysus\build\bindings\python\dionysus into your site-packages folder or project folder.

 

 

 

 

micheal.shoemaker@...
 

I went back and looked more into the MinGW version issue 8.2.0 issue.  Right now, I'm getting:

CMake Error at bindings/python/pybind11/tools/FindPythonLibsNew.cmake:122 (message):
  Python config failure: Python is 64-bit, chosen compiler is 32-bit

Even though gcc -v says it's x86_64.  This is 8.2 installed from MinGW's main page, but this version of gcc uses thread model win32, which causes all kinds of errors even with gcc 8.1.
If I could find a gcc 8.2 with x86_64 and posix thread model, then I believe it will work fine.

Dmitriy Morozov
 

Ah, I see. So it's an issue with the distribution of MinGW. That makes sense, and not something that we can fix.

Thanks again for figuring all this out.
Dmitriy

On Thu, Jun 13, 2019 at 8:26 AM <micheal.shoemaker@...> wrote:

I went back and looked more into the MinGW version issue 8.2.0 issue.  Right now, I'm getting:

CMake Error at bindings/python/pybind11/tools/FindPythonLibsNew.cmake:122 (message):
  Python config failure: Python is 64-bit, chosen compiler is 32-bit

Even though gcc -v says it's x86_64.  This is 8.2 installed from MinGW's main page, but this version of gcc uses thread model win32, which causes all kinds of errors even with gcc 8.1.
If I could find a gcc 8.2 with x86_64 and posix thread model, then I believe it will work fine.