From 370f14f8b5cc9fc385da562af75ea52875d81407 Mon Sep 17 00:00:00 2001 From: gbaraldi Date: Thu, 26 Jun 2025 14:47:16 -0300 Subject: [PATCH 1/5] Change init_julia slightly to adapt to 1.12 changes --- src/julia_init.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/julia_init.c b/src/julia_init.c index d35761fe..5e2591d7 100644 --- a/src/julia_init.c +++ b/src/julia_init.c @@ -69,9 +69,14 @@ void init_julia(int argc, char **argv) { char *root_dir = dirname(dirname(_sysimage_path)); set_depot_load_path(root_dir); free(_sysimage_path); - jl_options.image_file = sysimage_path; + #if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR <= 11 julia_init(JL_IMAGE_CWD); + #else + jl_image_buf_t sysimage = jl_preload_sysimg(jl_options.image_file); + jl_init_(sysimage); + #endif + } void shutdown_julia(int retcode) { jl_atexit_hook(retcode); } From 2f210ce98ae4d161a612c5f38f575238aca23eab Mon Sep 17 00:00:00 2001 From: gbaraldi Date: Thu, 26 Jun 2025 15:00:54 -0300 Subject: [PATCH 2/5] Enable 1.12 CI --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74a1a5ad..a6d0a9ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,11 +51,12 @@ jobs: julia-version: - '1.10' # current LTS - '1.11' # current stable + # # 'pre' will install the latest prerelease build (RCs, betas, and alphas). # Uncomment this line when there is an active prerelease available. # Comment this line out when there is no prerelease available (to save CI time). - # - 'pre' + - 'pre' # # Note: we have a separate workflow (.github/workflows/ci.nightly.yml) # for Julia nightly. From 811a7a24f57168159f8feb3688daa992fdeef4f9 Mon Sep 17 00:00:00 2001 From: Gabriel Baraldi Date: Tue, 26 Aug 2025 14:15:42 -0300 Subject: [PATCH 3/5] 1.12 changes --- src/julia_init.c | 10 ++++------ src/library_selection.jl | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/julia_init.c b/src/julia_init.c index 5e2591d7..d598f90b 100644 --- a/src/julia_init.c +++ b/src/julia_init.c @@ -70,13 +70,11 @@ void init_julia(int argc, char **argv) { set_depot_load_path(root_dir); free(_sysimage_path); jl_options.image_file = sysimage_path; - #if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR <= 11 +#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR <= 11 julia_init(JL_IMAGE_CWD); - #else - jl_image_buf_t sysimage = jl_preload_sysimg(jl_options.image_file); - jl_init_(sysimage); - #endif - +#else + jl_init_with_image_file(NULL, sysimage_path); +#endif } void shutdown_julia(int retcode) { jl_atexit_hook(retcode); } diff --git a/src/library_selection.jl b/src/library_selection.jl index 54b1df3d..bb989608 100644 --- a/src/library_selection.jl +++ b/src/library_selection.jl @@ -9,6 +9,7 @@ const jll_mapping = Dict( "nghttp2_jll" => ["libnghttp2"], "LibGit2_jll" => ["libgit2"], "SuiteSparse_jll" => ["libamd", "libbtf", "libcamd", "libccolamd", "libcholmod", "libcolamd", "libklu", "libldl", "librbio", "libspqr", "libsuitesparseconfig", "libumfpack"], + "OpenSSL_jll" => ["libcrypto", "libssl"], ) # Manually fixup of libLLVM From a7cab8ce1b1bac5a22841c2b9dc1c9dbc882b20b Mon Sep 17 00:00:00 2001 From: gbaraldi Date: Tue, 26 Aug 2025 17:32:12 -0300 Subject: [PATCH 4/5] Fix binding access --- src/embedding_wrapper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/embedding_wrapper.c b/src/embedding_wrapper.c index 3080ee81..f028cea0 100644 --- a/src/embedding_wrapper.c +++ b/src/embedding_wrapper.c @@ -120,6 +120,9 @@ int main(int argc, char *argv[]) { jl_value_t *firstarg = checked_eval_string("popfirst!(ARGS)"); JL_GC_PUSH1(&firstarg); jl_sym_t *var = jl_symbol("PROGRAM_FILE"); +#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 12 + jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var); + jl_checked_assignment(bp, jl_base_module, var, firstarg); #if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 11 jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var, /* alloc */ 1); jl_checked_assignment(bp, jl_base_module, var, firstarg); From fada873032294bf5b6771a5cf2a9e77d87847294 Mon Sep 17 00:00:00 2001 From: Cody Tapscott <84105208+topolarity@users.noreply.github.com> Date: Tue, 26 Aug 2025 17:41:29 -0400 Subject: [PATCH 5/5] Update src/embedding_wrapper.c --- src/embedding_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/embedding_wrapper.c b/src/embedding_wrapper.c index f028cea0..e74dbe2f 100644 --- a/src/embedding_wrapper.c +++ b/src/embedding_wrapper.c @@ -123,7 +123,7 @@ int main(int argc, char *argv[]) { #if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 12 jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var); jl_checked_assignment(bp, jl_base_module, var, firstarg); -#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 11 +#elif JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 11 jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var, /* alloc */ 1); jl_checked_assignment(bp, jl_base_module, var, firstarg); #elif JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 10