NOTE: These instructions are for compiling the development branch.
NOTE: Boost now needs to be at least version 1.71.
You can also compile with meson instead of cmake. Meson allows using linux to generate windows binaries (“cross-compiling”).
Download and install 64-bit cygwin (setup-x86_64.exe). Make sure you include the following packages:
(Cygwin package versions are from 5/20202. Newer versions may work, but see special version notes below)
package | version |
---|---|
cmake | 3.14.5-1 |
cmake-debuginfo | 3.14.5-1 |
cmake-doc | 3.14.5-1 |
cmake-gui | 3.14.5-1 |
git | 2.21.0-1 |
make | 4.3-1 |
mingw64-x86_64-boost | 1.66.0-1 |
mingw64-x86_64-gcc-core | 9.2.0-2 |
mingw64-x86_64-gcc-g++ | 9.2.0-2 |
For RevStudio you will also need:
package | version |
---|---|
mingw64-x86_64-atk1.0 | 2.26.1-1 |
mingw64-x86_64-bzip2 | 1.0.6-4 |
mingw64-x86_64-cairo | 1.14.12-1 |
mingw64-x86_64-fribidi | 0.19.7-1 |
mingw64-x86_64-gdk-pixbuf2.0 | 2.36.11-1 |
mingw64-x86_64-glib2.0 | 2.54.3-1 |
mingw64-x86_64-gtk2.0 | 2.24.31-1 |
mingw64-x86_64-gtkmm2.4 | 2.24.5-1 |
mingw64-x86_64-pango1.0 | 1.40.14-1 |
Notes about the versions:
Boost and CMake:
It’s important that the version of Boost that you use be supported by the version of CMake that you use. You can check this by going to the package source for the CMake version you’re using e.g. 3.14.5. Search for _Boost_KNOWN_VERSIONS
and ensure your boost version appears in the list.
Retrieve the RevBayes sources.
git clone https://github.com/revbayes/revbayes.git revbayes
Compile RevBayes.
cd revbayes
cd projects/cmake
bash build.sh -DCMAKE_TOOLCHAIN_FILE=../mingw64_toolchain.cmake
or the RevStudio version
bash build.sh -DCMAKE_TOOLCHAIN_FILE=../mingw64_toolchain.cmake -cmd true
Library whack-a-mole
When you try to run the executable you will likely get an error about missing libraries.
Make a new directory and put the executable in it.
Then find the library from the error message in /usr/x86_64-w64-mingw32/sys-root/mingw/bin/
and copy it to the directory you put the exectuable in. Repeat this until you stop getting error messages.
At the time this was written (RevBayes v1.1.0), this consisted of: