gap-system / gap

Main development repository for GAP - Groups, Algorithms, Programming, a System for Computational Discrete Algebra
https://www.gap-system.org
GNU General Public License v2.0
814 stars 161 forks source link

Adjust julia gc to `jl_gc_new_weakref` no longer being exported #5824

Closed lgoettgens closed 1 month ago

lgoettgens commented 1 month ago

As discussed in https://github.com/oscar-system/GAP.jl/issues/1032#issuecomment-2435216269. cc @fingolfin

Text for release notes

not needed

fingolfin commented 1 month ago

You'll need this at the top of the file:

#include <julia_threads.h>    // for jl_get_ptls_states

#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR == 7
// workaround issue with Julia 1.7 headers which "forgot" to export this
// function
JL_DLLEXPORT void * jl_get_ptls_states(void);
#endif
fingolfin commented 1 month ago

Still crashes :-(

fingolfin commented 1 month ago

Still lots of compiler warninga in the bundled GAP. And it compiles GAP twice, gotta look into that

fingolfin commented 1 month ago

We really should ask the Julia folks to add jl_gc_new_weakref back to headers given that jl_gc_new_weakref_th existed in older version but wasn't in the headers (and was it exported?)

lgoettgens commented 1 month ago

Still lots of compiler warninga in the bundled GAP. And it compiles GAP twice, gotta look into that

The double compilation is due to the way that setup_override_dir.jl works. It expects gap to already be compiled the usual way, then replaces two files and re-compiles but this time with julia gc.

lgoettgens commented 1 month ago

We really should ask the Julia folks to add jl_gc_new_weakref back to headers given that jl_gc_new_weakref_th existed in older version but wasn't in the headers (and was it exported?)

See https://github.com/JuliaLang/julia/pull/56319

fingolfin commented 1 month ago

Julia PR was merged so we can close this. Thanks for the effort, @lgoettgens !