Hi everyone, I am running an arch-linux machine using wayland for my display manager, and sway for my windows manager. I DO have the QT5 support package installed as well (qt5-wayland). That being said whenever I run a script trying to generate a plot using Plots I receive an error telling me Julia could not launch qt-5.
According to my research at the link posted here, this error is occuring because the BinaryBuilder.org does not include support for the wayland backend. Their purposed solution is to do the following:
ENV["JULIA_GR_PROVIDER"] = "GR" ] build GR
They suggest that this uses the sciapp tarball which does include support for wayland. While this builds fine, the next time I try to run anything generating plots julia tells me that my GR package is not completely built and then it rebuilds it to point back to the BinaryBUilder.org source!
It also might be worth knowing that when I first installed julia I used the official arch repositories and plots worked fine, however, I had other errors so I followed the best practice of using paru and got the julia-bin from AUR instead (after uninstalling the original). Itās been working well up till now.
TL;DR Need help setting up my julia environment on arch using wayland!
EDIT: here is the error in question
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
Iām on arch using sway as well. I never use the GR backend though but Makie and specifically GLMakie. If youāve tarball installed Julia then in arch I often have to go in and update the outdated .so files that comes with the Julia tarball. Basically copying them from my ā/use/libā to the Julia lib folder. This has fixed many problems with Makie for me. Not sure if it works for you though.
Thanks DoctorMike. Iām still pretty new to arch and learning a lot so this might be dumb but I have a few follow up questions.
The archwiki suggests installing julia-bin from the AUR as opposed to using pacman to directly install the version maintained in the arch repositories. I notice that my /usr/lib/ has a qt folder but my /bin/julia/ does not, are you saying that i should copy the qt folder into my julia directory?
I have done some more digging and I see that maybe replacing the julia libstdc++.so.6 is a good idea. Are you copying from /usr/lib to usr/lib/julia/ ?
I found a simple solution that works. I had xorg-xwayland installed just because of such compatibility issues, but I had set an environment variable in my .bash_profile to basically force the session to be in wayland:
if [ "$(tty)" = "/dev/tty1" ] ; then
#Your environment variables
export QT_QPA_PLATFORM=wayland
export MOZ_ENABLE_WAYLAND=1
export MOZ_WEBRENDER=1
export XDG_SESSION_TYPE=wayland
export XDG_CURRENT_DESKTOP=sway
exec sway
fi
Once I commented out that first line everything worked fine.
That being said I really donāt know what it means to build a package against another packages library, and I feel like that is something I should know how to do. Would I just follow the directions in your link but switch out python for julia like below?
Or is python essential to the build and I just replace some of the Qt files in the git clone with some from my stem library and then do everything else the same?
Just to be clear, I never install julia from AUR or using pacman. I always download the tarball from julialang.org and untar it and link it to my own ~/bin folder.
Great! Just two follow up follow up questions (sorry!).
When you untarball it where do you choose to put the destination? $HOME/julia?
I have done a lot of reading on the process of linking and the difference between symbolic and hard links and I still find it a bit intimidating. Because we are linking directories I am assuming we are creating a softlink. We are tying to create a softlink between our /bin and our $HOME/julia/bin correct? Are you just doing ln -s /bin $HOME/julia/?
Could I link it to /usr/bin/ instead?
Finally how do you know which .so files to copy over? Thanks again for all your patience and help
and now im just adding things because I accidentally deleted this post and now it wonāt let me add it again becuse āthe body is too similar to what I previously posted!ā
@charperflow : Feel free to open an issue on one sciapp/gr. The best solution, in my opinion, would be to add the Wayland plugin to the BinaryBuilder Qt build configuration.
Mixing binaries from different sources is always problematic. Thatās why in GR we provide both self-contained and OS specific variants for the most popular platforms. A single distribution can then be used from different languages (Julia, Python, Ruby, C/C++).
@jheinen Thanks for your reply! Iām still learning how the organization of all these file systems works and exactly whats happening when I ābuildā my own packages. Would you mind clarifying a few points for me?
Mixing binaries from different sources is always problematic.
What exactly does this mean? Is this what I would be doing by creating a symbolic link between a binary folder in wherever I build julia and my /usr/bin/? Wonāt my system binaryās be different . Whenever I build a new package it creates a new directory in /usr/bin/<new_package> so donāt I already have a bunch of different binaries from different sources? Sorry Im just a bit confused
The best solution, in my opinion, would be to add the Wayland plugin to the BinaryBuilder Qt build configuration.
How would one go about doing this? I have tried to read a lot of documentation on the build process, and have read ArchWikiās page on MakePKG, but there is so much going on in this process! My understanding is really surface level, but here is my current best take.
You should create a ~/bin directory and inside of that soft link the julia binary from the extracted tarball. Then you should make sure that your bin directory is in your path. Then you can start Julia from your terminal.
If you use binaries from different sources, there might be incompatibilities during run-time due to different source versions or build options. The Qt Wayland plugin is such an example - it seems not to be enabled for the BinaryBuild Qt5 build. As a solution, Wayland users should make a feature request here. It seems to me, that the BB Qt distribution only provides a minimal Qt environment.
Well thanks for all the feedback everyone. I genuinely appreciate it. Maybe one day Iāll understand the build process enough to do some of these things. But at least I have a work around for the time being