Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Unable to compile SimpleElastix #470

Open
fernand-f opened this issue May 5, 2022 · 2 comments
Open

Unable to compile SimpleElastix #470

fernand-f opened this issue May 5, 2022 · 2 comments

Comments

@fernand-f
Copy link

Hello everyone,

I'm try to compile SimpleElastix on my linux environment, though I'm facing this issue at 79% of the compilation :

[ 79%] Building C object Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/hdf5-static.dir/__/H5lib_settings.c.o
[ 79%] Linking C static library ../../../../../../lib/libitkhdf5.a
[ 79%] Built target hdf5-static
make[3]: *** [Makefile:156: all] Error 2
make[2]: *** [CMakeFiles/ITK.dir/build.make:86: ITK-prefix/src/ITK-stamp/ITK-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:264: CMakeFiles/ITK.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Has someone an idea to resolve it? Thank you very much in advance.

@tomhampshire
Copy link

tomhampshire commented Aug 23, 2022

I'm guessing I've had the same error, which is defined further up in the stdout message:

   67 |   return v < 0 ? 0 : (v > std::numeric_limits<T>::max() ? std::numeric_limits<T>::max() : v);

To fix this, open build/ITK/Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmImageChangePhotometricInterpretation.h

and add:

#include <stdexcept>
#include <limits>

under #define GDCMIMAGECHANGEPHOTOMETRICINTERPRETATION_H

it should now compile. I'm guessing this needs patching.

System information:

  • arch linux
  • gcc (GCC) 12.2.0
  • cmake version 3.24.1

@NichD
Copy link

NichD commented Dec 19, 2022

Not sure if this issue has been resolved elsewhere, but I can confirm adding those two #include statements at the appropriate location resolved that error for me. I encountered a different issue downstream that is related to my local Ruby setup (or lack thereof) - 'Could NOT find Ruby (missing: Ruby_EXECUTABLE Ruby_LIBRARY) (found suitable version "3.0.2", minimum required is "1.8.0")'.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants