InsightSoftwareConsortium / ITK

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 dimensions.
https://itk.org
Apache License 2.0
1.38k stars 661 forks source link

ENH: Bump SWIG to 2024-03-26-master #4541

Closed thewtex closed 3 months ago

thewtex commented 3 months ago

There were duplicate definition errors due to double inclusion of

%template(vectoritkImageXX, std::vector< itkImageXX >)

via itkImage_ext.i in PCAShapeSignedDistanceFunction. Remove itkImage_ext.i from the latter but still provide the required typemaps by adding DECL_PYTHON_STD_VEC_RAW_TO_SMARTPTR_TYPEMAP in itkPCAShapeSignedDistanceFunction.wrap.

Remove -py3 because it is no longer supported (the default).

Remove "ios_base*" config templates because they are no longer emitted.

Bump PCRE. SWIG and PCRE are now built via CMake instead of autotools.

Closes https://github.com/InsightSoftwareConsortium/ITK/issues/4536 Closes https://github.com/InsightSoftwareConsortium/ITK/issues/3364 Closes https://github.com/InsightSoftwareConsortium/ITK/issues/3955

thewtex commented 3 months ago

@dzenanz note how to support std::vector< ImageType > on class APIs.

thewtex commented 3 months ago

Closes #4536 Closes #3364

N-Dekker commented 3 months ago

Wow, that's a big step forward! Thanks Matt!

Still wondering, is there a specific reason to take the revision of 2024-03-26-master, rather than the last official release, https://github.com/swig/swig/releases/tag/v4.2.1 ?

thewtex commented 3 months ago

Still wondering, is there a specific reason to take the revision of 2024-03-26-master, rather than the last official release, https://github.com/swig/swig/releases/tag/v4.2.1 ?

Yes, we want this patch: https://github.com/swig/swig/commit/21aa6e8f9e4c7d1b0249c46140b7ce5397d7dc52

dzenanz commented 3 months ago

Does this touch #3955?

dzenanz commented 3 months ago

MacOS Python build error:

CMake Error at /usr/local/Cellar/cmake/3.28.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find BISON: Found unsuitable version "2.3", but required is at
  least "3.5" (found /usr/bin/bison)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.28.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:598 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/Cellar/cmake/3.28.1/share/cmake/Modules/FindBISON.cmake:306 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:91 (find_package)
dzenanz commented 3 months ago

I assume we need to bump the version here: https://github.com/InsightSoftwareConsortium/ITK/blob/fad58494684c15c71525e127ba5fc6318dd33831/Testing/ContinuousIntegration/AzurePipelinesMacOS.yml#L34

thewtex commented 3 months ago

Does this touch https://github.com/InsightSoftwareConsortium/ITK/issues/3955?

I will add macOS binaries.

thewtex commented 3 months ago

I assume we need to bump the version here:

No, we want to keep testing against the older version, and bumping would not help with the build.

thewtex commented 3 months ago

/azp run ITK.Windows