IMP Manual
develop.5128fd965d,2024/12/03
|
We build and test IMP on Windows, built with the Microsoft Visual Studio compilers (we use Visual Studio 2017 for both the 32-bit and 64-bit Windows .exe
installers; for the Anaconda packages, which are built by conda-forge, VS 2019 is used). One complication is that different packages are compiled with different versions of Visual Studio, and mixing the different runtimes (msvc*.dll
) can cause odd behavior; therefore, we recommend building most of the dependencies from source code using the same version of Visual Studio that you're going to use to build IMP.
We recommend building within the Anaconda environment, since many of the dependencies are already built, and the procedure is scripted so it is more easily reproducible:
conda install conda-build unxutils
foo
you can start a Visual Studio command prompt, cd
to the directory above the foo
directory containing the conda build recipe then build it with conda build --python=3.9 foo
meta.yaml
file that applies any needed patches to make things work on Windows, and a bld.bat
file that automates the build itself.If you want to build outside of the Anaconda environment, the basic procedure we employed is as follows:
C:\Program Files\GnuWin32
. The sources, however, must be installed in a path that doesn't contain spaces (otherwise the Boost build will fail). We chose C:\zlib
.C:\Program Files\boost_1_53_0
), thenset INCLUDE=C:\Program Files\GnuWin32\include
bjam link=shared runtime-link=shared -sNO_ZLIB=0 -sZLIB_SOURCE=C:\zlib\1.2.3\zlib-1.2.3
cmake.exe -G "Visual Studio 10" -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON -DHDF5_BUILD_HL_LIB:BOOL=ON -DZLIB_INCLUDE_DIR="C:\Program Files\GnuWin32\include" -DZLIB_LIBRARY="C:\Program Files\GnuWin32\lib\zlib.lib" -DBUILD_SHARED_LIBS:BOOL=ON ..
libfftw3-3.lib
to fftw3.lib
and libfftw3-3.dll
to fftw3.dll
to help cmake find itsrc\gsl\1.8\gsl-1.8\VC8
subdirectorylibgsl.dll
and libgslcblas.dll
to a suitable location (we used C:\Program Files\gsl-1.8\lib
)libTAU.lib
to TAU.lib
to help cmake find it.opencv_*.lib
to a similar file without the version extension (e.g. copy opencv_ml244.lib
to opencv_ml.lib
) to help cmake find itSet up IMP by running something similar to
cmake <imp_source_directory> -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="/DBOOST_ALL_DYN_LINK /EHsc /D_HDF5USEDLL_ /DH5_BUILT_AS_DYNAMIC_LIB /DWIN32 /DGSL_DLL" -G "NMake Makefiles"
/bigobj
to CMAKE_CXX_CFLAGS
, particularly if building for 64-bit Windows.setup_environment.bat
file to set up the environment so all the programs and Python modules can be found. (This batch file needs to be run only once, not for each test.)