Will juliac solve the relocatabiliy issue?

I created this script to check for relocation issues: Julia Package Relocatability Test Script · GitHub

When I run it on normal packages like julia reloc-helper.jl JSON everything works.

When run on julia reloc-helper.jl Oxygen or julia reloc-helper.jl GLMakie it shows a stacktrace with the relocation issue:

     Testing Running tests...
ERROR: LoadError: SystemError: opening file "/tmp/jl_29ZxGi/build/dev/Oxygen/src/methods.jl": No such file or directory
Stacktrace:
 [1] include(mod::Module, _path::String)
   @ Base ./Base.jl:562
 [2] include(x::String)
   @ Main.RunTests.TimeZoneTests /tmp/jl_29ZxGi/host/dev/Oxygen/test/extensions/timezonetests.jl:1
 [3] top-level scope
   @ /tmp/jl_29ZxGi/build/dev/Oxygen/src/Oxygen.jl:32
 [4] include(mod::Module, _path::String)
   @ Base ./Base.jl:562
 [5] include(x::String)
   @ Main.RunTests /tmp/jl_29ZxGi/host/dev/Oxygen/test/runtests.jl:1
 [6] top-level scope
   @ /tmp/jl_29ZxGi/host/dev/Oxygen/test/runtests.jl:8
 [7] include(fname::String)
   @ Main ./sysimg.jl:38
 [8] top-level scope
   @ none:6
in expression starting at /tmp/jl_29ZxGi/host/dev/Oxygen/test/extensions/timezonetests.jl:1
in expression starting at /tmp/jl_29ZxGi/host/dev/Oxygen/test/runtests.jl:1
shader cache: Error During Test at /tmp/jl_qTURTz/host/dev/Makie/GLMakie/test/unit_tests.jl:9
  Got exception outside of a @test
  SystemError: opening file "/tmp/jl_qTURTz/build/dev/Makie/GLMakie/assets/shader/postprocessing/fullscreen.vert": No such file or directory
  Stacktrace:
    [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
      @ Base ./error.jl:176
    [2] systemerror
      @ ./error.jl:175 [inlined]
    [3] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)
      @ Base ./iostream.jl:295
    [4] open
      @ ./iostream.jl:277 [inlined]
    [5] #open#465
      @ ./io.jl:408
    [6] open
      @ ./io.jl:407 [inlined]
    [7] read
      @ ./io.jl:507 [inlined]
    [8] ShaderSource
      @ /tmp/jl_qTURTz/build/dev/Makie/GLMakie/src/GLMakie.jl:55 [inlined]
    [9] (::GLMakie.var"#1#2"{String})()
      @ GLMakie /tmp/jl_qTURTz/build/dev/Makie/GLMakie/src/GLMakie.jl:69
   [10] get!(default::GLMakie.var"#1#2"{String}, h::Dict{String, GLMakie.ShaderSource}, key::String)
      @ Base ./dict.jl:458
   [11] loadshader
      @ /tmp/jl_qTURTz/build/dev/Makie/GLMakie/src/GLMakie.jl:65 [inlined]
   [12] to_screen_postprocessor(framebuffer::GLMakie.GLFramebuffer, shader_cache::GLMakie.GLAbstraction.ShaderCache, screen_fb_id::Nothing)
      @ GLMakie /tmp/jl_qTURTz/build/dev/Makie/GLMakie/src/postprocessing.jl:285
   [13] to_screen_postprocessor
      @ /tmp/jl_qTURTz/build/dev/Makie/GLMakie/src/postprocessing.jl:285 [inlined]
   [14] empty_screen(debugging::Bool, reuse::Bool, window::Nothing)
      @ GLMakie /tmp/jl_qTURTz/build/dev/Makie/GLMakie/src/screen.jl:314
   [15] empty_screen(debugging::Bool; reuse::Bool, window::Nothing)
      @ GLMakie /tmp/jl_qTURTz/build/dev/Makie/GLMakie/src/screen.jl:258
   [16] screen_from_pool(debugging::Bool; window::Nothing)
      @ GLMakie /tmp/jl_qTURTz/build/dev/Makie/GLMakie/src/screen.jl:375
   [17] screen_from_pool
      @ /tmp/jl_qTURTz/build/dev/Makie/GLMakie/src/screen.jl:363 [inlined]
   [18] GLMakie.Screen(; resolution::Nothing, start_renderloop::Bool, window::Nothing, screen_config::@Kwargs{visible::Bool})
      @ GLMakie /tmp/jl_qTURTz/build/dev/Makie/GLMakie/src/screen.jl:462
   [19] macro expansion
      @ /tmp/jl_qTURTz/host/dev/Makie/GLMakie/test/unit_tests.jl:11 [inlined]
   [20] macro expansion
      @ ~/.julia/juliaup/julia-1.11.6+0.x64.linux.gnu/share/julia/stdlib/v1.11/Test/src/Test.jl:1709 [inlined]
   [21] top-level scope
      @ /tmp/jl_qTURTz/host/dev/Makie/GLMakie/test/unit_tests.jl:10
   [22] include(fname::String)
      @ Main ./sysimg.jl:38
   [23] macro expansion
      @ /tmp/jl_qTURTz/host/dev/Makie/GLMakie/test/runtests.jl:36 [inlined]
   [24] macro expansion
      @ ~/.julia/juliaup/julia-1.11.6+0.x64.linux.gnu/share/julia/stdlib/v1.11/Test/src/Test.jl:1709 [inlined]
   [25] top-level scope
      @ /tmp/jl_qTURTz/host/dev/Makie/GLMakie/test/runtests.jl:24
   [26] include(fname::String)
      @ Main ./sysimg.jl:38
   [27] top-level scope
      @ none:6

I used it to fix MeshCat.jl

5 Likes