# Plots issues using wayland on arch

**URL:** https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556
**Category:** General Usage
**Tags:** package, installation, plots
**Created:** [July 20, 2022, 7:38pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556 "2022-07-20T19:38:26Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![charperflow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charperflow/32/22252_2.png) [@charperflow](https://discourse.julialang.org/u/charperflow)
#### Post date: [July 20, 2022, 7:38pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/1 "2022-07-20T19:38:27Z")

</div>

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](https://github.com/sciapp/gr/issues/141), this error is occuring because the [BinaryBuilder.org](http://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](http://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

```julia
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""

```

---

<div class="post-metadata">

### Author: ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)
#### Post date: [July 20, 2022, 8:14pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/2 "2022-07-20T20:14:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![charperflow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charperflow/32/22252_2.png) [@charperflow](https://discourse.julialang.org/u/charperflow)
#### Post date: [July 20, 2022, 9:23pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/3 "2022-07-20T21:23:00Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![charperflow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charperflow/32/22252_2.png) [@charperflow](https://discourse.julialang.org/u/charperflow)
#### Post date: [July 20, 2022, 9:31pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/4 "2022-07-20T21:31:03Z")

</div>

This is the specific error I am getting

```julia
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""

```

---

<div class="post-metadata">

### Author: ![charperflow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charperflow/32/22252_2.png) [@charperflow](https://discourse.julialang.org/u/charperflow)
#### Post date: [July 21, 2022, 6:30am UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/5 "2022-07-21T06:30:08Z")

</div>

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/ ?

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [July 21, 2022, 10:58am UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/6 "2022-07-21T10:58:59Z")

</div>

You might need to build GR against your QT library.

[https://gr-framework.org/building.html](https://gr-framework.org/building.html)

---

<div class="post-metadata">

### Author: ![charperflow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charperflow/32/22252_2.png) [@charperflow](https://discourse.julialang.org/u/charperflow)
#### Post date: [July 21, 2022, 5:21pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/7 "2022-07-21T17:21:47Z")

</div>

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:

```julia
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?

`PYTHONPATH=${PYTHONPATH}:/usr/local/gr/lib/python` becomes `JULIAPATH=${JULIAPATH}:/usr/local/gr/lib/julia`

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?

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [July 21, 2022, 5:27pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/8 "2022-07-21T17:27:40Z")

</div>

I’m glad that you found a solution.

> [@charperflow](#):
>
> Would I just follow the directions in your link but switch out python for julia like below?
> 
> `PYTHONPATH=${PYTHONPATH}:/usr/local/gr/lib/python` becomes `JULIAPATH=${JULIAPATH}:/usr/local/gr/lib/julia`

Essentially, binary files contain embedded links to other binaries. @jheinen would be the best person to answer these questions.

He may answer here, but you may also want to consider opening a Github issue on either on these repositories.

> **[GitHub - sciapp/gr: GR framework: a graphics library for visualisation...](https://github.com/sciapp/gr)**
>
> GR framework: a graphics library for visualisation applications - GitHub - sciapp/gr: GR framework: a graphics library for visualisation applications

> **[GitHub - jheinen/GR.jl: Plotting for Julia based on GR, a framework for...](https://github.com/jheinen/GR.jl)**
>
> Plotting for Julia based on GR, a framework for visualisation applications - GitHub - jheinen/GR.jl: Plotting for Julia based on GR, a framework for visualisation applications

---

<div class="post-metadata">

### Author: ![charperflow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charperflow/32/22252_2.png) [@charperflow](https://discourse.julialang.org/u/charperflow)
#### Post date: [July 21, 2022, 7:54pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/9 "2022-07-21T19:54:45Z")

</div>

I’ll look into that, thanks again!

---

<div class="post-metadata">

### Author: ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)
#### Post date: [July 21, 2022, 8:37pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/10 "2022-07-21T20:37:34Z")

</div>

Yes. That’s what I’m doing. 🙂

---

<div class="post-metadata">

### Author: ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)
#### Post date: [July 21, 2022, 8:40pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/11 "2022-07-21T20:40:02Z")

</div>

Just to be clear, I never install julia from AUR or using pacman. I always download the tarball from [julialang.org](http://julialang.org) and untar it and link it to my own ~/bin folder.

---

<div class="post-metadata">

### Author: ![charperflow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charperflow/32/22252_2.png) [@charperflow](https://discourse.julialang.org/u/charperflow)
#### Post date: [July 21, 2022, 9:21pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/13 "2022-07-21T21:21:31Z")

</div>

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!”

---

<div class="post-metadata">

### Author: ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)
#### Post date: [July 22, 2022, 6:30am UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/14 "2022-07-22T06:30:54Z")

</div>

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

---

<div class="post-metadata">

### Author: ![charperflow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charperflow/32/22252_2.png) [@charperflow](https://discourse.julialang.org/u/charperflow)
#### Post date: [July 22, 2022, 4:25pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/15 "2022-07-22T16:25:52Z")

</div>

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

---

<div class="post-metadata">

### Author: ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)
#### Post date: [July 22, 2022, 6:26pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/16 "2022-07-22T18:26:08Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)
#### Post date: [July 23, 2022, 4:06pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/17 "2022-07-23T16:06:01Z")

</div>

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](https://github.com/JuliaPackaging/Yggdrasil/blob/master/Q/Qt/build_tarballs.jl). It seems to me, that the BB Qt distribution only provides a minimal Qt environment.

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [July 24, 2022, 2:50pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/18 "2022-07-24T14:50:19Z")

</div>

@giordano Would you like to comment on building QT on Wayland support in BinaryBuilder?

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [July 24, 2022, 2:57pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/19 "2022-07-24T14:57:35Z")

</div>

If I knew anything about building Qt I could answer, but I don’t.

---

<div class="post-metadata">

### Author: ![charperflow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charperflow/32/22252_2.png) [@charperflow](https://discourse.julialang.org/u/charperflow)
#### Post date: [July 24, 2022, 4:47pm UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/20 "2022-07-24T16:47:42Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)
#### Post date: [July 25, 2022, 6:10am UTC](https://discourse.julialang.org/t/plots-issues-using-wayland-on-arch/84556/21 "2022-07-25T06:10:34Z")

</div>

I assume, the `--skip-wayland` option has to be removed [here](https://github.com/JuliaPackaging/Yggdrasil/blob/78598400b96cbd043879d835e51eae47cfff35c2/Q/Qt/build_tarballs.jl#L32). However, I do not know if this has side effects and could not test it.

@charperflow : May be you can make a merge request.
