SIRF-SuperBuild build fails on Windows with the error message from CMake:
8> -- FFTW3 WINDOWS libraries: FFTW3F_LIBRARY-NOTFOUND
8> CMake Error at C:/Program Files/CMake/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
8> Could NOT find FFTW3 (missing: FFTW3F_LIBRARY FFTW3_INCLUDE_DIR)
8> Call Stack (most recent call first):
8> C:/Program Files/CMake/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
8> C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/INSTALL/lib/cmake/ISMRMRD/FindFFTW3.cmake:114 (find_package_handle_standard_args)
8> src/xGadgetron/CMakeLists.txt:31 (find_package)
CMake GUI however displays both 'missing' items with correct values!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
It looks like the error is coming from SIRF (thus xGadgetron
), but I would have guessed that when you say you're looking at the CMake GUI, you're actually looking at the CMake of the superbuild. Is that correct?
If so, it sounds like FFTW3F_LIBRARY
isn't being passed from the superbuild to SIRF. You could check this by looking at builds/SIRF/build/CMakeCache.txt
and looking for FFTW3F_LIBRARY
there.
Here are the arguments in External_SIRF.cmake
:
CMAKE_ARGS
-DCMAKE_PREFIX_PATH=${SUPERBUILD_INSTALL_DIR}
-DCMAKE_LIBRARY_PATH=${SUPERBUILD_INSTALL_DIR}/lib
-DCMAKE_INSTALL_PREFIX=${SIRF_Install_Dir}
-DBOOST_INCLUDEDIR=${BOOST_ROOT}/include/
-DBOOST_LIBRARYDIR=${BOOST_LIBRARY_DIR}
-DBOOST_ROOT=${BOOST_ROOT}
-DMatlab_ROOT_DIR=${Matlab_ROOT_DIR}
-DMATLAB_ROOT=${Matlab_ROOT_DIR} # pass this for compatibility with old SIRF
-DMATLAB_DEST_DIR=${MATLAB_DEST_DIR}
-DSTIR_DIR=${STIR_DIR}
-DHDF5_ROOT=${HDF5_ROOT}
-DHDF5_INCLUDE_DIRS=${HDF5_INCLUDE_DIRS}
-DISMRMRD_DIR=${ISMRMRD_DIR}
-DSWIG_EXECUTABLE=${SWIG_EXECUTABLE}
-DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
-DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIRS}
-DPYTHON_LIBRARY=${PYTHON_LIBRARIES}
-DPYTHON_DEST_DIR=${PYTHON_DEST_DIR}
-DPYTHON_STRATEGY=${PYTHON_STRATEGY}
-DNiftyReg_Binary_DIR=${NiftyReg_Binary_DIR}
It doesn't look like FFTW3F_LIBRARY
is being passed, so maybe you just need to add it in.
Thanks, it worked!
I added to CMAKE_ARGS
-DFFTW3_INCLUDE_DIR=${FFTW3_ROOT_DIR}
-DFFTW3F_LIBRARY=${FFTW3F_LIBRARY}
where
if (WIN32)
set(FFTW3F_LIBRARY ${FFTW3_ROOT_DIR}/libfftw3f-3.lib)
else()
set(FFTW3F_LIBRARY ${FFTW3_ROOT_DIR}/libfftw3f.so)
endif()
I hope this will not break anything - any comments anyone?
I would have thought that you don't need to set any variables, since these would all be set in External_FFTW3.cmake
.
When I'm debugging, I print all available CMake variables like this:
message(STATUS "print all variables...")
get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
message(FATAL_ERROR "all variables printed.")
If I were you, I would put this somewhere in your External_SIRF.cmake
file, and check whether FFTW3F_LIBRARY
is already correct (it would save you having to do an if
/else
).
will try later
now i have run into another problem when trying to SuperBuild with DEVEL_BUILD on:
8> CMake Error at C:/Program Files/CMake/share/cmake-3.12/Modules/FindBoost.cmake:2048 (message):
8> Unable to find the requested Boost libraries.
8>
8> Boost version: 1.65.1
8>
8> Boost include path:
8> C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/INSTALL/include/boost-1_65_1
8>
8>
8> Could not find the following Boost libraries:
8>
8> boost_system
8> boost_filesystem
8> boost_thread
8> boost_date_time
8> boost_chrono
8>
8> Some (but not all) of the required Boost libraries were found. You may
8> need to install these additional Boost libraries. Alternatively, set
8> BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
8> to the location of Boost.
8> Call Stack (most recent call first):
8> src/xGadgetron/cGadgetron/CMakeLists.txt:18 (find_package)
8>
8>
8> CMake Deprecation Warning at C:/Program Files/CMake/share/cmake-3.12/Modules/UseSWIG.cmake:492 (message):
8> SWIG_ADD_MODULE is deprecated. Use SWIG_ADD_LIBRARY instead.
8> Call Stack (most recent call first):
8> src/xGadgetron/pGadgetron/CMakeLists.txt:37 (SWIG_ADD_MODULE)
8>
8>
8> CMake Error at C:/Program Files/CMake/share/cmake-3.12/Modules/FindBoost.cmake:2048 (message):
8> Unable to find the requested Boost libraries.
8>
8> Boost version: 1.65.1
8>
8> Boost include path:
8> C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/INSTALL/include/boost-1_65_1
8>
8>
8> Could not find the following Boost libraries:
8>
8> boost_system
8> boost_thread
8> boost_filesystem
8>
8> Some (but not all) of the required Boost libraries were found. You may
8> need to install these additional Boost libraries. Alternatively, set
8> BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
8> to the location of Boost.
8> Call Stack (most recent call first):
8> src/xGadgetron/mGadgetron/CMakeLists.txt:21 (find_package)
8>
8>
8> -- setup.py:pGadgetron<-sirf.Gadgetron
8> -- setup.py:pSTIR<-sirf.STIR
8> -- setup.py:pUtilities<-sirf.Utilities
8> -- setup.py:pygadgetron<-sirf.pygadgetron
8> -- setup.py:pystir<-sirf.pystir
8> -- setup.py:pyiutilities<-sirf.pyiutilities
8> -- setup.py:C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/INSTALL/python/setup.py
8>CUSTOMBUILD : CMake error : The following variables are used in this project, but they are set to NOTFOUND.
8> -- Configuring incomplete, errors occurred!
8> See also "C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/builds/SIRF/build/CMakeFiles/CMakeOutput.log".
8> See also "C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/builds/SIRF/build/CMakeFiles/CMakeError.log".
8> Please set them or make sure they are set and tested correctly in the CMake files:
8> Boost_CHRONO_LIBRARY_DEBUG (ADVANCED)
8> linked by target "cstir" in directory C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/sources/SIRF/src/xSTIR/cSTIR
8> Boost_CHRONO_LIBRARY_RELEASE (ADVANCED)
8> linked by target "cstir" in directory C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/sources/SIRF/src/xSTIR/cSTIR
8> Boost_DATE_TIME_LIBRARY_DEBUG (ADVANCED)
8> linked by target "cstir" in directory C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/sources/SIRF/src/xSTIR/cSTIR
8> Boost_DATE_TIME_LIBRARY_RELEASE (ADVANCED)
8> linked by target "cstir" in directory C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/sources/SIRF/src/xSTIR/cSTIR
8> Boost_FILESYSTEM_LIBRARY_DEBUG (ADVANCED)
8> linked by target "cstir" in directory C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/sources/SIRF/src/xSTIR/cSTIR
8> Boost_FILESYSTEM_LIBRARY_RELEASE (ADVANCED)
8> linked by target "cstir" in directory C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/sources/SIRF/src/xSTIR/cSTIR
8> Boost_SYSTEM_LIBRARY_DEBUG (ADVANCED)
8> linked by target "cstir" in directory C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/sources/SIRF/src/xSTIR/cSTIR
8> Boost_SYSTEM_LIBRARY_RELEASE (ADVANCED)
8> linked by target "cstir" in directory C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/sources/SIRF/src/xSTIR/cSTIR
8> Boost_THREAD_LIBRARY_DEBUG (ADVANCED)
8> linked by target "cstir" in directory C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/sources/SIRF/src/xSTIR/cSTIR
8> Boost_THREAD_LIBRARY_RELEASE (ADVANCED)
8> linked by target "cstir" in directory C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/sources/SIRF/src/xSTIR/cSTIR
8>
9>------ Skipped Build: Project: ALL_BUILD, Configuration: Release x64 ------
9>Project not selected to build for this solution configuration
BOOST_LIBRARYDIR was set as suggested (to Boost/bin.v2/libs)
Not sure for Windows, but try setting BOOST_ROOT
to C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/INSTALL/
. If you can't seen an option for this in your CMake GUI, then try:
cmake . -DBOOST_ROOT=C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/INSTALL/
no, it does not help, same error message
Well again, this looks like a SIRF error (not superbuild), so check the value of BOOST_ROOT
in builds/SIRF/build/CMakeCache.txt
.
I never succeeded to get CMake to correctly find a Boost version that we compile. It's a very complicated moving target with boost renaming libraries in the build schemes, and CMake trying to catch-up.
I very much recommend to install the Boost binaries as they recommend, and set USE_SYSTEM_BOOST=ON
.
Regarding the missing FFTW
stuff, @evgueni-ovtchinnikov can you give more information on how you're running this? If USE_SYSTEM_FFTW=ON
, see #147.
Otherwise, I'm surprised as it searches for the library with find_library , see for example here. I thought this would go and search in our install directory., but I admit that I cannot see anything related to that in the find_library
doc (but If it doesn't, how come USE_SYSTEM_FFTW=OFF
works apparently on the VM?)
See #7 for other remaining issues with the Windows build. Note however that I succesfully build on Windows 10 with CMake 3.13.2 with USE_SYSTEM_BOOST=ON
and USE_SYSTEM_FFTW3=ON
same problem with boost on windows 7
all boost libraries are actually present in INSTALL/lib
, but there are no respective dlls in INSTALL/bin
, which is a likely reason for the error messages
moreover, there are no boost dlls in build/SIRF-SuperBuild at all
Surely all the dlls belong in INSTALL/lib
, and not in INSTALL/bin
, so it's normal that there aren't any dlls in INSTALL/bin
?
Please do not waste time trying to set USE_SYSTEM_BOOST=OFF
on Windows. It's going to be a struggle. Instead, install the boost binaries, set the BOOST_ROOT environment (or CMake) variable.
no, it does not help, same error message
—
installed boost_1_65_1, boost is ok, back to fftw3 problem:
-- FFTW3 WINDOWS libraries: FFTW3F_LIBRARY-NOTFOUND
10> CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
10> Could NOT find FFTW3 (missing: FFTW3F_LIBRARY FFTW3_INCLUDE_DIR)
10> Call Stack (most recent call first):
10> C:/Program Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
10> C:/Users/wps46139/Documents/GitHub/build/SIRF-SuperBuild/INSTALL/lib/cmake/ISMRMRD/FindFFTW3.cmake:114 (find_package_handle_standard_args)
10> src/xGadgetron/CMakeLists.txt:36 (find_package)
This commit makes little sense to me, given the discussion in #147. Maybe I was incorrect there.
In any case,
USE_SYSTEM_FFTW3=OFF
, those variables aren't set.Can we do this via a PR please?
Reopened #197.
This re-closed itself automatically, not sure why.
Reopened #197.
ah... Thanks!
my standalone SIRF has CMake option SIRF_INSTALL_DEPENDENCIES
, which forces copying boost dlls to INSTALL/bin
, whereas SIRF-SuperBuild does not have one, and Python and Matlab fail to load SIRF Gadgetron libraries
Matlab fails with the error message
'There was an error loading the library "C:\Users\wps46139\Documents\GitHub\build\SIRF-SuperBuild\INSTALL\matlab\mgadgetron.mexw64"
Missing symbol 'H5P_CLS_DATASET_CREATE_ID_g' in 'C:\Program Files\MATLAB\R2017a/bin/win64\hdf5.dll' required by 'C:\Users\wps46139\Documents\GitHub\build\SIRF-SuperBuild\INSTALL\bin\ismrmrd.dll->C:\Users\wps46139\Documents\GitHub\build\SIRF-SuperBuild\INSTALL\matlab\mgadgetron.mexw64'
Missing symbol 'H5P_CLS_LINK_CREATE_ID_g' in 'C:\Program Files\MATLAB\R2017a/bin/win64\hdf5.dll' required by 'C:\Users\wps46139\Documents\GitHub\build\SIRF-SuperBuild\INSTALL\bin\ismrmrd.dll->C:\Users\wps46139\Documents\GitHub\build\SIRF-SuperBuild\INSTALL\matlab\mgadgetron.mexw64''
apparently there is a conflict between HDF5 libraries used by SuperBuild and matlab's ones
overwriting matlab hdf5 dlls (luckily, there are only two of them) does fix the problem, but it is hardly a solution many users would like :(
could prefix to matlab's path. Can also contact matlab to get them to update the dlls (I've done this before)
This is the same problem as what we're having with Boost CCPPETMR/SIRF#240.
Like there, I think the best thing to do is to build SIRF with the same version as what is used by Matlab. That implies that we need to check what the HDF5 version is for different Matlab versions. Fun.
@evgueni-ovtchinnikov would you be able to send an email to Mathworks support requesting the relevant information (for both HDF5 and Boost). Best to explain them why. feel free to point them to this issue.
Info from MathWorks:
The BOOST libraries that MATLAB internally uses are as follows:
MATLAB R2016a - R2017b Boost library version 1.56.
MATLAB R2014a to R2015b Boost library version is 1.49
From MATLAB R2018a, our development team has eliminated the compatibility restrictions for the Boost C++ Library.HDF5 library versions can be got from the MATLAB function,
[majnum,minnum,relnum] = H5.get_libversion()
Documentation link: https://www.mathworks.com/help/matlab/ref/h5.get_libversion.html
The code here illustrates how to call matlab (will need to use $(Matlab_MAIN_PROGRAM)
). Here is an example for parse the output. The parsing is far too complicated for what we need of course.
Proposed FFT2 fix is in #204