Skip to content

Building app fails on Julia 1.11.X: error: too few arguments to function ‘jl_get_binding_wr’ + simple fix #1000

@nsgexo

Description

@nsgexo

Building an app results in failure:

[ Info: PackageCompiler: Done
✔ [05m:07s] PackageCompiler: compiling nonincremental system image
/home/lior/.julia/packages/PackageCompiler/nT5sD/src/embedding_wrapper.c: In function ‘main’:
/home/lior/.julia/packages/PackageCompiler/nT5sD/src/embedding_wrapper.c:109:24: error: too few arguments to function ‘jl_get_binding_wr’
  109 |     jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var);
      |                        ^~~~~~~~~~~~~~~~~
In file included from /home/lior/.julia/packages/PackageCompiler/nT5sD/src/embedding_wrapper.c:7:
/home/lior/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/include/julia/julia.h:1919:28: note: declared here
 1919 | JL_DLLEXPORT jl_binding_t *jl_get_binding_wr(jl_module_t *m JL_PROPAGATES_ROOT, jl_sym_t *var, int alloc);
      |                            ^~~~~~~~~~~~~~~~~
ERROR: LoadError: failed process: Process(`gcc '-DJULIA_MAIN="Service.julia_main"' -DNEW_DEFINE_FAST_TLS_SYNTAX -m64 -march=x86-64 -o /home/lior/devel/ServiceLib/build/../ServiceApp/bin/Service /home/lior/.julia/packages/PackageCompiler/nT5sD/src/embedding_wrapper.c '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/../lib/julia' -O2 -std=gnu99 -I/home/lior/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/include/julia -fPIC -L/home/lior/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/lib -L/home/lior/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/lib/julia -Wl,--export-dynamic -Wl,-rpath-link,/home/lior/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/lib -Wl,-rpath-link,/home/lior/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/lib/julia -ljulia -ljulia-internal`, ProcessExited(1)) [1]

Issue is with

/.julia/packages/PackageCompiler/nT5sD/src/embedding_wrapper.c

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

whereas jl_get_binding_wr in v1.11 is defined as

/home/lior/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/include/julia/julia.h:1919:28: note: declared here
 1919 | JL_DLLEXPORT jl_binding_t *jl_get_binding_wr(jl_module_t *m JL_PROPAGATES_ROOT, jl_sym_t *var, int alloc);

a simple fix for MINOR>=11
jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var,1);
solves the issue...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions