From 1f2bdc8dab51b57a38a04a332299bf6aeee8b5ef Mon Sep 17 00:00:00 2001 From: "E. G. Patrick Bos" Date: Tue, 8 Sep 2026 17:36:33 +0200 Subject: [PATCH] Export generated and core wrapper symbols as public for GCC 16.2 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. --- julia/src/GenFortranWrappers.jl | 2 +- julia/src/SOCRATES_C.f90 | 2 +- version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/julia/src/GenFortranWrappers.jl b/julia/src/GenFortranWrappers.jl index d8e0601b..c00ac3cd 100644 --- a/julia/src/GenFortranWrappers.jl +++ b/julia/src/GenFortranWrappers.jl @@ -578,7 +578,7 @@ function gen_cfortran_wrapper( write(f, "\n") write(f, "implicit none\n") write(f, "\n") - write(f, "private\n") + write(f, "public\n") write(f, "\n") write(f, "contains\n") write(f, "\n") diff --git a/julia/src/SOCRATES_C.f90 b/julia/src/SOCRATES_C.f90 index 24f6df90..a3bf6f26 100644 --- a/julia/src/SOCRATES_C.f90 +++ b/julia/src/SOCRATES_C.f90 @@ -31,7 +31,7 @@ module SOCRATES_C implicit none -private +public diff --git a/version b/version index 374914e8..539e8d85 100644 --- a/version +++ b/version @@ -1 +1 @@ -2603.9 +2603.10