# fail to build itk 5.1.1 with gcc 10 on ArchLinux

**URL:** <https://discourse.itk.org/t/fail-to-build-itk-5-1-1-with-gcc-10-on-archlinux/3571>\
**Category:** Uncategorized\
**Created:** [October 25, 2020, 10:46am UTC](https://discourse.itk.org/t/fail-to-build-itk-5-1-1-with-gcc-10-on-archlinux/3571 "2020-10-25T10:46:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hubutui](https://discourse.itk.org/user_avatar/discourse.itk.org/hubutui/32/716_2.png) [@hubutui](https://discourse.itk.org/u/hubutui)\
**Post date:** [October 25, 2020, 10:46am UTC](https://discourse.itk.org/t/fail-to-build-itk-5-1-1-with-gcc-10-on-archlinux/3571/1 "2020-10-25T10:46:22Z")

</div>

According to [this post](https://discourse.itk.org/t/itk-5-1-1-has-been-released/3422), 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:

```auto
 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](https://discourse.itk.org/uploads/short-url/7XiQdHvhqPtMK7kijC3vMnnLh9g.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.

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [October 25, 2020, 3:34pm UTC](https://discourse.itk.org/t/fail-to-build-itk-5-1-1-with-gcc-10-on-archlinux/3571/2 "2020-10-25T15:34:14Z")

</div>

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:

```nohighlight
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
    { };
    ^

```

---

<div class="post-metadata">

**Author:** ![phcerdan](https://discourse.itk.org/user_avatar/discourse.itk.org/phcerdan/32/286_2.png) [@phcerdan](https://discourse.itk.org/u/phcerdan)\
**Post date:** [October 25, 2020, 10:12pm UTC](https://discourse.itk.org/t/fail-to-build-itk-5-1-1-with-gcc-10-on-archlinux/3571/3 "2020-10-25T22:12:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hubutui](https://discourse.itk.org/user_avatar/discourse.itk.org/hubutui/32/716_2.png) [@hubutui](https://discourse.itk.org/u/hubutui)\
**Post date:** [October 26, 2020, 2:24am UTC](https://discourse.itk.org/t/fail-to-build-itk-5-1-1-with-gcc-10-on-archlinux/3571/4 "2020-10-26T02:24:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [October 26, 2020, 12:00pm UTC](https://discourse.itk.org/t/fail-to-build-itk-5-1-1-with-gcc-10-on-archlinux/3571/5 "2020-10-26T12:00:46Z")

</div>

Yes, the list of planned releases is here:

> **[InsightSoftwareConsortium/ITK](https://github.com/InsightSoftwareConsortium/ITK/milestones)**
>
> Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dim...

---

<div class="post-metadata">

**Author:** ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)\
**Post date:** [January 29, 2021, 7:28pm UTC](https://discourse.itk.org/t/fail-to-build-itk-5-1-1-with-gcc-10-on-archlinux/3571/6 "2021-01-29T19:28:20Z")

</div>

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