Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put jl_gc_new_weakref in a header file again #56319

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

lgoettgens
Copy link
Contributor

The gcext implementation in gap/GAP.jl uses jl_gc_new_weakref. Since #55608 got merged, this symbol is no longer mentioned in any header file, and thus the compilation of gap fails. This PR puts it back into a header file, but now in gc-common.h (instead of gc-interface.h), since #55608 moved the implementation to gc-common.c.

We are aware of the alternative function jl_gc_new_weakref_th (that still is in a header after #55608). However, it was not present in any header file before #55256, even though it was already marked as JL_DLLEXPORT well before that.

In short, without this PR we are not able to adapt the code to a way that works both with julia 1.11 and nightly.

@fingolfin I get locally still the same error as we can observe in CI. I suppose that this needs a rebuild of libjulia with this PR here included to work, right?

ping @d-netto @gbaraldi

@fingolfin
Copy link
Contributor

Thank you!

Yes, libjulia needs the updated header. Since I only rebuilt it a few days ago, it should be trivial enough to do it again once this PR is merged

@fingolfin fingolfin added the GC Garbage collector label Oct 24, 2024
Copy link
Member

@d-netto d-netto left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for spotting it.

src/gc-common.h Outdated Show resolved Hide resolved
Co-authored-by: Lars Göttgens <lars.goettgens@rwth-aachen.de>
@fingolfin fingolfin merged commit 5cdf378 into JuliaLang:master Oct 24, 2024
5 of 7 checks passed
@fingolfin
Copy link
Contributor

Unfortunately this is not quite enough, as just #include "julia.h" still won't make this function visible again: Apparently julia.h only includes src/gc-interface.h but not src/gc-common.h.

@lgoettgens lgoettgens deleted the lg/header-jl_gc_new_weakref branch October 28, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GC Garbage collector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants