-
Notifications
You must be signed in to change notification settings - Fork 76
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
Plotting error caused by GKS_QT environment variable #548
Comments
Could you please try to install GR in a fresh environment and compare the installed version(s) with your current environment? |
If by fresh environment you mean creating a new environment with Here is the installed version in my default environment (@v1.10) pkg> status Plots GR
Status `~/.julia/environments/v1.10/Project.toml`
⌃ [28b8d3ca] GR v0.73.5
[91a5bcdd] Plots v1.40.4
Info Packages marked with ⌃ have new versions available and may be upgradable. And in the new environment (julia-plotting) pkg> st Plots GR
Status `~/repos/perso/julia-plotting/julia-plotting/Project.toml`
[28b8d3ca] GR v0.73.6
[91a5bcdd] Plots v1.40.4 The exact path for GKS_QT is in a different directory, however. |
That's strange. Which Linux platform are you using ( Could you try: |
This is what I got when trying version info: julia> versioninfo()
Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 8 × Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, icelake-client)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores) I'm using an up to date Arch Linux Installation ( Installing only GR and trying to plot a histogram gives the same result Using the debug flag gives this information before reproducing the error message given in the issue: ┌ Debug: Artifacts setup
│ ENV["GKSwstype"] = "gksqt"
│ ENV["GKS_QT"] = "env LD_LIBRARY_PATH=/home/vandal/.julia/artifacts/f839432e3d2904a5c847b217ef0c0f489377ecc5/lib:/home/vandal/.julia/artifacts/e4e0c1bb8f52a7a9d586af15bc1713e83c1f42af/lib:/home/vandal/.julia/artifacts/d00220164876dea2cb19993200662745eed5e2db/lib:/usr/bin/../lib/julia:/home/vandal/.julia/artifacts/c009588a4b76a30f5d3e02caa2a9d2595ecfb450/lib:/home/vandal/.julia/artifacts/dc526f26fb" ⋯ 4496 bytes ⋯ "8004dda9eb6449b72b0b85703aeac30a66/lib:/home/vandal/.julia/artifacts/f03dd5ac03468009d5a99bbfcdf336c2dc372de4/lib:/home/vandal/.julia/artifacts/eae77862e95d04dfafb9fbe9ae39e688b35d756a/lib:/home/vandal/.julia/artifacts/7fbeed78a2a71554624bc9441e767886d4d9aa4f/lib:/usr/bin/../lib/julia:/usr/bin/../lib /home/vandal/.julia/artifacts/7fbeed78a2a71554624bc9441e767886d4d9aa4f/bin/gksqt"
└ @ GR ~/.julia/packages/GR/wwm2h/src/GR.jl:361
┌ Debug: Default GKS_ENCODING
│ ENV["GKS_ENCODING"] = "utf8"
└ @ GR ~/.julia/packages/GR/wwm2h/src/GR.jl:375 Here is the non-truncated command that is used internally Click to expand
Running that gives this error: qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, xcb.
zsh: IOT instruction (core dumped) LD_LIBRARY_PATH= |
Oh, interesting, if I install julia via the julia archlinux package instead of julia-bin, GR works by default. However, this package is not recommended because it is unsupported by julia upsream (see the note here).
but copy-pasting it in the CLI now works (does nothing, does not throw an error). In both cases (installation that gives an error or not), just using the final part of the command ( |
Interestingly, we also get the error message about the missing Wayland plugin on an Arch Linux and a Debian system (with Xwayland servers), but the plot is displayed correctly in the @barche : Is the Wayland plugin automatically created for Linux targets? At least I don't see that it is explicitly disabled in the BB configuration ... |
Not able to get to a Wayland machine soon unfortunately, but can you try to add and import the |
Thanks a lot. Importing Let's see if we can automate this within GR, at least for Linux systems. For the build process, another dependency must be added for
|
I don't think it is needed to add Qt6Wayland as a dependency in the build_tarballs, for QML I added if haskey(ENV, "WAYLAND_DISPLAY") || get(ENV, "XDG_SESSION_TYPE", "") == "wayland"
# loading this automatially on Wayland ensures that applications run natively on Wayland without user intervention
using Qt6Wayland_jll
end |
Thanks for the suggestion. I have implemented it analogously in |
@vandalt : Could you please try to |
It worked using the juliaup AUR package! The window seems to be Wayland native (and not Xwayland), too! It does not work with julia-bin. The same error as before occurs. I will mention the issue on the AUR package in case the fix should be on the julia-bin side. Thanks a lot for the quick investigation/fix 😄 |
Hi,
I'm very new to Julia, so I'm sorry if this is something obvious.
When trying to plot (
plot(x, y)
) with the GR backend, I get the error shown in detail belowClick to see error
After looking through the GR.jl code, I narrowed down the issue to the
GKS_QT
environment variable.Before entering julia, I had not set that environment variable.
After trying to use
plot(x, y)
, resulting in the error above, the environment variable isOut of curiousity, I tried manually setting
GKS_QT
just the second part of that env var,/home/vandal/.julia/artifacts/2118fab1644a0abb3dd43fb741c68b42e8a92505/bin/gksqt
and it worked.The line in the code that also adds
LD_LIBRARY_PATH
is this one here:GR.jl/src/GR.jl
Line 358 in d919b64
I'm guessing this is something wrong with my setup, but wanted to check so I'm opening this issue. Any guidance is welcome! The fix of manually setting the environment variable on my end works, but I'm guessing this path might change with Julia version or with specific installations.
Thanks!
The text was updated successfully, but these errors were encountered: