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

Running Examples with Julia 1.11 fails #212

Open
kwmartin opened this issue Dec 29, 2024 · 2 comments
Open

Running Examples with Julia 1.11 fails #212

kwmartin opened this issue Dec 29, 2024 · 2 comments
Labels
documentation examples Problem with the QML examples

Comments

@kwmartin
Copy link

Hello, startup.jl from ~/.julia/config has just been run
Setup successful
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.2 (2024-12-01)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> cd("QmlJuliaExamples/basic") # or images, opengl or plots instead of the basic subdirectory

julia> using Pkg

julia> Pkg.activate(".")
  Activating project at `/home/Dropbox/programming/julia/JuliaFiles/QmlJuliaExamples/basic`

julia> Pkg.instantiate()

julia> include("gui.jl")
ERROR: LoadError: InitError: could not load library "/home/Dropbox/programming/julia/JuliaFiles/QmlJuliaExamples/basic/artifacts/8a8d0ba819ce1e30b93f34cc61f891d1334be59d/lib/libQt6Gui.so"
/home/Dropbox/programming/julia/JuliaFiles/QmlJuliaExamples/basic/artifacts/8a8d0ba819ce1e30b93f34cc61f891d1334be59d/lib/libQt6Gui.so: undefined symbol: _ZN20QEventDispatcherUNIX13registerTimerEixN2Qt9TimerTypeEP7QObject, version Qt_6_PRIVATE_API
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:120
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:119
  [3] macro expansion
    @ /home/Dropbox/programming/julia/JuliaFiles/packages/JLLWrappers/GfYNv/src/products/library_generators.jl:63 [inlined]
  [4] __init__()
    @ Qt6Base_jll /home/Dropbox/programming/julia/JuliaFiles/QmlJuliaExamples/basic/packages/Qt6Base_jll/YAh2B/src/wrappers/x86_64-linux-gnu-cxx11.jl:54
  [5] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1378
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1366
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{…}, ignore_native::Nothing; register::Bool)
    @ Base ./loading.jl:1254
  [8] _include_from_serialized (repeats 2 times)
    @ ./loading.jl:1210 [inlined]
  [9] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{…}, DEPOT_PATH::Vector{…})
    @ Base ./loading.jl:2041
 [10] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2527
 [11] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2388
 [12] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [13] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [14] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2375
 [15] macro expansion
    @ ./loading.jl:2314 [inlined]
 [16] macro expansion
    @ ./lock.jl:273 [inlined]
 [17] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2271
 [18] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [19] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [20] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2260
 [21] include(fname::String)
    @ Main ./sysimg.jl:38
 [22] top-level scope
    @ REPL[5]:1
during initialization of module Qt6Base_jll
in expression starting at /home/Dropbox/programming/julia/JuliaFiles/QmlJuliaExamples/basic/gui.jl:2
Some type information was truncated. Use `show(err)` to see complete types.

julia> 

If I copy and paste code from gui.jl into repl, everything is fine until the line:

julia> # Load the QML file
       loadqml(qml_file, guiproperties = JuliaPropertyMap("timer" => QTimer(), "oldcounter" => oldcounter, "bg_counter" => 

and then it failed. Now, for some reason, using QML is also failing:

julia> using QML
[ Info: Precompiling QML [2db162a6-7e43-52c3-8d84-290c1c42d82a] (cache misses: wrong dep version loaded (2), wrong source (2))
ERROR: LoadError: This version of CxxWrap requires a libcxxwrap-julia in the range (v"0.11.0", v"0.12.0"), but version 0.13.3 was found
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] checkversion()
   @ CxxWrap.CxxWrapCore /home/Dropbox/programming/julia/JuliaFiles/QmlJuliaExamples/basic/packages/CxxWrap/5IZvn/src/CxxWrap.jl:38
 [3] top-level scope
   @ /home/Dropbox/programming/julia/JuliaFiles/QmlJuliaExamples/basic/packages/CxxWrap/5IZvn/src/CxxWrap.jl:43
 [4] include
   @ ./Base.jl:557 [inlined]
 [5] 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, UInt128}}, source::String)
   @ Base ./loading.jl:2881
 [6] top-level scope
   @ stdin:6
in expression starting at /home/Dropbox/programming/julia/JuliaFiles/QmlJuliaExamples/basic/packages/CxxWrap/5IZvn/src/CxxWrap.jl:1
in expression starting at stdin:6
ERROR: LoadError: Failed to precompile CxxWrap [1f15a43c-97ca-5a2a-ae31-89f07a497df4] to "/home/Dropbox/programming/julia/JuliaFiles/QmlJuliaExamples/basic/compiled/v1.11/CxxWrap/jl_DAcmnt".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, loadable_exts::Nothing)
    @ Base ./loading.jl:3174
  [3] (::Base.var"#1110#1111"{Base.PkgId})()
    @ Base ./loading.jl:2579
  [4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile /home/Dropbox/Downloads/Julia/julia-1.11.2/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:95
  [5] #mkpidlock#6
    @ /home/Dropbox/Downloads/Julia/julia-1.11.2/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:90 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile /home/Dropbox/Downloads/Julia/julia-1.11.2/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:116
  [7] #invokelatest#2
    @ ./essentials.jl:1057 [inlined]
  [8] invokelatest
    @ ./essentials.jl:1052 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3698
 [10] maybe_cachefile_lock
    @ ./loading.jl:3695 [inlined]
 [11] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2565
 [12] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2388
 [13] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [14] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [15] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2375
 [16] macro expansion
    @ ./loading.jl:2314 [inlined]
 [17] macro expansion
    @ ./lock.jl:273 [inlined]
 [18] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2271
 [19] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [20] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [21] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2260
 [22] include
    @ ./Base.jl:557 [inlined]
 [23] 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, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2881
 [24] top-level scope
    @ stdin:6
in expression starting at /home/Dropbox/programming/julia/JuliaFiles/QmlJuliaExamples/basic/packages/QML/ZVeBh/src/QML.jl:1
in expression starting at stdin:6
ERROR: Failed to precompile QML [2db162a6-7e43-52c3-8d84-290c1c42d82a] to "./compiled/v1.11/QML/jl_8kk0nA".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{…}, loadable_exts::Nothing)
    @ Base ./loading.jl:3174
  [3] (::Base.var"#1110#1111"{Base.PkgId})()
    @ Base ./loading.jl:2579
  [4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile /home/Dropbox/Downloads/Julia/julia-1.11.2/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:95
  [5] #mkpidlock#6
    @ /home/Dropbox/Downloads/Julia/julia-1.11.2/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:90 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile /home/Dropbox/Downloads/Julia/julia-1.11.2/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:116
  [7] #invokelatest#2
    @ ./essentials.jl:1057 [inlined]
  [8] invokelatest
    @ ./essentials.jl:1052 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3698
 [10] maybe_cachefile_lock
    @ ./loading.jl:3695 [inlined]
 [11] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2565
 [12] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2388
 [13] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [14] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [15] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2375
 [16] macro expansion
    @ ./loading.jl:2314 [inlined]
 [17] macro expansion
    @ ./lock.jl:273 [inlined]
 [18] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2271
 [19] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [20] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [21] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2260
Some type information was truncated. Use `show(err)` to see complete types.

julia> 

My versioninfo is:

julia> versioninfo()
Julia Version 1.11.2
Commit 5e9a32e7af2 (2024-12-01 20:02 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 20 × 12th Gen Intel(R) Core(TM) i9-12900HK
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, alderlake)
Threads: 1 default, 0 interactive, 1 GC (on 20 virtual cores)
Environment:
  JULIA_BINDIR = /home/Dropbox/Downloads/Julia/julia-1.11.2/bin/
  JULIA_DEPOT_PATH = .:/home/Dropbox/programming/julia/JuliaFiles/:
  LD_LIBRARY_PATH = /usr/local/lib64:

julia> 

and

Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.5 LTS
Release:	22.04
Codename:	jammy
> 

Any ideas? I'm thinking of going to using Python with PySide6 and PyCall as an alternative. I was hoping QML would be a simple alternative, but it's turning into a time sink? Thanks for ideas.

@ufechner7
Copy link
Member

ufechner7 commented Dec 30, 2024

Just tried using Julia 1.10 on Ubuntu 12.04. Works fine.

cd basic
julia
using Pkg
Pkg.activate(".")
include("gui.jl")

The basic GUI is displayed and I can play with it.

I tested with Julia 1.11, and the example failed.

The I changed the following lines in Project.toml:

[compat]
ColorTypes = "0.11"
CxxWrap = "0.16"
QML = "0.9"
julia = "1.6"

and executed

julia --project
using Pkg
Pkg.update()

Now the basic example works fine with Julia 1.11.

@ufechner7 ufechner7 changed the title Running Examples Fails Running Examples with Julia 1.11 fails Dec 30, 2024
@ufechner7 ufechner7 added documentation examples Problem with the QML examples labels Dec 30, 2024
@ufechner7
Copy link
Member

This pull request will fix this issue: barche/QmlJuliaExamples#15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation examples Problem with the QML examples
Projects
None yet
Development

No branches or pull requests

2 participants