Skip to content

Conversation

mreineck
Copy link
Collaborator

At one of the last meetings @ahbarnett noted that the number of symbols exported from libfinufft.so increases by a lot when ducc is used for FFTs.
This can most likely be fixed by compiling the sources with "-fvisibility=hidden" under Linux and using the already existing FINUFFT_EXPORT macros to explicitly make functions visible under Linux, very similar to what happens under Windows.

The current state of the branch demonstrates this when compiling with the makefile; you can check the resulting shared library using nm -C -D -U lib/libfinufft.so to see the exported symbols.
I don't think there is much I can do about the exported weak symbols (w/W), but the overall number goes down from 1000+ to about 130 when using the ducc back end, which is at least some progress.

Still to do:

  • support this in cmake
  • see whether there are non-Windows compilers which don't understand the visiblity flags/attributes, and disable the mechanism for them.

@mreineck mreineck changed the title Reduce number of exported symbols in shred library Reduce number of exported symbols in shared library Jun 30, 2025
@mreineck mreineck marked this pull request as draft June 30, 2025 10:00
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.

1 participant