ITKVTKglue failing


(Rhodri Smith) #1

Hi I get this error when ticking the flag for ITKVTKglue when building ITK:

/vcl_compiler.h:243:0,

CMakeFiles/Makefile2:34960: recipe for target ‘Modules/Bridge/VtkGlue/src/CMakeFiles/ITKVtkGlue.dir/all’ failed

Lots of complaining regarding VCL and VNL

I am using cmake-gui 3.5.2 ITK 4.3.2, VTK-9.0 gcc 4.8.5 Ubuntu 16.04

Any suggestions: below is the full output:

 Building CXX object Modules/Bridge/VtkGlue/src/CMakeFiles/ITKVtkGlue.dir/QuickView.cxx.o
In file included from /home/petic/ITK/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h:243:0,
                 from /home/petic/ITK/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_limits.h:5,
                 from /home/petic/ITK/Modules/Core/Common/include/itkNumericTraits.h:45,
                 from /home/petic/ITK/Modules/Core/Common/include/itkPoint.h:22,
                 from /home/petic/ITK/Modules/Core/Common/include/itkContinuousIndex.h:21,
                 from /home/petic/ITK/Modules/Core/Common/include/itkImageRegion.h:34,
                 from /home/petic/ITK/Modules/Core/Common/include/itkImage.h:21,
                 from /home/petic/ITK/Modules/Bridge/VtkGlue/include/QuickView.h:25,
                 from /home/petic/ITK/Modules/Bridge/VtkGlue/src/QuickView.cxx:18:
/home/petic/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:366:60: error: ‘constexpr’ needed for in-class initialization of static data member ‘const float vnl_numeric_traits<float>::zero’ of non-integral type [-fpermissive]
   static const float zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0F);
                                                            ^
/home/petic/ITKbin/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_config_compiler.h:148:48: note: in definition of macro ‘VCL_STATIC_CONST_INIT_FLOAT_DECL’
 # define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
                                                ^
/home/petic/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:368:59: error: ‘constexpr’ needed for in-class initialization of static data member ‘const float vnl_numeric_traits<float>::one’ of non-integral type [-fpermissive]
   static const float one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0F);
                                                           ^
/home/petic/ITKbin/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_config_compiler.h:148:48: note: in definition of macro ‘VCL_STATIC_CONST_INIT_FLOAT_DECL’
 # define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
                                                ^
/home/petic/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:370:62: error: ‘constexpr’ needed for in-class initialization of static data member ‘const float vnl_numeric_traits<float>::maxval’ of non-integral type [-fpermissive]
   static const float maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(3.40282346638528860e+38F);
                                                              ^
/home/petic/ITKbin/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_config_compiler.h:148:48: note: in definition of macro ‘VCL_STATIC_CONST_INIT_FLOAT_DECL’
 # define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
                                                ^
/home/petic/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:389:61: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double vnl_numeric_traits<double>::zero’ of non-integral type [-fpermissive]
   static const double zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0);
                                                             ^
/home/petic/ITKbin/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_config_compiler.h:148:48: note: in definition of macro ‘VCL_STATIC_CONST_INIT_FLOAT_DECL’
 # define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
                                                ^
/home/petic/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:391:60: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double vnl_numeric_traits<double>::one’ of non-integral type [-fpermissive]
   static const double one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0);
                                                            ^
/home/petic/ITKbin/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_config_compiler.h:148:48: note: in definition of macro ‘VCL_STATIC_CONST_INIT_FLOAT_DECL’
 # define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
                                                ^
/home/petic/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:393:63: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double vnl_numeric_traits<double>::maxval’ of non-integral type [-fpermissive]
   static const double maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308);
                                                               ^
/home/petic/ITKbin/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_config_compiler.h:148:48: note: in definition of macro ‘VCL_STATIC_CONST_INIT_FLOAT_DECL’
 # define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
                                                ^
/home/petic/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:412:66: error: ‘constexpr’ needed for in-class initialization of static data member ‘const long double vnl_numeric_traits<long double>::zero’ of non-integral type [-fpermissive]
   static const long double zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0);
                                                                  ^
/home/petic/ITKbin/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_config_compiler.h:148:48: note: in definition of macro ‘VCL_STATIC_CONST_INIT_FLOAT_DECL’
 # define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
                                                ^
/home/petic/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:414:65: error: ‘constexpr’ needed for in-class initialization of static data member ‘const long double vnl_numeric_traits<long double>::one’ of non-integral type [-fpermissive]
   static const long double one VCL_STATIC_CONST_INIT_FLOAT_DECL(1.0);
                                                                 ^
/home/petic/ITKbin/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_config_compiler.h:148:48: note: in definition of macro ‘VCL_STATIC_CONST_INIT_FLOAT_DECL’
 # define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
                                                ^
/home/petic/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:416:68: error: ‘constexpr’ needed for in-class initialization of static data member ‘const long double vnl_numeric_traits<long double>::maxval’ of non-integral type [-fpermissive]
   static const long double maxval VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308);
                                                                    ^
/home/petic/ITKbin/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_config_compiler.h:148:48: note: in definition of macro ‘VCL_STATIC_CONST_INIT_FLOAT_DECL’
 # define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
                                                ^
Modules/Bridge/VtkGlue/src/CMakeFiles/ITKVtkGlue.dir/build.make:62: recipe for target 'Modules/Bridge/VtkGlue/src/CMakeFiles/ITKVtkGlue.dir/QuickView.cxx.o' failed
make[2]: *** [Modules/Bridge/VtkGlue/src/CMakeFiles/ITKVtkGlue.dir/QuickView.cxx.o] Error 1
CMakeFiles/Makefile2:34960: recipe for target 'Modules/Bridge/VtkGlue/src/CMakeFiles/ITKVtkGlue.dir/all' failed
make[1]: *** [Modules/Bridge/VtkGlue/src/CMakeFiles/ITKVtkGlue.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

(Dženan Zukić) #2

You are trying to combine quite an old version of ITK with a not-yet-released version of VTK. You either need to use an older VTK (version 6 or 7 perhaps), or a newer version of ITK (4.13.1 is the latest stable).


(Rhodri Smith) #3

Thanks, i updated my system to ITK 4.13.1, VTK, 7.1.1. Now using cmake 3.12, gcc 8.1

ITK installs without any errors, when building ITKAPps however I receive the below - any help appreciated:

Building CXX object ITKRegistrationLib/CMakeFiles/Example_ITKRegistrationLib.dir/ITKRegistrationLib.cxx.o

/home/putz/ITKApps/ITKRegistrationLib/ITKRegistrationLib.cxx:22:10: fatal error: vnl/vnl_vector.txx: No such file or directory

#include “vnl/vnl_vector.txx”

^~~~~~~~~~~~~~~~~~~~

compilation terminated.


(Dženan Zukić) #4

ITKApps have not been supported for a while now. By looking at a shortlog, it seems that the last supported version was 4.8.


(Rhodri Smith) #5

Thanks, can you please recommend a stable compatible system, i.e ITK, VTK and gcc versions along with cmake. I can now build ITK and VTK but the wiki examples fail.


(Dženan Zukić) #6

What do you want to use ITK and VTK for? If you want them to build ITKApps, you should use its superbuild which has the versions specified in there. If you just want general development using these libraries, latest stable versions (ITK 4.13.1 and VTK 8.1.1) are your best bet.

This PR allows ITKWikiExamples to build with the master version of ITK. ITKWikiExamples still needs an update which removes ITKv3 compatibility, and takes care of v4/v5 differences.

But please tell us which examples fail to build. Also provide the first few compile errors they produce, and the versions of libraries/examples used.


(Rhodri Smith) #7

Thanks but even trying the superbuild of ITKApps gives this error:

Essentially I want the functionality in ITKApps and then hope to do development if i needed, any reason why ITKApps superbuild is failing?

[ 22%] Building CXX object src/CMakeFiles/fltk.dir/Fl_Printer.cxx.o

In file included from /home/petic/ITKApps/ITKApps/ITKAppsbin/FLTK/src/Fl_PostScript.cxx:29:0,

from /home/petic/ITKApps/ITKApps/ITKAppsbin/FLTK/src/Fl_Printer.cxx:28:

/usr/include/X11/Xft/Xft.h:39:22: fatal error: ft2build.h: No such file or directory

#include <ft2build.h>

^

compilation terminated.

src/CMakeFiles/fltk.dir/build.make:1118: recipe for target ‘src/CMakeFiles/fltk.dir/Fl_Printer.cxx.o’ failed

make[5]: *** [src/CMakeFiles/fltk.dir/Fl_Printer.cxx.o] Error 1

CMakeFiles/Makefile2:180: recipe for target ‘src/CMakeFiles/fltk.dir/all’ failed

make[4]: *** [src/CMakeFiles/fltk.dir/all] Error 2

Makefile:127: recipe for target ‘all’ failed

make[3]: *** [all] Error 2

CMakeFiles/FLTK.dir/build.make:113: recipe for target ‘FLTK-prefix/src/FLTK-stamp/FLTK-build’ failed

make[2]: *** [FLTK-prefix/src/FLTK-stamp/FLTK-build] Error 2

CMakeFiles/Makefile2:141: recipe for target ‘CMakeFiles/FLTK.dir/all’ failed

make[1]: *** [CMakeFiles/FLTK.dir/all] Error 2

Makefile:83: recipe for target ‘all’ failed

make: *** [all] Error 2


(Dženan Zukić) #8

I would say that FLTK in ITKApps is too old and does not support your version of Linux. Can you disable FLTK examples in CMake configuration of ITKApps and try building again?