fail to build itk 5.1.1 with gcc 10 on ArchLinux

According to this post, building itk 5.1.1 with gcc 10 is supported now. However, I failed to build it on ArchLinux, gcc 10.2.0. My cmake configuration:

 cmake -B build -S "ITK-5.1.1" \
  -DBUILD_TESTING=OFF \
  -DBUILD_SHARED_LIBS=ON \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_SKIP_INSTALL_RPATH=ON \
  -DITK_BUILD_DEFAULT_MODULES=ON \
  -DITK_USE_SYSTEM_DOUBLECONVERSION=ON \
  -DITK_USE_SYSTEM_EIGEN=ON \
  -DITK_USE_SYSTEM_EXPAT=ON \
  -DITK_USE_SYSTEM_FFTW=ON \
  -DITK_USE_SYSTEM_GDCM=ON \
  -DITK_USE_SYSTEM_GOOGLETEST=ON \
  -DITK_USE_SYSTEM_HDF5=ON \
  -DITK_USE_SYSTEM_JPEG=ON \
  -DITK_USE_SYSTEM_PNG=ON \
  -DITK_USE_SYSTEM_TIFF=ON \
  -DITK_USE_SYSTEM_ZLIB=ON \
  -DITK_WRAP_PYTHON=ON

and here is the complete build log: itk-5.1.1-buildlog.txt (627.4 KB)

I could build it 5.1.1 with gcc8, gcc9 or clang. However, gcc8 and gcc9 will be removed once there is no package in the ArchLinux official repo depends on them.

Does master compiles on your system? Does it compile without wrapping (-DITK_WRAP_PYTHON=OFF)?

@phcerdan might have some suggestions. The first error message is:

In file included from /build/itk/src/build/Wrapping/itkFixedArray.cxx:1:
[ 10%] Building CXX object Modules/ThirdParty/VNL/src/vxl/core/vnl/CMakeFiles/itkvnl.dir/Templates/vnl_complex_ops+float-.cxx.o
In file included from /build/itk/src/ITK-5.1.1/Modules/Core/Common/include/itkCommand.h:21:
In file included from /build/itk/src/ITK-5.1.1/Modules/Core/Common/include/itkObject.h:31:
In file included from /build/itk/src/ITK-5.1.1/Modules/Core/Common/include/itkLightObject.h:21:
In file included from /build/itk/src/ITK-5.1.1/Modules/Core/Common/include/itkMacro.h:47:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/string:40:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/char_traits.h:39:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/stl_algobase.h:64:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/stl_pair.h:59:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/move.h:57:
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/type_traits:1396:66: error: '_Tp' does not refer to a value
    : public integral_constant<bool, _GLIBCXX_BUILTIN_IS_SAME_AS(_Tp, _Up)>
                                                                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/type_traits:1393:21: note: declared here
  template<typename _Tp, typename _Up>
                    ^
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/type_traits:1396:71: error: '_Up' does not refer to a value
    : public integral_constant<bool, _GLIBCXX_BUILTIN_IS_SAME_AS(_Tp, _Up)>
                                                                      ^
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/type_traits:1393:35: note: declared here
  template<typename _Tp, typename _Up>
                                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/type_traits:1400:5: error: expected class name
    { };
    ^

I have been compiling master with gcc10 with no problems. I haven’t tested 5.1.1.

@phcerdan @dzenanz Yeah, I could build itk master branch with gcc 10, with ITK_WRAP_PYTHON=ON. Any plan to release 5.1.2?

Yes, the list of planned releases is here:

Following up, v5.1.2 and v5.2rc01 are available with GCC 10 support.