Cannot compile ITK in CentOS 7

Hello, I have been trying to install ITK in my university’s interactive computing environment which runs Linux CentOS 7. Of course I do not have root access, so I’m not sure if that’s where the problem is coming from.

These are my steps:

  1. Clone the git repository into my $HOME directory
  2. mkdir ITK-build
  3. cd ITK-build
  4. ccmake …/ITK
  5. I run the configuration steps and everything seems to be working fine (hit the c key twice and then g)
  6. When I run make in the same directory, I get the following errors:

In file included from /home/hmonsiva/ITK-build/KWStyle/Utilities/boost/noncopyable.hpp(15),
from /home/hmonsiva/ITK-build/KWStyle/Utilities/boost/xpressive/detail/core/state.hpp(18),
from /home/hmonsiva/ITK-build/KWStyle/Utilities/boost/xpressive/detail/core/matcher/alternate_end_matcher.hpp(20),
from /home/hmonsiva/ITK-build/KWStyle/Utilities/boost/xpressive/detail/core/matchers.hpp(17),
from /home/hmonsiva/ITK-build/KWStyle/Utilities/boost/xpressive/regex_primitives.hpp(22),
from /home/hmonsiva/ITK-build/KWStyle/Utilities/boost/xpressive/xpressive_static.hpp(24),
from /home/hmonsiva/ITK-build/KWStyle/Utilities/boost/xpressive/xpressive.hpp(18),
from /home/hmonsiva/ITK-build/KWStyle/kwsParser.cxx(18):
/home/hmonsiva/ITK-build/KWStyle/Utilities/boost/core/noncopyable.hpp(42): error: defaulted default constructor cannot be constexpr because the corresponding implicitly declared default constructor would not be constexpr
BOOST_CONSTEXPR noncopyable() = default;
^

compilation aborted for /home/hmonsiva/ITK-build/KWStyle/kwsParser.cxx (code 2)
make[5]: *** [CMakeFiles/KWStyleLib.dir/kwsParser.cxx.o] Error 2
make[4]: *** [CMakeFiles/KWStyleLib.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [KWStyle-prefix/src/KWStyle-stamp/KWStyle-build] Error 2
make[1]: *** [CMakeFiles/KWStyle.dir/all] Error 2
make: *** [all] Error 2
hmonsiva@workbench-fe03:~/ITK-build $

Any help would be greatly appreciated! I need ITK to be able to install ANTs.

Hi. I’m not part of the ITK team, just a regular user.

  1. There is a CMakeCache.txt file in the build directory which shows your compilation options. This file may be useful to know what you are actually using to compile.
  2. Do you know if you have all the requirements? (e.g. boost libraries)

If this does not help, at least you know that someone read your post ( : . The developers will surely answer soon (they always do). Good luck!

You might be using too old version of ITK, or too new version of the compiler.