Yggdrasil icon indicating copy to clipboard operation
Yggdrasil copied to clipboard

`libjulia` provide debug variant

Open vchuravy opened this issue 1 year ago • 3 comments

On a debug build of Julia instaling CxxWrap fails with:


Failed to precompile CxxWrap [1f15a43c-97ca-5a2a-ae31-89f07a497df4] to "/home/vchuravy/.julia/compiled/v1.10/CxxWrap/jl_MBDil9".
ERROR: LoadError: InitError: could not load library "/home/vchuravy/.julia/artifacts/b28969bfe0d4c551302f58ecbf5a91930aa66489/lib/libcxxwrap_julia.so"
libjulia.so.1.10: cannot open shared object file: No such file or directory
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:117
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:116
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/pG9bm/src/products/library_generators.jl:63 [inlined]
  [4] __init__()
    @ libcxxwrap_julia_jll ~/.julia/packages/libcxxwrap_julia_jll/r5MhD/src/wrappers/x86_64-linux-gnu-cxx11-julia_version+1.10.0.jl:9
  [5] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1128
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1116

I see that the libjulia provides both the debug and non debug library, but it should probably provide a variant such that JLLs depending on it can be used on a debug build of Julia.

vchuravy avatar Dec 29 '23 16:12 vchuravy

In the past we used to ship the debug variants, but we stopped doing that since it was blowing up the download size. Our download infrastructure is a lot more robust now, and we could just bring it back.

Just thinking out aloud - Is it possible to provide it as a JLL through Yggdrasil?

-viral

ViralBShah avatar Jan 10 '24 03:01 ViralBShah

Yeah the goal would be to have it as a seperate variant of the libjulia_jll so that if one is running a debug build of Julia packages that depend on libjulia_jll don't spuriously fail.

vchuravy avatar Jan 12 '24 14:01 vchuravy

My idea was always that users needing to go that far in debugging a CxxWrap-based package would compile everything themselves and do that based on the debug version of Julia, but maybe that becomes a bit cumbersome as the ecosystem grows. Can the logic that is used to find the correct artifact also detect if Julia is a debug version?

barche avatar Jan 14 '24 13:01 barche