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

using mousetrap fails on Ubuntu 13.04 #20

Closed
ufechner7 opened this issue Aug 27, 2023 · 18 comments · Fixed by #23
Closed

using mousetrap fails on Ubuntu 13.04 #20

ufechner7 opened this issue Aug 27, 2023 · 18 comments · Fixed by #23
Labels
Acknowledged We are aware of this issue and will respond soon Crash Fatal terminating Error Installation Error during Install Linux Happens only on Linux Solved Solved but not yet closed

Comments

@ufechner7
Copy link

I tested mousetrap on Ubuntu 13.04 with Wayland. I tested the #main branch and get the following error:

ulia> using mousetrap
Precompiling mousetrap
  ✗ mousetrap
  0 dependencies successfully precompiled in 2 seconds. 153 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

mousetrap [5deeb4b9-6e04-4da7-8b7f-c77fb1eae65e]

Failed to precompile mousetrap [5deeb4b9-6e04-4da7-8b7f-c77fb1eae65e] to "/home/ufechner/.julia/compiled/v1.10/mousetrap/jl_fhqkxg".
ERROR: LoadError: InitError: could not load library "/home/ufechner/.julia/artifacts/0ceedc27e08d1d889ed925ceec2770d50a45564f/lib/libmousetrap_julia_binding.so"
libjulia.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:117
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:116
  [3] macro expansion
    @ mousetrap_linux_jll ~/.julia/packages/JLLWrappers/pG9bm/src/products/library_generators.jl:63 [inlined]
  [4] __init__()
    @ mousetrap_linux_jll ~/.julia/packages/mousetrap_linux_jll/rgn5v/src/wrappers/x86_64-linux-gnu.jl:22
  [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
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base ./loading.jl:1061
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base ./loading.jl:1575
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1932
 [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1806
 [11] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [12] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1797
 [14] macro expansion
    @ Base ./loading.jl:1784 [inlined]
 [15] macro expansion
    @ Base ./lock.jl:267 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
 [17] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [18] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1740
 [20] include
    @ Base ./Base.jl:489 [inlined]
 [21] 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:2216
 [22] top-level scope
    @ stdin:3
during initialization of module mousetrap_linux_jll
in expression starting at /home/ufechner/.julia/packages/mousetrap/BlclC/src/mousetrap.jl:9
in expression starting at stdin:3

Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types ~/.julia/juliaup/julia-1.10.0-beta2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Types.jl:69
  [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{…}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, timing::Bool, _from_loading::Bool, kwargs::@Kwargs{…})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.0-beta2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:1577
  [3] precompile(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{_from_loading::Bool})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.0-beta2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:159
  [4] precompile
    @ Pkg.API ~/.julia/juliaup/julia-1.10.0-beta2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:147 [inlined]
  [5] #precompile#114
    @ Pkg.API ~/.julia/juliaup/julia-1.10.0-beta2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:146 [inlined]
  [6] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1957
  [7] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1806
  [8] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
  [9] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [10] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1797
 [11] macro expansion
    @ Base ./loading.jl:1784 [inlined]
 [12] macro expansion
    @ Base ./lock.jl:267 [inlined]
 [13] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
 [14] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [15] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [16] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1740
Some type information was truncated. Use `show(err)` to see complete types.

@Clemapfel Clemapfel added Acknowledged We are aware of this issue and will respond soon Installation Error during Install labels Aug 28, 2023
@Clemapfel
Copy link
Owner

Thank you for upgrading and sorry it is still not working. I think this is related #18, I'll upgrade the jll with the fix described in that issue. I'll get back to you when it is online

@Clemapfel
Copy link
Owner

Clemapfel commented Aug 28, 2023

The new version was just deployed, please reinstall mousetrap by running the following in the REPL:

import Pkg
begin
    try
    Pkg.rm("mousetrap_linux_jll")
    Pkg.rm("mousetrap")
    catch end

    Pkg.add(url="https://github.com/clemapfel/mousetrap_linux_jll")
    Pkg.add(url="https://github.com/clemapfel/mousetrap.jl")
end

Given our history with your ubuntu machine, I'm not too hopeful this will have fixed the gdk_x11_surface_get_xid, but it is worth a try.

You can check if it works with a hello world like this:

using mousetrap
main() do app::Application
    window = Window(app)
    present!(window)
end

PS:
If it still throws the libjulia.so error, please do:

import Pkg; Pkg.add("libjulia_jll")

And see if that helped.

@ufechner7
Copy link
Author

I think you made a typo:

ERROR: `https://github.com/clemapfel/mousetrap_linux_jll` is not a valid package name
The argument appears to be a URL or path, perhaps you meant `Pkg.add(url="...")` or `Pkg.add(path="...")`.
Stacktrace:

@ufechner7
Copy link
Author

OK, I installed the new packages. Now I get:

julia> using mousetrap
Precompiling mousetrap
  ✗ mousetrap
  0 dependencies successfully precompiled in 2 seconds. 153 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

mousetrap [5deeb4b9-6e04-4da7-8b7f-c77fb1eae65e]

Failed to precompile mousetrap [5deeb4b9-6e04-4da7-8b7f-c77fb1eae65e] to "/home/ufechner/.julia/compiled/v1.10/mousetrap/jl_1ckty6".
ERROR: LoadError: InitError: could not load library "/home/ufechner/.julia/artifacts/1c1f06ce2383c6682f3e5ba47e220293a0dcac70/lib/libmousetrap_julia_binding.so"
libjulia.so.1: cannot open shared object file: No such file or directory

@Clemapfel
Copy link
Owner

Clemapfel commented Aug 28, 2023

What does

import Pkg; Pkg.add("libjulia_jll"); import libjulia_jll; names(libjulia_jll)

say?

@Clemapfel
Copy link
Owner

Also please do the same for mousetrap_linux_jll

import mousetrap_linux_jll
println(names(mousetrap_linux_jll))

@ufechner7
Copy link
Author

Downgraded to Julia 1.9.3. Now different errors:

julia> using mousetrap
[ Info: Precompiling mousetrap [5deeb4b9-6e04-4da7-8b7f-c77fb1eae65e]

[5101] signal (11.128): Segmentation fault
in expression starting at /home/ufechner/.julia/packages/mousetrap/rYVpN/src/mousetrap.jl:29
_Z21implement_orientationRN5jlcxx6ModuleE at /home/ufechner/.julia/artifacts/1c1f06ce2383c6682f3e5ba47e220293a0dcac70/lib/libmousetrap_julia_binding.so (unknown line)
define_julia_module at /home/ufechner/.julia/artifacts/1c1f06ce2383c6682f3e5ba47e220293a0dcac70/lib/libmousetrap_julia_binding.so (unknown line)
register_julia_module at /home/ufechner/.julia/artifacts/88a033de19250acca6784647964d43d7121a06aa/lib/libcxxwrap_julia.so (unknown line)
register_julia_module at /home/ufechner/.julia/packages/CxxWrap/aXNBY/src/CxxWrap.jl:393 [inlined]
readmodule at /home/ufechner/.julia/packages/CxxWrap/aXNBY/src/CxxWrap.jl:742
wrapmodule at /home/ufechner/.julia/packages/CxxWrap/aXNBY/src/CxxWrap.jl:747
_jl_invoke at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2940
jl_apply at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/julia.h:1880 [inlined]
do_call at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/interpreter.c:126
eval_value at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/interpreter.c:226
eval_stmt_value at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/interpreter.c:177 [inlined]
eval_body at /cache/build/d

@Clemapfel
Copy link
Owner

How did you install Julia and how are you starting it? Does this also happen if you run julia from the commandline (as opposed to something like vscode or juliaup).

@ufechner7
Copy link
Author

julia> import mousetrap_linux_jll

julia> println(names(mousetrap_linux_jll))
[:mousetrap, :mousetrap_julia_binding, :mousetrap_linux_jll]

@ufechner7
Copy link
Author

julia> import Pkg; Pkg.add("libjulia_jll"); import libjulia_jll; names(libjulia_jll)
Resolving package versions...
No Changes to ~/repos/GUI/Project.toml
No Changes to ~/repos/GUI/Manifest.toml
3-element Vector{Symbol}:
:libjulia
:libjulia_debug
:libjulia_jll

@Clemapfel
Copy link
Owner

Those look good, what does

mousetrap_linux_jll.mousetrap_julia_binding

Give? It should be a path

@ufechner7
Copy link
Author

julia> mousetrap_linux_jll.mousetrap_julia_binding
"/home/ufechner/.julia/artifacts/1c1f06ce2383c6682f3e5ba47e220293a0dcac70/lib/libmousetrap_julia_binding.so"

@ufechner7
Copy link
Author

I installed Julia using juliaup. Not using vscode, just the REPL.

@Clemapfel
Copy link
Owner

Okay, none of this is making any sense. First it said it can't find libjulia.so itself, then it does find it but crashes in a function that cannot crash.

Just to eliminate the variables, please pick a a Julia version, uninstall mousetrap

begin
import Pkg;
Pkg.rm("mousetrap_linux_jll")
Pkg.rm("mousetrap_windows_jll")
Pkg.rm("mousetrap_apple_jll")
Pkg.rm("mousetrap")
end

Close the REPL, reopen the session, then do a clean install

begin
  import Pkg
  Pkg.add(url="https://github.com/Clemapfel/mousetrap_windows_jll")
  Pkg.add(url="https://github.com/Clemapfel/mousetrap_linux_jll")
  Pkg.add(url="https://github.com/Clemapfel/mousetrap_apple_jll")
  Pkg.add(url="https://github.com/Clemapfel/mousetrap.jl")
end
using mousetrap

And report the error. I will try to reproduce this on my own, I will get back to you in the next few days.

I apologize for this but the error and the code causing it keeps changing to something completely different and I have no other users reporting an error with ubuntu.

@ufechner7
Copy link
Author

ufechner7 commented Aug 28, 2023

First I used Julia 1.10.beta2, then 1.9.3...

And I have three physical computers and any number of virtual machines, but only one virtual machine with Ubuntu 13.04. I am using vmware workstation player (free)...

The good thing is that I can delete the .julia folder in my virtual machine as often as I want without much impact.

I try again tomorrow...

@Clemapfel
Copy link
Owner

Please don't use a VM to check other version, just pick your physical computer so we can try to get it running there.

I'm frustrated with the error but not with you, you've been very cooperative and helpful so thank you for that. I will close #11 since we have moved to this issue anyway.

@Clemapfel
Copy link
Owner

Clemapfel commented Aug 28, 2023

Downgraded to Julia 1.9.3. Now different errors:

julia> using mousetrap
[ Info: Precompiling mousetrap [5deeb4b9-6e04-4da7-8b7f-c77fb1eae65e]

[5101] signal (11.128): Segmentation fault
in expression starting at /home/ufechner/.julia/packages/mousetrap/rYVpN/src/mousetrap.jl:29
_Z21implement_orientationRN5jlcxx6ModuleE at /home/ufechner/.julia/artifacts/1c1f06ce2383c6682f3e5ba47e220293a0dcac70/lib/libmousetrap_julia_binding.so (unknown line)
define_julia_module at /home/ufechner/.julia/artifacts/1c1f06ce2383c6682f3e5ba47e220293a0dcac70/lib/libmousetrap_julia_binding.so (unknown line)
register_julia_module at /home/ufechner/.julia/artifacts/88a033de19250acca6784647964d43d7121a06aa/lib/libcxxwrap_julia.so (unknown line)
register_julia_module at /home/ufechner/.julia/packages/CxxWrap/aXNBY/src/CxxWrap.jl:393 [inlined]
readmodule at /home/ufechner/.julia/packages/CxxWrap/aXNBY/src/CxxWrap.jl:742
wrapmodule at /home/ufechner/.julia/packages/CxxWrap/aXNBY/src/CxxWrap.jl:747
_jl_invoke at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2940
jl_apply at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/julia.h:1880 [inlined]
do_call at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/interpreter.c:126
eval_value at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/interpreter.c:226
eval_stmt_value at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/interpreter.c:177 [inlined]
eval_body at /cache/build/d

I can reproduce this now, I'll have a fix ready soon. You don't need to do the extra steps I can do this by myself now

@Clemapfel Clemapfel added Crash Fatal terminating Error High Priority Needs to be fixed ASAP Linux Happens only on Linux labels Aug 28, 2023
@Clemapfel
Copy link
Owner

Clemapfel commented Sep 1, 2023

Confirmed to most likely be a downstream bug, not related to mousetrap, cf. #11 (comment)

I'm sure it's 100% on CxxWrap for Ubuntu 22.04 but I still need to verify if this is also the case for the Ubuntu 13.04 issue you mentioned.

@Clemapfel Clemapfel added Solved Solved but not yet closed and removed High Priority Needs to be fixed ASAP labels Sep 1, 2023
@Clemapfel Clemapfel linked a pull request Sep 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Acknowledged We are aware of this issue and will respond soon Crash Fatal terminating Error Installation Error during Install Linux Happens only on Linux Solved Solved but not yet closed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants