Drop support for GCC 4.x?

PR2231 caused a lot of build errors on a nightly machine with GCC 4.8.4. GCC 4.8.4 does not seem to support C++11 well enough for the latest GTest to compile.

Should we upgrade the compiler on this machine and say that ITK requires GCC 5.x and later? Correspondingly update ITKSoftwareGuide. Or maybe revert the PR?

So far, @hjmjohnson supported updating compiler requirements in a private email exchange.

1 Like

CentOS 7’s default compiler is GCC 4.8.5. It will have full updates until 2020-08-06. I am currently running nightly valgrind and coverages for ITK on this OS. And use it for SimpleITK CI with a variety of different compilers. However, with the change in direction of CentOS, another Linux distribution will likely be used in the near future.

Redhat 7 is corresponding version for CentOS 7 also has GCC 4.8.5. Redhat is rather notorious for long enterprise support. It use used on all the cluster I work with. Redhat 7 EOL date is 6/30/2024.

I do not propose we support the compiler until this date, but it is a sensible upper bound in this discussion.

It would be nice to have a table to common Linux distro’s, gcc versions and EOL dates. I don’t have time to continue the search. This would provide some additional reasoning for the change is supported compilers on a minor change of the toolkit.

Dropping less than (but not) 4.8.5 would not cause a problem with anything I am using right now.

*EDIT: Dzenan pointed out that the valgrind and coverage builds are failing on the dashboard.

I see that Valgrind build runs into the same errors. So revert PR2231?

Having this type of braking change occurring after the second release candidate for 5.2 is not be expected.

So certainly for 5.2, IMHO.

Sounds good. So after 5.2.0 final we will bump both minimum CMake version and minimum GCC version.

1 Like

I have created a new nightly build running CentOS5 with devtools 8 ( gcc 8 ) and valgrind:
https://open.cdash.org/build/7077815

It has different valgrind defects that need to be triaged.

2 Likes

Looks like CentOS Valgrind 8 build has less failed test as CentOS Valgrind build for some reason. Hopefully tomorrow both builds will have fewer defects (15+) after PR 2347.

2 Likes

The tests are failing because the executables do not exist do to compilation errors:

/tmp/bld/ITK/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx: In function 'void showImage(itk::Image<unsigned char, 2u>::ConstPointer)':
bld/ITK/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx:480:58: error: cannot convert 'const SizeType {aka const itk::Size<2u>}' to 'itk::Size<2u>::SizeValueType {aka long unsigned int}' in initialization
   const SizeType      toshowSize{ toshowRegion.GetSize() };
                                                          ^
In file included from bld/ITK/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.h:329:0,
                 from bld/ITK/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx:20:
/tmp/bld/ITK/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.hxx: In instantiation of 'void itk::ContourExtractor2DImageFilter<TInputImage>::GenerateDataForLabels() [with TInputImage = itk::Image<unsigned char, 2u>]':
bld/ITK/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.hxx:52:5:   required from 'void itk::ContourExtractor2DImageFilter<TInputImage>::GenerateData() [with TInputImage = itk::Image<unsigned char, 2u>]'
bld/ITK/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx:704:1:   required from here
bld/ITK/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.hxx:298:5: error: no matching function for call to 'std::vector<unsigned char, std::allocator<unsigned char> >::erase(const const_iterator&, std::vector<unsigned char, std::allocator<unsigned char> >::iterator)'

These error need to be fixed before the release.

1 Like

I have also created a new nightly build “CentOS Coverage 8” with devtools 8 ( gcc 8 ) for coverage. I can stop the other builds after the 5.2.0 release.

However for 5.2.x patch releases, there is some concern that problems with gcc 4 may be re-introduced so some additional considerations or testing may be needed for the release branch.

1 Like

Can you change the CentOS7 valgrind build to target release branch?

I could. But that branch will not be updated often, so I’m not sure it is worth it to run every night.