pyushkevich / greedy

Very fast greedy diffeomorphic registration code
GNU General Public License v3.0
59 stars 16 forks source link

Building on Fedora #14

Open alcir opened 4 years ago

alcir commented 4 years ago

I'm unable to build greedy on Fedora 31.

InsightToolkit-vtk-devel Version: 4.13.1 Cmake Version: 3.14.5

$ cmake ../greedy -DITK_DIR=/usr/lib64/cmake/InsightToolkit/
-- GREEDY Version: 1.0.1 Released Mar 21, 2019
-- GIT Info:
--   Branch : master
--   SHA    : 3ed5a0dc480bf0ca3f850e6783208bae3aef570c
--   Date   : 2019-10-18 05:35:03 -0400
-- Configuring done
CMake Error at CMakeLists.txt:195 (ADD_EXECUTABLE):
  Target "greedy" links to target "GTest::GTest" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
[...]

Then

$ make
[  5%] Building CXX object CMakeFiles/greedyapi.dir/src/lddmm_data.cxx.o
In file included from /usr/include/InsightToolkit/itkNumericTraits.h:51,
                 from /home/user/Downloads/greedy/src/lddmm_data.h:31,
                 from /home/user/Downloads/greedy/src/lddmm_data.cxx:27:
/usr/include/vxl/vcl/vcl_limits.h:11:5: warning: #warning "This header will be removed in future versions of VXL.  Use equivalent C++11 header instead. see: vxl/scripts/UseStandardHeaders.py" [-Wcpp]
   11 |   # warning "This header will be removed in future versions of VXL.  Use equivalent C++11 header instead. see: vxl/scripts/UseStandardHeaders.py"
      |     ^~~~~~~
/home/user/Downloads/greedy/src/lddmm_data.cxx: In instantiation of ‘static void LDDMMData::img_downsample(LDDMMData::ImageType*, LDDMMData::ImageType*, double) [with TFloat = float; unsigned int VDim = 2; LDDMMData::ImageType = itk::Image]’:
/home/user/Downloads/greedy/src/lddmm_data.cxx:2008:16:   required from here
/home/user/Downloads/greedy/src/lddmm_data.cxx:1622:37: error: ‘vcl_ceil’ was not declared in this scope
 1622 |     sz[i] = (unsigned long) vcl_ceil(src->GetBufferedRegion().GetSize()[i] / factor);
      |                             ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/Downloads/greedy/src/lddmm_data.cxx: In instantiation of ‘static void LDDMMData::img_downsample(LDDMMData::ImageType*, LDDMMData::ImageType*, double) [with TFloat = float; unsigned int VDim = 3; LDDMMData::ImageType = itk::Image]’:
/home/user/Downloads/greedy/src/lddmm_data.cxx:2009:16:   required from here
/home/user/Downloads/greedy/src/lddmm_data.cxx:1622:37: error: ‘vcl_ceil’ was not declared in this scope
[...]
pyushkevich commented 4 years ago

I don't think you can successfully build against system ITK. ITK changes dependencies frequently. Build your own ITK (4.13.2) and then use the same flags to build greedy. Should work...

On Wed, Nov 13, 2019 at 11:46 AM Alessio notifications@github.com wrote:

I'm unable to build greedy on Fedora 31.

InsightToolkit-vtk-devel Version: 4.13.1 Cmake Version: 3.14.5

$ cmake ../greedy -DITK_DIR=/usr/lib64/cmake/InsightToolkit/

-- GREEDY Version: 1.0.1 Released Mar 21, 2019

-- GIT Info:

-- Branch : master

-- SHA : 3ed5a0dc480bf0ca3f850e6783208bae3aef570c

-- Date : 2019-10-18 05:35:03 -0400

-- Configuring done

CMake Error at CMakeLists.txt:195 (ADD_EXECUTABLE):

Target "greedy" links to target "GTest::GTest" but the target was not

found. Perhaps a find_package() call is missing for an IMPORTED target, or

an ALIAS target is missing?

[...]

Then

$ make [ 5%] Building CXX object CMakeFiles/greedyapi.dir/src/lddmm_data.cxx.o In file included from /usr/include/InsightToolkit/itkNumericTraits.h:51, from /home/user/Downloads/greedy/src/lddmm_data.h:31, from /home/user/Downloads/greedy/src/lddmm_data.cxx:27: /usr/include/vxl/vcl/vcl_limits.h:11:5: warning: #warning "This header will be removed in future versions of VXL. Use equivalent C++11 header instead. see: vxl/scripts/UseStandardHeaders.py" [-Wcpp] 11 | # warning "This header will be removed in future versions of VXL. Use equivalent C++11 header instead. see: vxl/scripts/UseStandardHeaders.py" | ^~~ /home/user/Downloads/greedy/src/lddmm_data.cxx: In instantiation of ‘static void LDDMMData<TFloat, VDim>::img_downsample(LDDMMData<TFloat, VDim>::ImageType, LDDMMData<TFloat, VDim>::ImageType, double) [with TFloat = float; unsigned int VDim = 2; LDDMMData<TFloat, VDim>::ImageType = itk::Image<float, 2>]’: /home/user/Downloads/greedy/src/lddmm_data.cxx:2008:16: required from here /home/user/Downloads/greedy/src/lddmm_data.cxx:1622:37: error: ‘vcl_ceil’ was not declared in this scope 1622 | sz[i] = (unsigned long) vcl_ceil(src->GetBufferedRegion().GetSize()[i] / factor); | ~~^~~~~~~~~~ /home/user/Downloads/greedy/src/lddmm_data.cxx: In instantiation of ‘static void LDDMMData<TFloat, VDim>::img_downsample(LDDMMData<TFloat, VDim>::ImageType, LDDMMData<TFloat, VDim>::ImageType, double) [with TFloat = float; unsigned int VDim = 3; LDDMMData<TFloat, VDim>::ImageType = itk::Image<float, 3>]’: /home/user/Downloads/greedy/src/lddmm_data.cxx:2009:16: required from here /home/user/Downloads/greedy/src/lddmm_data.cxx:1622:37: error: ‘vcl_ceil’ was not declared in this scope [...]

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pyushkevich/greedy/issues/14?email_source=notifications&email_token=AAJPEW4BHCZX426X4BNOIZLQTQVM7A5CNFSM4JM6F6DKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HZCKHLQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJPEW2BAXIEC3ZJRANB33LQTQVM7ANCNFSM4JM6F6DA .

-- Paul A. Yushkevich, Ph.D. Associate Professor Penn Image Computing and Science Laboratory Department of Radiology University of Pennsylvania

alcir commented 4 years ago

I think that, wanting to create an RPM package to include in the distribution, I am forced to build stuff against system libraries and headers.

pyushkevich commented 4 years ago

Sorry, I did not realize you were building an RPM. It does seem like an issue of some vnl include missing both here and for C3D.

On Thu, Nov 14, 2019 at 11:19 AM Alessio notifications@github.com wrote:

I think that, wanting to create an RPM package to include in the distribution, I am forced to build stuff against system libraries and headers.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pyushkevich/greedy/issues/14?email_source=notifications&email_token=AAJPEWZIANS2IYHR2W4ZEILQTV27PA5CNFSM4JM6F6DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEECMVHA#issuecomment-553962140, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJPEWZOPDDYVH3A6QTYPF3QTV27PANCNFSM4JM6F6DA .

-- Paul A. Yushkevich, Ph.D. Associate Professor Penn Image Computing and Science Laboratory Department of Radiology University of Pennsylvania