Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibraryProduct doesn't point to library with soname #23

Closed
giordano opened this issue Nov 29, 2020 · 4 comments
Closed

LibraryProduct doesn't point to library with soname #23

giordano opened this issue Nov 29, 2020 · 4 comments

Comments

@giordano
Copy link
Member

giordano commented Nov 29, 2020

% julia
julia> using Libglvnd_jll

julia> libGL
"libGL.so.1"

julia> 
% julia-master
julia> using Libglvnd_jll

julia> libGL
"/home/mose/.julia/artifacts/a84cc58d5161b950f268bb562e105bbbf4d6004a/lib/libGL.so"

julia> using BinaryBuilder

julia> BinaryBuilder.Auditor.get_soname(libGL)
"libGL.so.1"

Shouldn't the libGL variable point to libGL.so.1 on Julia v1.6? For example I can't do using GR in v1.6 on a machine without a system-provided libGL.so.1:

julia> using GR
[ Info: Precompiling GR [28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71]
ERROR: LoadError: LoadError: InitError: could not load library "/home/mose/.julia/artifacts/88ce5f00656a15580dd57ce06b013edab1fe74cc/lib/libQt53DAnimation.so"
libGL.so.1: 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:114
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:114
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/KuIwt/src/products/library_generators.jl:61 [inlined]
  [4] __init__()
    @ Qt_jll ~/.julia/packages/Qt_jll/L9NfG/src/wrappers/x86_64-linux-gnu-cxx11.jl:62
  [5] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:669
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:755
  [7] _tryrequire_from_serialized(modkey::Base.PkgId, build_id::UInt64, modpath::String)
    @ Base ./loading.jl:684
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:744
  [9] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:993
 [10] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:909
 [11] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:896
 [12] include(mod::Module, _path::String)
    @ Base ./Base.jl:386
 [13] include(x::String)
    @ GR ~/.julia/packages/GR/RlE5Y/src/GR.jl:3
 [14] top-level scope
    @ ~/.julia/packages/GR/RlE5Y/src/GR.jl:15
 [15] include
    @ ./Base.jl:386 [inlined]
 [16] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1208
 [17] top-level scope
    @ none:1
 [18] eval
    @ ./boot.jl:360 [inlined]
 [19] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [20] top-level scope
    @ none:1
during initialization of module Qt_jll
in expression starting at /home/mose/.julia/packages/GR/RlE5Y/deps/deps.jl:1
in expression starting at /home/mose/.julia/packages/GR/RlE5Y/src/GR.jl:3
ERROR: Failed to precompile GR [28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71] to /home/mose/.julia/compiled/v1.6/GR/jl_vxojcr.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
   @ Base ./loading.jl:1355
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1301
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1016
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:909
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:896

julia> using Libdl

julia> filter(l -> occursin("libGL", l), dllist())
5-element Vector{String}:
 "/home/mose/.julia/artifacts/a84cc58d5161b950f268bb562e105bbbf4d6004a/lib/libGLdispatch.so.0"
 "/home/mose/.julia/artifacts/a84cc58d5161b950f268bb562e105bbbf4d6004a/lib/libGL.so"
 "/home/mose/.julia/artifacts/a84cc58d5161b950f268bb562e105bbbf4d6004a/lib/libGLX.so.0"
 "/home/mose/.julia/artifacts/a84cc58d5161b950f268bb562e105bbbf4d6004a/lib/libGLESv1_CM.so"
 "/home/mose/.julia/artifacts/a84cc58d5161b950f268bb562e105bbbf4d6004a/lib/libGLESv2.so"

CC: @staticfloat

@giordano
Copy link
Member Author

giordano commented Nov 29, 2020

Ok, maybe the problem is the mismatch between
https://github.com/JuliaBinaryWrappers/Libglvnd_jll.jl/blob/3aadc942ce67b6ccedf52734d16202fdb8c3cd95/src/wrappers/x86_64-linux-gnu.jl#L8 and https://github.com/JuliaBinaryWrappers/Libglvnd_jll.jl/blob/3aadc942ce67b6ccedf52734d16202fdb8c3cd95/src/wrappers/x86_64-linux-gnu.jl#L24. The file actually opened is the one defined in @init_library_product, libGL.so in this case (and not having the soversion in there is actually useful...)

@giordano
Copy link
Member Author

giordano commented Nov 29, 2020

Ok, I'm not sure the bug report above is very accurate and maybe the name of the file being dlopened is a red herring, the true bug report is

I can't do using GR in v1.6 on a machine without a system-provided libGL.so.1

while this works with Julia v1.5 on the same machine

@staticfloat
Copy link
Member

I don't think it's a problem that it's getting opened with that filename. As long as the file exists, that should be fine.

It seems to me that there is a dependency that libGL.so.1 is trying to find and failing to find. strace should show us what file it's failing to find.

@giordano
Copy link
Member Author

Ok, I'm moderately convinced the issue is simply that Qt_jll doesn't explicitly on Libglvnd_jll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants