Export real_kind_bytes as public to fix dlsym visibility on GCC 16.2 - #29
Merged
Merged
Conversation
real_kind_bytes (bind(C) as PS_real_kind_bytes) sat in UTILITIES_CF, a module that is private by default, and was never added to the module's public :: list like its sibling C-interop functions. GCC 16.2.0 has a regression (PR126872) where a PRIVATE module procedure bound to C is given hidden ELF visibility even though a binding label gives it external linkage, so dlsym() can no longer find it. This broke the Julia wrapper's precision probe on macOS CI. Making the export explicitly public sidesteps the compiler bug regardless of GCC version, matching the existing public C-interop functions in this module. Bump version to 2603.9.
egpbos
added a commit
that referenced
this pull request
Sep 8, 2026
GCC 16.2.0 (PR126872) gives a PRIVATE module procedure bound to C hidden ELF visibility even though its binding label gives it external linkage, so dlsym() can no longer find it. #29 fixed real_kind_bytes in UTILITIES_CF, the first symbol the Julia wrapper resolves, but the same bare PRIVATE remains in two other places and hides the other 125 entry points, so the failure moves one step later instead of going away. GenFortranWrappers.jl writes PRIVATE into every module it generates, hiding 108 symbols across the 24 generated wrappers, PS_create_StrDim among them. SOCRATES_C.f90 carries its own bare PRIVATE, hiding the 20 radiative transfer entry points including PS_radiance_calc and PS_read_spectrum. Both kinds of module exist only to expose their bind(C) procedures, so PUBLIC is the appropriate default. Built with GCC 16.2.0 on macOS arm64: libSOCRATES_C.so exports all 128 PS_ symbols with none left local, where main exports 3 of 128.
This was referenced Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
real_kind_bytes (bind(C) as PS_real_kind_bytes) sat in UTILITIES_CF, a module that is private by default, and was never added to the module's public :: list like its sibling C-interop functions. GCC 16.2.0 has a regression (PR126872) where a PRIVATE module procedure bound to C is given hidden ELF visibility even though a binding label gives it external linkage, so dlsym() can no longer find it. This broke the Julia wrapper's precision probe on macOS CI.
Making the export explicitly public sidesteps the compiler bug regardless of GCC version, matching the existing public C-interop functions in this module.
Bump version to 2603.9.