I am attempting to rebuild the ITK project. I had a successful build on the same system before, but I am having problems with this rebuild (The previous build was completed with the VMTK super build tool).
Which compiler are you using, and what exact version? Please copy the entire error message with notes, in particular the source file and line where it occurs.
Maybe on 25, replace const MathematicalMorphologyEnums::Algorithm value by const typename MathematicalMorphologyEnums::Algorithm value (note the addition of typename).
Hello Thanks for the reply: Compilers:
C++ -->(GCC) 13.1.1 20230429
C → (GCC) 13.1.1 20230429 Error
ITK/Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h:41:14: error: use of enum ‘Algorithm’ without previous declaration
41 | enum class Algorithm : uint8_t
| ^~~~~~~~~
ITK/Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h:41:26: error: ‘uint8_t’ was not declared in this scope
41 | enum class Algorithm : uint8_t
| ^~~~~~~
ITK/Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h:23:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
22 | #include "ITKMathematicalMorphologyExport.h"
+++ |+#include <cstdint>
23 |
ITK/Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h:42:3: error: default member initializer for unnamed bit-field
42 | {
| ^
ITK/Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h:52:107: error: ‘Algorithm’ in ‘class itk::MathematicalMorphologyEnums’ does not name a type
52 | operator<<(std::ostream & out, const MathematicalMorphologyEnums::Algorithm value);
| ^~~~~~~~~
ITK/Modules/Filtering/MathematicalMorphology/src/itkMathematicalMorphologyEnums.cxx:25:67: error: ‘Algorithm’ in ‘class itk::MathematicalMorphologyEnums’ does not name a type
25 | operator<<(std::ostream & out, const MathematicalMorphologyEnums::Algorithm value)
| ^~~~~~~~~
ITK/Modules/Filtering/MathematicalMorphology/src/itkMathematicalMorphologyEnums.cxx: In lambda function:
ITK/Modules/Filtering/MathematicalMorphology/src/itkMathematicalMorphologyEnums.cxx:30:41: error: ‘itk::MathematicalMorphologyEnums::Algorithm’ has not been declared
30 | case MathematicalMorphologyEnums::Algorithm::BASIC:
| ^~~~~~~~~
ITK/Modules/Filtering/MathematicalMorphology/src/itkMathematicalMorphologyEnums.cxx:32:41: error: ‘itk::MathematicalMorphologyEnums::Algorithm’ has not been declared
32 | case MathematicalMorphologyEnums::Algorithm::HISTO:
| ^~~~~~~~~
ITK/Modules/Filtering/MathematicalMorphology/src/itkMathematicalMorphologyEnums.cxx:34:41: error: ‘itk::MathematicalMorphologyEnums::Algorithm’ has not been declared
34 | case MathematicalMorphologyEnums::Algorithm::ANCHOR:
| ^~~~~~~~~
ITK/Modules/Filtering/MathematicalMorphology/src/itkMathematicalMorphologyEnums.cxx:36:41: error: ‘itk::MathematicalMorphologyEnums::Algorithm’ has not been declared
36 | case MathematicalMorphologyEnums::Algorithm::VHGW:
| ^~~~~~~~~
make[2]: *** [Modules/Filtering/MathematicalMorphology/src/CMakeFiles/ITKMathematicalMorphology.dir/build.make:76: Modules/Filtering/MathematicalMorphology/src/CMakeFiles/ITKMathematicalMorphology.dir/itkMathematicalMorphologyEnums.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:16833: Modules/Filtering/MathematicalMorphology/src/CMakeFiles/ITKMathematicalMorphology.dir/all] Error 2
Hi, I also compile itk from the source with gcc 13, and got /usr/include/stdlib.h:252:4: error: unknown type name '_Float32x' errors. here is the complete build log. log.txt (266.9 KB)
The first error occurs at line 3210.
I can confirm that this pr is included.
You are building ITK from a package manager (looks like pacman), clone the git repository yourself and try to install as I can not confirm that the build procedure for ITK from pacman works.
To build with GCC 13 just patch
— InsightToolkit-4.13.2.orig/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h
+++ InsightToolkit-4.13.2/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h