JuliaLang / PackageCompiler.jl

Compile your Julia Package
https://julialang.github.io/PackageCompiler.jl/dev/
MIT License
1.41k stars 189 forks source link

Incompatibility with Julia 1.11-rc1 and 1.11-rc2 #951

Open PatrickHaecker opened 1 month ago

PatrickHaecker commented 1 month ago

Creating an app using Julia 1.11-rc1 (also the manifest files pointing to 1.11-rc1) fails with the error

error: too few arguments to function ‘jl_get_binding_wr’
  109 |     jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var);

Replacing line 108 of embedding_wrapper.c by

#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 11
    jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var, 1);
    jl_checked_assignment(bp, jl_base_module, var, firstarg);
#elif JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 10

lets the build finish successfully. This is a trivial combination of the existing code for 1.9 and 1.10.

JanisErdmanis commented 1 month ago

I stumbled on the same issue on Julia 1.11-rc1 with MacOS M1.

PatrickHaecker commented 1 month ago

I hope that we get an update with this simple fix, soon.

But until we get it, you can copy ~/.julia/packages/PackageCompiler/nT5sD/src/embedding_wrapper.c into your project, modify it accordingly and include the keyword argument c_driver_program = "path_to_modified_embedding_wrapper.c" into your create_app() call. Obviously, you need to revert that change after the fix is applied.

KristofferC commented 1 month ago

I hope that we get an update with this simple fix, soon.

You could try make a PR with the fix. Might expedite things.

PatrickHaecker commented 1 month ago

Fair enough :-). I need to go through some process because Enterprise, but if it works out I'll make a PR.

ufechner7 commented 1 month ago

Same problem with Julia 1.11-rc2

ufechner7 commented 1 month ago

954 fixes the issue for Linux and Windows, but the tests for macOS still fail. Could someone with access to a Mac have a look at the error messages?