Skip to content

Expose DBCSR C API procedures explicitly - #1027

Merged
alazzaro merged 1 commit into
cp2k:developfrom
Growl1234:fedora
Jul 20, 2026
Merged

alazzaro merged 1 commit into
cp2k:developfrom
Growl1234:fedora

Conversation

@Growl1234

@Growl1234 Growl1234 commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

The dbcsr_api_c and dbcsr_tensor_api_c modules use PRIVATE by default, while the BIND(C) procedures declared in dbcsr.h and dbcsr_tensor.h are intended to be exported as the public C API.

With the Fedora Rawhide/GCC 16 RPM build, these symbols are present in libdbcsr_c.so, but they are emitted as local symbols and therefore are not available from the dynamic symbol table. As a result, linking the C++ tests against libdbcsr_c.so fails with unresolved references to c_dbcsr_init_lib_internal, c_dbcsr_create_new, c_dbcsr_t_ndims, and many other C API entry points.

This PR makes the C API procedures explicitly PUBLIC. This documents the intended API boundary and avoids relying on compiler-specific handling of private module procedures with C binding.

@Growl1234
Growl1234 force-pushed the fedora branch 3 times, most recently from c900b53 to ce3d7ec Compare July 20, 2026 05:51
@Growl1234 Growl1234 changed the title RPM: Switch off LTO temporarily for Rawhide builds Expose DBCSR C API procedures explicitly Jul 20, 2026
@alazzaro
alazzaro merged commit a5d9bcf into cp2k:develop Jul 20, 2026
31 checks passed
@alazzaro

Copy link
Copy Markdown
Member

@Growl1234 makes sense, thanks for this fix

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.

2 participants