Skip to content

BUG: Patch SWIG superbuild for R 4.6.0 API removals - #2587

Merged
blowekamp merged 2 commits into
SimpleITK:releasefrom
blowekamp:superbuild_patch_swig_for_r
May 7, 2026
Merged

blowekamp merged 2 commits into
SimpleITK:releasefrom
blowekamp:superbuild_patch_swig_for_r

Conversation

@blowekamp

Copy link
Copy Markdown
Member

R 4.6.0 removed several internal C API symbols (SET_S4_OBJECT, CLOENV, etc.) that SWIG's generated R bindings depend on. This patch applies fixes to the SWIG source during the superbuild.

Changes

  • Add swig-r-api-r460.patch to SuperBuild/ExternalSource/ so it is managed alongside other external sources
  • Use find_package(Patch REQUIRED) to locate the patch executable portably instead of relying on patch being in PATH
  • Use ${Patch_EXECUTABLE} in the PATCH_COMMAND of the Swig ExternalProject
  • Add *.patch -whitespace to .gitattributes so trailing whitespace in patch context lines does not trigger the pre-commit hook
  • Update SWIG superbuild version to 4.4.1 and include related SHA512 hashes

@blowekamp
blowekamp force-pushed the superbuild_patch_swig_for_r branch from 5a4c45c to d442ea8 Compare May 7, 2026 14:38
@blowekamp
blowekamp merged commit 6e183f5 into SimpleITK:release May 7, 2026
9 of 10 checks passed
@blowekamp
blowekamp deleted the superbuild_patch_swig_for_r branch September 9, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants