Compilation error after ITK-5.3 update

Dear developers,

I have a problem with compilation of Plastimatch software. This program is a part of SlicerRT extension of 3D Slicer.

Plastimatch build is failed after ITK-5.3 upgrade on Linux. CDash shows that Windows build is OK, Linux and MacOS builds are failed!

Typical error log.
Problem files in Plastimatch are:

  1. src/plastimatch/register/itk_tps.h · master · plastimatch / plastimatch · GitLab
  2. src/plastimatch/standalone/beamdata_gen_gui.cpp · master · plastimatch / plastimatch · GitLab
  3. src/plastimatch/standalone/gamma_gui.cpp · master · plastimatch / plastimatch · GitLab

If i understood correctly, the problem is with a itkImageFileReader include in these files. If this include is commented and there are no readers in these files, the compilation finishes without problems.

What can you recommend to check before digging any further?

Taking a quick look at the error log, it looks like the platform is being incorrectly detected. I doubt POSIX needs to be defined on *nix. The problem seems to come from KWSys. @brad.king might have more insight.

The line in KWSys is here. The relevant code is:

  enum class Kind
#ifdef _WIN32

Is something defining POSIX as a preprocessor symbol?

You were right. There is a conflict with preprocessor definition. I’ve made a temporary workaround, and try to find the cause of the issue.

#if (ITK_VERSION_MAJOR == 5) && (ITK_VERSION_MINOR > 2) && defined(POSIX)
#undef POSIX

#include "itkImageFileReader.h"

1 Like