JuliaGraphics / QML.jl

Build Qt6 QML interfaces for Julia programs.
Other
386 stars 35 forks source link

Precompilation error #112

Closed a-ill closed 3 years ago

a-ill commented 3 years ago

I am getting such an error on Julia 1.6.0. Is it only me or QML does not work yet with 1.6.0?

julia> using QML
[ Info: Precompiling QML [2db162a6-7e43-52c3-8d84-290c1c42d82a]
ERROR: LoadError: InitError: could not load library "C:\Users\a_ill\.julia\artifacts\65ee34acf07c8058dc5b67dbfc5f1d04c202d7e2\bin\libjlqml.dll"
The specified procedure could not be found. 
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\WnWcZ\src\products\library_generators.jl:63 [inlined]
  [4] __init__()
    @ jlqml_jll ~\.julia\packages\jlqml_jll\7qoIT\src\wrappers\x86_64-w64-mingw32-cxx11.jl:10
  [5] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base .\loading.jl:674
  [6] _require_from_serialized(path::String)
    @ Base .\loading.jl:727
  [7] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1031
  [8] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:914
  [9] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:901
 [10] include
    @ .\Base.jl:386 [inlined]
 [11] 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:1213
 [12] top-level scope
    @ none:1
 [13] eval
    @ .\boot.jl:360 [inlined]
 [14] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [15] top-level scope
    @ none:1
during initialization of module jlqml_jll
in expression starting at C:\Users\a_ill\.julia\packages\QML\AvdBY\src\QML.jl:1
ERROR: Failed to precompile QML [2db162a6-7e43-52c3-8d84-290c1c42d82a] to C:\Users\a_ill\.julia\compiled\v1.6\QML\jl_7DCF.tmp.
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:1360
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1306
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1021
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:914
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:901
  [7] eval
    @ .\boot.jl:360 [inlined]
  [8] eval
    @ .\Base.jl:39 [inlined]
  [9] repleval(m::Module, code::Expr, #unused#::String)
    @ VSCodeServer ~\.vscode\extensions\julialang.language-julia-1.1.38\scripts\packages\VSCodeServer\src\repl.jl:124
 [10] (::VSCodeServer.var"#47#49"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~\.vscode\extensions\julialang.language-julia-1.1.38\scripts\packages\VSCodeServer\src\repl.jl:99
 [11] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging .\logging.jl:491
 [12] with_logger
    @ .\logging.jl:603 [inlined]
 [13] (::VSCodeServer.var"#46#48"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~\.vscode\extensions\julialang.language-julia-1.1.38\scripts\packages\VSCodeServer\src\repl.jl:100
 [14] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [15] invokelatest(::Any)
    @ Base .\essentials.jl:706
 [16] macro expansion
    @ ~\.vscode\extensions\julialang.language-julia-1.1.38\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined]
 [17] (::VSCodeServer.var"#60#61")()
    @ VSCodeServer .\task.jl:406
barche commented 3 years ago

Thanks for reporting this. I am aware of the problem, it will most likely require recompiling the jlml library and releasing a new jlqml_jll. The problem is that I am using uv_open and some other functions that are no longer exported in Julia 1.6. The only workaround right now is to downgrade to Julia 1.5.

CC @giordano in case he has another workaround.

barche commented 3 years ago

This should be fixed in the master branch now.