Open ALEXJAZZ008008 opened 4 years ago
it didn't find ITK when building. Please give more info. Also have a look at ITK_DIR in builds/STIR/build/CMakeCache.txt
ITK_DIR does not exist in builds/STIR/build/CMakeCache.txt although DISABLE_ITK does and is set to ON which would explain my problem. In the SuperBuild there is no option to set DISABLE_ITK.
While looking I also found:
//No help, variable specified on the command line.
DISABLE_HDF5:BOOL=ON
//disable use of HDF5 libraries
DISABLE_HDF5_SUPPORT:BOOL=OFF
Which either seems wrong or redundant.
From SuperBuild USE_ITK=ON
.
DISABLE_HDF5_SUPPORT:BOOL
is a variable that no longer exists. if you delete it, it won't/shouldn't come back.
I have USE_ITK on, I am building ITK I am certain of that, I'm not using system ITK (even though I have it) because usually I have fewer problems with the SuperBuild if I allow it to do everything itself. Regardless DISABLE_ITK is on.
I cloned into a new directory for this yesterday so there must be remnants of DISABLE_HDF5_SUPPORT somewhere.
I have USE_ITK on, I am building ITK I am certain of that, I'm not using system ITK (even though I have it) because usually I have fewer problems with the SuperBuild if I allow it to do everything itself. Regardless DISABLE_ITK is on.
Shouldn't happen because of code snippet below, but I can't say more without seeing logs. Is this in a clean build location? If STIR had DISABLE_ITK
as a cached variable, for example, the SB wouldn't overwrite it.
I cloned into a new directory for this yesterday so there must be remnants of DISABLE_HDF5_SUPPORT somewhere.
With master
branch of SB? Are you running with an install script? Is it possible that you're setting it there?
Talking to @ALEXJAZZ008008 this was likely a case of running the SB with STIR_DISABLE_ITK=OFF
first and then rerunning with ON
. It might therefore be a case where the STIR cache settings are not updated (I wouldn't know why, or how that changed since recently).
By the way, there's https://github.com/SyneRBI/SIRF-SuperBuild/issues/61 which tells you that the CMake ExternalProject
stuff doesn't always update the CMake-cache of the dependent projects the way that you hope it does. I don't know if this is related or not.
looks like DISABLE_ITK
gets set to ON
, but doesn't get switched back off.
@ALEXJAZZ008008 can you try adding this below the block:
if (USE_ITK)
set(STIR_CMAKE_ARGS ${STIR_CMAKE_ARGS} -DDISABLE_ITK:BOOL=OFF)
endif()
Better:
if (NOT USE_ITK)
set(STIR_CMAKE_ARGS ${STIR_CMAKE_ARGS} -DDISABLE_ITK:BOOL=ON)
else()
set(STIR_CMAKE_ARGS ${STIR_CMAKE_ARGS} -DDISABLE_ITK:BOOL=OFF)
if (USE_SYSTEM_ITK)
set(STIR_CMAKE_ARGS ${STIR_CMAKE_ARGS} -DITK_DIR:PATH=${ITK_DIR})
endif()
The TOF branch of STIR tagged at 3.1 and a version of SIRF which will build with this can be built using ALEXJAZZ008008/SIRF-SuperBuild_super_build as:
./SIRF-SuperBuild_super_build.sh 15 -c -2
However the master branch of SIRF cannot be built at the moment, see the issue over there.
Here's the link to your script https://github.com/ALEXJAZZ008008/SIRF-SuperBuild_super_build/blob/master/SIRF-SuperBuild_super_build.sh
i don't see anything special/relevant in the script aside from that it wipes any previous builds, but feel free to correct me.
We looked at this, and the issue was that CMake included an include path where an older version of STIR was installed, even though STIR_DIRS
was ok. We didn't manage to find out which find_package
statement was the culprit.
This is likely caused by to the somewhat wide search settings used by find_package
, see https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure. In particular, we suspected step 5 "Search the standard system environment variables." @ALEXJAZZ008008 had the old version of SIRF in his PATH
and LD_LIBRARY_PATH
by sourcing its env_ccppetmr.sh
.
It might be possible to narrow the search, but that could also be undesirable.
@ALEXJAZZ008008 could you confirm if you solved this by deleting the old SIRF install path, or by not calling env_ccppetmr.sh
?
If I select for STIR to be built with ITK I get the following error when trying to use stir_math with ITK:
With this par file:
There are no build errors.