Compiling on Windows

549 views
Skip to first unread message

Angus Lau

unread,
Jul 15, 2015, 7:27:17 PM7/15/15
to gadg...@googlegroups.com
Hi there,

I am having trouble building on a Windows machine. I am using the Windows VS2013 instructions (https://github.com/gadgetron/gadgetron/wiki/Windows-Installation-VS2013) on a machine with a GPU.

I've attached the full output of running compile_gadgetron.bat, which I get by running

1. compile_ismrmrd.bat (compiles fine)
2. compile_gadgetron.bat


The output of the msbuild step is long but the final errors are:

         c:\gadgetron\projects\gadgetron\toolboxes\nfft\gpu\cuNFFT.h(276): warning : field of class type without a DLL interface used in a class with a DLL interface [C:\gadgetron\projects\compiling\gadgetron\toolboxes\nfft\gpu\gadgetron_toolbox_gpunfft.vcxproj]


       "C:\gadgetron\projects\compiling\gadgetron\INSTALL.vcxproj" (default target) (1) ->
       "C:\gadgetron\projects\compiling\gadgetron\ALL_BUILD.vcxproj" (default target) (2) ->
       "C:\gadgetron\projects\compiling\gadgetron\apps\standalone\gpu\ct\xray\CBCT_reconstruct_FDK_3d.vcxproj" (default target) (5) ->
       "C:\gadgetron\projects\compiling\gadgetron\toolboxes\nfft\gpu\gadgetron_toolbox_gpunfft.vcxproj" (default target) (17) ->
       (CustomBuild target) ->
         C:\Program Files (x86)\Windows Kits\8.1\Include\um\combaseapi.h(229): error : identifier "IUnknown" is undefined [C:\gadgetron\projects\compiling\gadgetron\toolboxes\nfft\gpu\gadgetron_toolbox_gpunfft.vcxproj]


       "C:\gadgetron\projects\compiling\gadgetron\INSTALL.vcxproj" (default target) (1) ->
       "C:\gadgetron\projects\compiling\gadgetron\ALL_BUILD.vcxproj" (default target) (2) ->
       "C:\gadgetron\projects\compiling\gadgetron\toolboxes\registration\optical_flow\gpu\gadgetron_toolbox_gpureg.vcxproj" (default target) (63) ->
         C:\Program Files (x86)\Windows Kits\8.1\Include\um\combaseapi.h(229): error : identifier "IUnknown" is undefined [C:\gadgetron\projects\compiling\gadgetron\toolboxes\registration\optical_flow\gpu\gadgetron_toolbox_gpureg.vcxproj]

    1200 Warning(s)
    2 Error(s)

Time Elapsed 00:05:00.93


The output of the cmake step is below.

For some reason it can't find GTEST_ROOT (even though the environment variable is set). Also cmake can't find BLAS and LAPACK (even though it finds MKL) -- if I add "-DLAPACK_LIBRARIES=%MKLROOT_PATH%/mkl/lib/intel64" "-DBLAS_LIBRARIES=%MKLROOT_PATH%/mkl/lib/intel64" to COMPILING_OPTIONS in gadgetron_windows_setup it finds them but the compilation still fails in the same way.

PROJECT_ROOT=C:\gadgetron\projects
GADGETRON_HOME=C:\gadgetron\projects\install\gadgetron
ISMRMRD_HOME=C:\gadgetron\projects\install
MSBUILD_PATH=C:/Progra~2/MSBuild/12.0/Bin/amd64
TARGET_COMPILER=
TARGET_PLATFORM="Visual Studio 12 Win64"
-- The C compiler identification is MSVC 18.0.21005.1
-- The CXX compiler identification is MSVC 18.0.21005.1
-- Check for working C compiler using: Visual Studio 12 2013 Win64
-- Check for working C compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files (x86)/Git/cmd/git.exe (found version "1.9.5.msysgit.1")
-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: /openmp 
-- Boost version: 1.56.0
-- Found the following Boost libraries:
--   system
--   thread
--   date_time
--   chrono
--   program_options
--   filesystem
-- Found ACE library: C:/gadgetron/Dependencies/ACE/ACE-6.3.0/ACE_wrappers/lib/ACE.lib;winmm
-- Found ACE include: C:/gadgetron/Dependencies/ACE/ACE-6.3.0/ACE_wrappers
-- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v7.0 (found suitable version "7.0", minimum required is "5.5")
-- Could NOT find GTest (missing:  GTEST_LIBRARY GTEST_MAIN_LIBRARY)
-- Found Armadillo: C:/gadgetron/Dependencies/Armadillo/armadillo-4.600.2/install_vc12/lib/armadillo.lib (found version "4.600.2")
-- Found HDF5: C:/Program Files/HDF_Group/HDF5/1.8.14/lib/hdf5.lib;C:/Program Files/HDF_Group/HDF5/1.8.14/lib/hdf5_cpp.lib;C:/Program Files/HDF_Group/HDF5/1.8.14/lib/hdf5.lib;C:/Program Files/HDF_Group/HDF5/1.8.14/lib/hdf5_hl.lib;C:/Program Files/HDF_Group/HDF5/1.8.14/lib/hdf5.lib (found suitable version "1.8.14", minimum required is "1.8")
-- Found FFTW3: C:/gadgetron/Dependencies/FFTW/FFTW3/libfftw3f-3.lib 
-- Found Ismrmrd: C:/gadgetron/projects/install/include 
-- Found MKL libraries: mkl_intel_lp64;mkl_intel_thread;mkl_core;libiomp5md
-- MKL_INCLUDE_DIR: C:\Program Files (x86)\Intel\Composer XE/mkl/include
-- MKL_LIB_DIR: C:\Program Files (x86)\Intel\Composer XE/mkl/lib/intel64
-- MKL_COMPILER_LIB_DIR: C:\Program Files (x86)\Intel\Composer XE/compiler/lib/intel64;C:\Program Files (x86)\Intel\Composer XE/lib/intel64
-- Looking for include file pthread.h
-- Looking for include file pthread.h - not found
-- Found Threads: TRUE 
-- A library with BLAS API not found. Please specify library location.
-- A library with BLAS API not found. Please specify library location.
-- LAPACK requires BLAS
-- A library with LAPACK API not found. Please specify library location.
-- Found PythonLibs: C:/Python27/libs/python27.lib (found suitable version "2.7.8", minimum required is "2")
-- Found PythonInterp: C:/Python27/python.exe (found version "2.7.8")
-- Found NumPy: version "1.9.0b2" C:/Python27/lib/site-packages/numpy/core/include
-- Could NOT find Matlab (missing:  MATLAB_INCLUDE_DIR MATLAB_LIBRARIES)
-- Found OpenGL: opengl32 
-- Could NOT find GLUT (missing:  GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- Found unsuitable Qt version "" from NOTFOUND
-- Found HDF5: C:/Program Files/HDF_Group/HDF5/1.8.14/lib/hdf5.lib;C:/Program Files/HDF_Group/HDF5/1.8.14/lib/hdf5_cpp.lib;C:/Program Files/HDF_Group/HDF5/1.8.14/lib/hdf5.lib;C:/Program Files/HDF_Group/HDF5/1.8.14/lib/hdf5_hl.lib;C:/Program Files/HDF_Group/HDF5/1.8.14/lib/hdf5.lib (found version "1.8.14")
-- Found ACE library: C:/gadgetron/Dependencies/ACE/ACE-6.3.0/ACE_wrappers/lib/ACE.lib;winmm;winmm
-- Found ACE include: C:/gadgetron/Dependencies/ACE/ACE-6.3.0/ACE_wrappers
-- Boost version: 1.56.0
-- A library with BLAS API not found. Please specify library location.
-- A library with BLAS API not found. Please specify library location.
-- LAPACK requires BLAS
-- A library with LAPACK API not found. Please specify library location.
-- Boost version: 1.56.0
-- Found the following Boost libraries:
--   python
--   system
--   thread
-- Found PythonLibs: C:/Python27/libs/python27.lib (found version "2.7.8")
-- Boost version: 1.56.0
-- Found the following Boost libraries:
--   python
-- Boost version: 1.56.0
-- Found the following Boost libraries:
--   thread
--   system
--   date_time
--   chrono
-- Boost version: 1.56.0
-- Found the following Boost libraries:
--   program_options
--   thread
--   system
--   date_time
--   chrono
-- Found ACE library: C:/gadgetron/Dependencies/ACE/ACE-6.3.0/ACE_wrappers/lib/ACE.lib;winmm;winmm
-- Found ACE include: C:/gadgetron/Dependencies/ACE/ACE-6.3.0/ACE_wrappers
-- Boost version: 1.56.0
-- Found the following Boost libraries:
--   python
--   system
--   thread
-- C:/gadgetron/Dependencies/Boost/boost_1_56_0optimizedC:/gadgetron/Dependencies/Boost/boost_1_56_0/stage/lib/boost_python-vc120-mt-1_56.libdebugC:/gadgetron/Dependencies/Boost/boost_1_56_0/stage/lib/boost_python-vc120-mt-gd-1_56.liboptimizedC:/gadgetron/Dependencies/Boost/boost_1_56_0/stage/lib/boost_system-vc120-mt-1_56.libdebugC:/gadgetron/Dependencies/Boost/boost_1_56_0/stage/lib/boost_system-vc120-mt-gd-1_56.liboptimizedC:/gadgetron/Dependencies/Boost/boost_1_56_0/stage/lib/boost_thread-vc120-mt-1_56.libdebugC:/gadgetron/Dependencies/Boost/boost_1_56_0/stage/lib/boost_thread-vc120-mt-gd-1_56.lib
-- Found DCMTK: C:/gadgetron/Dependencies/dcmtk/dcmtk-3.6.0/install_vc12/include/dcmtk/config 
-- Boost version: 1.56.0
-- Found the following Boost libraries:
--   date_time
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
-- Found CPack generators: NSIS
-- Configuring done
-- Generating done
-- Build files have been written to: C:/gadgetron/projects/compiling/gadgetron


I'm not sure what other logs would be helpful so if there is anything else please let me know.

Thanks very much,
Angus


output.txt

Michael Hansen

unread,
Jul 15, 2015, 8:10:40 PM7/15/15
to Angus Lau, gadg...@googlegroups.com
Are you on Windows 8? Looks like it. At least you have the Windows 8 SDK in your path and some stuff is being included from it. 

If so, this is an untested (by us) configuration. That does not mean that it can't work, but (like all things Windows) it almost certainly will not work out of the box. 

I don't have a system that I can test this on, so I will have to rely on somebody else out there who has tried this. 

--
You received this message because you are subscribed to the Google Groups "Gadgetron" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gadgetron+...@googlegroups.com.
To post to this group, send email to gadg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gadgetron/b623310d-c039-4eb2-b358-3e2492c4476f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Angus Lau

unread,
Jul 15, 2015, 8:41:58 PM7/15/15
to Michael Hansen, gadg...@googlegroups.com
It's on Windows 7 (SP1), if that helps anyone who replies later.

Michael Hansen

unread,
Jul 15, 2015, 9:02:00 PM7/15/15
to Angus Lau, gadg...@googlegroups.com
I am wondering why your Windows 8 SDK is being included in the build. That is a bit strange. 

Angus Lau

unread,
Jul 15, 2015, 9:17:28 PM7/15/15
to Michael Hansen, gadg...@googlegroups.com
It's weird, I agree. I'm not sure why at the moment.

Adding the following lines to CMakeLists.txt inside the root gadgetron source directory seems to complete the compilation. I copied them from the CMakeLists.txt file inside  toolboxes/mri/pmri/gpu.

if (WIN32)
  ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN)
endif (WIN32)

The hello world example works, but I will test more. It would be good to know if this is what others have arrived at too (and whether it will break something later).


Michael Hansen

unread,
Jul 15, 2015, 9:32:20 PM7/15/15
to Angus Lau, gadg...@googlegroups.com
Thanks. We may have to add this more broadly to the GPU code. 

Let us know how you get on with the testing and if you find some general settings, please submit a pull request on github, so that we can merge it in. 

Reply all
Reply to author
Forward
0 new messages