Skip to content

COMP: Mangle hdf5 static symbols#3478

Merged
thewtex merged 1 commit into
InsightSoftwareConsortium:masterfrom
jcfr:itk-hdf5-mangle-static-symbols
Jul 2, 2022
Merged

COMP: Mangle hdf5 static symbols#3478
thewtex merged 1 commit into
InsightSoftwareConsortium:masterfrom
jcfr:itk-hdf5-mangle-static-symbols

Conversation

@jcfr

@jcfr jcfr commented Jul 1, 2022

Copy link
Copy Markdown
Contributor

This commit expands the list of hdf5 symbols to include the one associated
the BSS data section. The list was put together by using nm, c++filt, bash
tooling and manual inspection of the source files.

This PR introduces ABI changes related to symbols not explicitly made available to client projects.

Context

This pull request was created in the context of the integration of ITK Python within the Slicer python interpreter. It allows to instantiate the HDF5 reader (itk.HDF5ImageIO.New()) without leading to seg fault.

Caveats

Note that instantiating the reader worked because the symbols in the library imported through wheel were effectively different from the one in the ITK libraries built by Slicer.

Once this is integrated and the ITK wheel rebuilt, the symbol clash is likely to happen again.

Possible path forward

Allowing client project to customize the mangling by for example specifying slicer_ for third-party like HDF5 would help avoid issue.

PR Checklist

Refer to the ITK Software Guide for
further development details if necessary.

This commit expands the list of hdf5 symbols to include the one associated
the BSS data section. The list was put together by using nm, c++filt, bash
tooling and manual inspection of the source files.
@github-actions github-actions Bot added area:ThirdParty Issues affecting the ThirdParty module type:Compiler Compiler support or related warnings labels Jul 1, 2022

@thewtex thewtex left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 🙏

@thewtex thewtex merged commit 5e7aea9 into InsightSoftwareConsortium:master Jul 2, 2022
@seanm

seanm commented Aug 10, 2022

Copy link
Copy Markdown
Contributor

When someone in the future updates HDF5 in ITK (which I sometimes do), how will they reproduce what you've done here? You didn't seem to add any doc/instructions.

hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request May 6, 2026
…mangle-static-symbols

COMP: Mangle hdf5 static symbols
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request May 12, 2026
…mangle-static-symbols

COMP: Mangle hdf5 static symbols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ThirdParty Issues affecting the ThirdParty module type:Compiler Compiler support or related warnings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants