JuliaPackaging / Yggdrasil

Collection of builder repositories for BinaryBuilder.jl
https://binarybuilder.org
Other
312 stars 557 forks source link

`libjulia` provide debug variant #7870

Open vchuravy opened 11 months ago

vchuravy commented 11 months ago

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.

ViralBShah commented 10 months ago

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

vchuravy commented 10 months ago

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.

barche commented 10 months ago

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?