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

Plotting error caused by GKS_QT environment variable #548

Open
vandalt opened this issue Jul 1, 2024 · 12 comments
Open

Plotting error caused by GKS_QT environment variable #548

vandalt opened this issue Jul 1, 2024 · 12 comments

Comments

@vandalt
Copy link

vandalt commented Jul 1, 2024

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 below

Click to see 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.


connect: Connection refused
GKS: can't connect to GKS socket application

GKS: Open failed in routine OPEN_WS
GKS: GKS not in proper state. GKS must be either in the state WSOP or WSAC in routine ACTIVATE_WS
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine FILLAREA
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE

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 is

julia> 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:/home/vandal/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/bin/../lib/julia:/home/vandal/.julia/artifacts/cfb5ef1ba7ec0b0288c2d1f55f4573405daff62e/lib:/home/"  4617 bytes  "a99bbfcdf336c2dc372de4/lib:/home/vandal/.julia/artifacts/466e859891e85a1f8a887e712f17b1645ec9c803/lib:/home/vandal/.julia/artifacts/2118fab1644a0abb3dd43fb741c68b42e8a92505/lib:/home/vandal/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/bin/../lib/julia:/home/vandal/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/bin/../lib /home/vandal/.julia/artifacts/2118fab1644a0abb3dd43fb741c68b42e8a92505/bin/gksqt"

Out 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

"env $key=$(GRPreferences.libpath[]) $(GRPreferences.gksqt[])"

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!

@jheinen
Copy link
Owner

jheinen commented Jul 1, 2024

Could you please try to install GR in a fresh environment and compare the installed version(s) with your current environment?

@vandalt
Copy link
Author

vandalt commented Jul 1, 2024

If by fresh environment you mean creating a new environment with ] activate <env-name> (again, I'm very new to Julia, sorry if that's not what you meant), I just tried that and got the same behaviour.

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.

@jheinen
Copy link
Owner

jheinen commented Jul 2, 2024

That's strange. Which Linux platform are you using (versioninfo())? Did you try to install only GR in a fresh environment (] add GR)?

Could you try: JULIA_DEBUG=GR julia ... ? Can you run the command given by ENV["GKS_QT"?

@vandalt
Copy link
Author

vandalt commented Jul 2, 2024

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 (uname -a gives Linux yoga 6.9.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 16 Jun 2024 19:06:37 +0000 x86_64 GNU/Linux). I'm using wayland via the Sway window manager and I have QT_QPA_PLATFORM set to wayland.
I installed julia via the julia-bin package, but using juliaup gives the same behaviour.

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
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/dc526f26fb179a3f68eb13fcbe5d2d2a5aa7eeac/lib:/home/vandal/.julia/artifacts/c9fd7a94d3c09eac4f3ca94d21bf40ccf65eccf5/lib:/home/vandal/.julia/artifacts/20c009b8faa6b86ae9ecc8002f2772cd4724774d/lib:/home/vandal/.julia/artifacts/b3ddd583e7aec92a77cf5961fad01fd7063c1d40/lib:/home/vandal/.julia/artifacts/07ceef013364157053410cf114bae82d90d9bcaa/lib:/home/vandal/.julia/artifacts/0803f8d074309498cdf55effdb9c55bc3ef88dde/lib:/home/vandal/.julia/artifacts/f92cfdafb94fa8c50330be3684c9aeb80bd14750/lib:/home/vandal/.julia/artifacts/1308e48c3f4f2fd9adaa56b9bd4a86a995d50abd/lib:/home/vandal/.julia/artifacts/558980a93131f08be5335521b84e137ee3172296/lib:/home/vandal/.julia/artifacts/e784f2552810dd5d324c76a66fc3ab6eea798107/lib:/home/vandal/.julia/artifacts/c82aa2d1fefbd035c6fe38b6fbd71fd5dbc8cf5c/lib:/home/vandal/.julia/artifacts/aae093c71ea1b1dc04c457afcae880d26c532115/lib:/home/vandal/.julia/artifacts/bd965e3c7f9460155f06361da380c63fa0351ef6/lib:/home/vandal/.julia/artifacts/060cf7829c3363638c29228ea4ab0bd033d8eab0/lib:/home/vandal/.julia/artifacts/77d0e7c90e6a2fd6f2f8457bbb7b86ed86d140d9/lib:/home/vandal/.julia/artifacts/1e69ef9fbf05e2896d3cb70eac8080c4d10f8696/lib:/home/vandal/.julia/artifacts/e200b9737b27598b95b404cbc34e74f95b2bf5d0/lib:/home/vandal/.julia/artifacts/a8e2d77aed043a035fd970326d8f070080efa8fa/lib:/home/vandal/.julia/artifacts/6f98018cad6a09e91f90658f188c6be47e48a0c7/lib:/home/vandal/.julia/artifacts/4080957894c9e362c207c2d6248c691db444989b/lib:/home/vandal/.julia/artifacts/2ab21f29b30c228bd0e5215585f822730cad5a72/lib:/home/vandal/.julia/artifacts/62c010876222f83fe8878bf2af0e362083d20ee3/lib:/home/vandal/.julia/artifacts/ee20a84d0166c074dfa736b642902dd87b4da48d/lib:/home/vandal/.julia/artifacts/459252c01ffcd08700841efdd4b6d3edfe5916e7/lib:/home/vandal/.julia/artifacts/cc415631aeb190b075329ce756f690a90e1f873b/lib:/home/vandal/.julia/artifacts/c8a20a2030f10b70947d8d2a6bff7f8b5f343fe9/lib:/home/vandal/.julia/artifacts/0631e2a6a31b5692eec7a575836451b16b734ec0/lib:/home/vandal/.julia/artifacts/89ed5dda220da4354ada1970107e13679914bbbc/lib:/home/vandal/.julia/artifacts/1cf7375e8ec1bbe1219934488737c12237ba2012/lib:/home/vandal/.julia/artifacts/587de110e5f58fd435dc35b294df31bb7a75f692/lib:/home/vandal/.julia/artifacts/fc239b3ff5739aeab252bd154fa4dd045fefe629/lib:/home/vandal/.julia/artifacts/59ad2df0e0417250790a9d28529385c2329e22b9/lib:/home/vandal/.julia/artifacts/eff86eedadb59cff1a61399e3242b3f529ca6f59/lib:/home/vandal/.julia/artifacts/b1158959679bd9be00bd4fbf143a50e9c60e77e0/lib:/home/vandal/.julia/artifacts/9d7f5887309a96013a2c75f48b5e137e60ccae8f/lib:/home/vandal/.julia/artifacts/74fd55820a62aa47ebf4d942aa59096980a1851d/lib:/home/vandal/.julia/artifacts/aa52699bd1491b7de9c72fc1eab21e2e4bd649e2/lib:/home/vandal/.julia/artifacts/37dda4e57d9de95c99d1f8c6b3d8f4eca88c39a2/lib:/home/vandal/.julia/artifacts/f0d193662fead3500b523f94b4f1878daab59a93/lib:/home/vandal/.julia/artifacts/05616da88f6b36c7c94164d4070776aef18ce46b/lib:/home/vandal/.julia/artifacts/2df316da869cd97f7d70029428ee1e2e521407cd/lib:/home/vandal/.julia/artifacts/7190f0cb0832b80761cc6d513dd9b935f3e26358/lib:/home/vandal/.julia/artifacts/4daa3879a820580557ef34945e2ae243dfcbba11/lib:/home/vandal/.julia/artifacts/3643539f491c217e13c1595daad81dd1426fba07/lib:/home/vandal/.julia/artifacts/1b82967d82b35f8abcf39b837402df5ffbde6a09/lib:/home/vandal/.julia/artifacts/694cae97bb3cbf8f1f73f2ecabd891602ccf1751/lib:/home/vandal/.julia/artifacts/a47753eb13a8000f65dfa44a924c85c917753031/lib:/home/vandal/.julia/artifacts/4c45bf9c8292490acd9463bbfbf168277d9720b6/lib:/home/vandal/.julia/artifacts/e18a60e84fd8aefa967cb9f1d11dc6cbd9cac88b/lib:/home/vandal/.julia/artifacts/872754c2f795d19a3e2e205b2bbaea659f28d11e/lib:/home/vandal/.julia/artifacts/7da37be2742b3d1cfe1c14bf5bbd85aed4887f46/lib:/home/vandal/.julia/artifacts/c35cb3f6f3043a4e962fd56b61ad91b4adb557f7/lib:/home/vandal/.julia/artifacts/13befbe35cffe7da192c7001ece18b4be3aa3720/lib:/home/vandal/.julia/artifacts/cacd8c147f866d6672e1aca9bb01fb919a81e96a/lib:/home/vandal/.julia/artifacts/b7dc5dce963737414a564aca8d4b82ee388f4fa1/lib:/home/vandal/.julia/artifacts/0d364e900393f710a03a5bafe2852d76e4d2c2cd/lib:/home/vandal/.julia/artifacts/1a2adcee7d99fea18ead33c350332626b262e29a/lib:/home/vandal/.julia/artifacts/40eea58ff37ecc8fb6f21f41079a33b511b3ff92/lib:/home/vandal/.julia/artifacts/79cc5446ced978de84b6e673e01da0ebfdd6e4a5/lib:/home/vandal/.julia/artifacts/fce445d991cf502908d681348eec2174c5e31ba8/lib:/home/vandal/.julia/artifacts/b0d2538004dda9eb6449b72b0b85703aeac30a66/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

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=

@vandalt
Copy link
Author

vandalt commented Jul 3, 2024

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).

GKS_QT is still set to something very long:

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:/usr/lib:/home/vandal/.julia/artifacts/c009588a4b76a30f5d3e02caa2a9d2595ecfb450/lib:/home/vandal/.julia/artifacts/dc526f26fb179a3f68eb13fcbe5d2d2a5aa7eeac/lib:/home/vandal/.julia/artifacts/c9fd7a94d3c09eac4f3ca94d21bf40ccf65eccf5/lib:/home/vandal/.julia/artifacts/20c009b8faa6b86ae9ecc8002f2772cd4724774d/lib:/home/vandal/.julia/artifacts/b3ddd583e7aec92a77cf5961fad01fd7063c1d40/lib:/home/vandal/.julia/artifacts/07ceef013364157053410cf114bae82d90d9bcaa/lib:/home/vandal/.julia/artifacts/0803f8d074309498cdf55effdb9c55bc3ef88dde/lib:/home/vandal/.julia/artifacts/f92cfdafb94fa8c50330be3684c9aeb80bd14750/lib:/home/vandal/.julia/artifacts/1308e48c3f4f2fd9adaa56b9bd4a86a995d50abd/lib:/home/vandal/.julia/artifacts/558980a93131f08be5335521b84e137ee3172296/lib:/home/vandal/.julia/artifacts/e784f2552810dd5d324c76a66fc3ab6eea798107/lib:/home/vandal/.julia/artifacts/c82aa2d1fefbd035c6fe38b6fbd71fd5dbc8cf5c/lib:/home/vandal/.julia/artifacts/aae093c71ea1b1dc04c457afcae880d26c532115/lib:/home/vandal/.julia/artifacts/bd965e3c7f9460155f06361da380c63fa0351ef6/lib:/home/vandal/.julia/artifacts/060cf7829c3363638c29228ea4ab0bd033d8eab0/lib:/home/vandal/.julia/artifacts/77d0e7c90e6a2fd6f2f8457bbb7b86ed86d140d9/lib:/home/vandal/.julia/artifacts/1e69ef9fbf05e2896d3cb70eac8080c4d10f8696/lib:/home/vandal/.julia/artifacts/e200b9737b27598b95b404cbc34e74f95b2bf5d0/lib:/home/vandal/.julia/artifacts/a8e2d77aed043a035fd970326d8f070080efa8fa/lib:/home/vandal/.julia/artifacts/6f98018cad6a09e91f90658f188c6be47e48a0c7/lib:/home/vandal/.julia/artifacts/4080957894c9e362c207c2d6248c691db444989b/lib:/home/vandal/.julia/artifacts/2ab21f29b30c228bd0e5215585f822730cad5a72/lib:/home/vandal/.julia/artifacts/62c010876222f83fe8878bf2af0e362083d20ee3/lib:/home/vandal/.julia/artifacts/ee20a84d0166c074dfa736b642902dd87b4da48d/lib:/home/vandal/.julia/artifacts/459252c01ffcd08700841efdd4b6d3edfe5916e7/lib:/home/vandal/.julia/artifacts/cc415631aeb190b075329ce756f690a90e1f873b/lib:/home/vandal/.julia/artifacts/c8a20a2030f10b70947d8d2a6bff7f8b5f343fe9/lib:/home/vandal/.julia/artifacts/0631e2a6a31b5692eec7a575836451b16b734ec0/lib:/home/vandal/.julia/artifacts/89ed5dda220da4354ada1970107e13679914bbbc/lib:/home/vandal/.julia/artifacts/1cf7375e8ec1bbe1219934488737c12237ba2012/lib:/home/vandal/.julia/artifacts/587de110e5f58fd435dc35b294df31bb7a75f692/lib:/home/vandal/.julia/artifacts/fc239b3ff5739aeab252bd154fa4dd045fefe629/lib:/home/vandal/.julia/artifacts/59ad2df0e0417250790a9d28529385c2329e22b9/lib:/home/vandal/.julia/artifacts/eff86eedadb59cff1a61399e3242b3f529ca6f59/lib:/home/vandal/.julia/artifacts/b1158959679bd9be00bd4fbf143a50e9c60e77e0/lib:/home/vandal/.julia/artifacts/9d7f5887309a96013a2c75f48b5e137e60ccae8f/lib:/home/vandal/.julia/artifacts/74fd55820a62aa47ebf4d942aa59096980a1851d/lib:/home/vandal/.julia/artifacts/aa52699bd1491b7de9c72fc1eab21e2e4bd649e2/lib:/home/vandal/.julia/artifacts/37dda4e57d9de95c99d1f8c6b3d8f4eca88c39a2/lib:/home/vandal/.julia/artifacts/f0d193662fead3500b523f94b4f1878daab59a93/lib:/home/vandal/.julia/artifacts/05616da88f6b36c7c94164d4070776aef18ce46b/lib:/home/vandal/.julia/artifacts/2df316da869cd97f7d70029428ee1e2e521407cd/lib:/home/vandal/.julia/artifacts/7190f0cb0832b80761cc6d513dd9b935f3e26358/lib:/home/vandal/.julia/artifacts/4daa3879a820580557ef34945e2ae243dfcbba11/lib:/home/vandal/.julia/artifacts/3643539f491c217e13c1595daad81dd1426fba07/lib:/home/vandal/.julia/artifacts/1b82967d82b35f8abcf39b837402df5ffbde6a09/lib:/home/vandal/.julia/artifacts/694cae97bb3cbf8f1f73f2ecabd891602ccf1751/lib:/home/vandal/.julia/artifacts/a47753eb13a8000f65dfa44a924c85c917753031/lib:/home/vandal/.julia/artifacts/4c45bf9c8292490acd9463bbfbf168277d9720b6/lib:/home/vandal/.julia/artifacts/e18a60e84fd8aefa967cb9f1d11dc6cbd9cac88b/lib:/home/vandal/.julia/artifacts/872754c2f795d19a3e2e205b2bbaea659f28d11e/lib:/home/vandal/.julia/artifacts/7da37be2742b3d1cfe1c14bf5bbd85aed4887f46/lib:/home/vandal/.julia/artifacts/c35cb3f6f3043a4e962fd56b61ad91b4adb557f7/lib:/home/vandal/.julia/artifacts/13befbe35cffe7da192c7001ece18b4be3aa3720/lib:/home/vandal/.julia/artifacts/cacd8c147f866d6672e1aca9bb01fb919a81e96a/lib:/home/vandal/.julia/artifacts/b7dc5dce963737414a564aca8d4b82ee388f4fa1/lib:/home/vandal/.julia/artifacts/0d364e900393f710a03a5bafe2852d76e4d2c2cd/lib:/home/vandal/.julia/artifacts/1a2adcee7d99fea18ead33c350332626b262e29a/lib:/home/vandal/.julia/artifacts/40eea58ff37ecc8fb6f21f41079a33b511b3ff92/lib:/home/vandal/.julia/artifacts/79cc5446ced978de84b6e673e01da0ebfdd6e4a5/lib:/home/vandal/.julia/artifacts/fce445d991cf502908d681348eec2174c5e31ba8/lib:/home/vandal/.julia/artifacts/b0d2538004dda9eb6449b72b0b85703aeac30a66/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%

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 (/home/vandal/.julia/artifacts/7fbeed78a2a71554624bc9441e767886d4d9aa4f/bin/gksqt) without the whole LD_LIBRARY_PATH seemed to work OK.

@jheinen
Copy link
Owner

jheinen commented Jul 3, 2024

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 GKS QtTerm window.

@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 ...

@barche
Copy link
Contributor

barche commented Jul 3, 2024

Not able to get to a Wayland machine soon unfortunately, but can you try to add and import the Qt6Wayland_jll package before plotting? It should activate Wayland support automatically once loaded. Might be needed to do that even before loading GR, not sure.

@jheinen
Copy link
Owner

jheinen commented Jul 4, 2024

Not able to get to a Wayland machine soon unfortunately, but can you try to add and import the Qt6Wayland_jll package before plotting? It should activate Wayland support automatically once loaded. Might be needed to do that even before loading GR, not sure.

Thanks a lot. Importing Qt6Wayland_jll before plotting fixes the problem. It is sufficient to do this after importing GR.

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 GR_jll in any case (in build_tarballs.jl), right?

Dependency("Qt6Wayland_jll"; compat="~6.7.1"),

@barche
Copy link
Contributor

barche commented Jul 4, 2024

I don't think it is needed to add Qt6Wayland as a dependency in the build_tarballs, for QML I added Qt6Wayland_jll as a dependency to QML.jl and in the main source file 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

@jheinen
Copy link
Owner

jheinen commented Jul 4, 2024

I don't think it is needed to add Qt6Wayland as a dependency in the build_tarballs, for QML I added Qt6Wayland_jll as a dependency to QML.jl and in the main source file 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 GR.jl and the problem seems to be solved.

@jheinen
Copy link
Owner

jheinen commented Jul 4, 2024

@vandalt : Could you please try to ] add GR#master and check whether it works for Arch Linux, too? Thanks in advance ...

@vandalt
Copy link
Author

vandalt commented Jul 4, 2024

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 😄

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

3 participants