Skip to content

Conversation

franzpoeschel
Copy link
Contributor

This revisits #165 as an attempt to fix software stack issues such as #1792 where binary-incompatible versions of e.g. the C++ stdlib are used by openPMD-api and other packages.

TODO:

Comment on lines +546 to +549
set_target_properties(openPMD PROPERTIES
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON
)
Copy link
Member

Choose a reason for hiding this comment

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

We did this for the old ADIOS1 libraries if you like to take a look:
https://github.com/openPMD/openPMD-api/blob/0.14.5/CMakeLists.txt#L555-L571


# symbol hiding
if(openPMD_HAVE_SYMBOLHIDING)
set_target_properties(openPMD PROPERTIES
Copy link
Member

@ax3l ax3l Oct 14, 2025

Choose a reason for hiding this comment

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

This will not work for C++ users, unless you explicitly export all our public C++ APIs.

Already, we should not be exporting C++ stdlib symbols, I think. I think that mixing different C++ stdlibs generally does not work in the same process, just how the dynamic loader works and populates symbols. But this is not needed in most cases, e.g., on HPC one does instead compile with a consistent set of compilers/modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants