# GLMakie and Plots fail to precompile under Julia 1.8.4

**URL:** https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087
**Category:** General Usage
**Tags:** precompilation, update, plots, glmakie
**Created:** [December 24, 2022, 2:09pm UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087 "2022-12-24T14:09:27Z")
**Posts on this page:** 17
**Page:** 3

<div class="post-metadata">

### Author: ![rud-lucien](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rud-lucien/32/38576_2.png) [@rud-lucien](https://discourse.julialang.org/u/rud-lucien)
#### Post date: [January 3, 2023, 5:54pm UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/41 "2023-01-03T17:54:30Z")

</div>

Thanks! I came to that same conclusion, shortly after posting that message.

---

<div class="post-metadata">

### Author: ![hhaensel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hhaensel/32/1207_2.png) [@hhaensel](https://discourse.julialang.org/u/hhaensel)
#### Post date: [January 4, 2023, 10:11pm UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/42 "2023-01-04T22:11:48Z")

</div>

To all those who don’t like to change the path environment variable I propose the following workaround which worked for me:

```julia
origpath = ENV["PATH"]

let sep = Sys.iswindows() ? ';' : ':'
    if ! occursin(Regex("\\Q$(Sys.BINDIR)\\E($sep|\$)", Sys.iswindows() ? "i" : ""), ENV["PATH"])
        ENV["PATH"] = rstrip(ENV["PATH"], sep) * sep * Sys.BINDIR
    end
end

using Cairo_jll

origpath = ENV["PATH"]

```

You may even discard the origpath lines and keep the path appended, in case that other libs have similar problems.

---

<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: [January 4, 2023, 11:01pm UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/43 "2023-01-04T23:01:04Z")

</div>

These kind of issues are giving new resolve to push for [Add LOAD\_LIBRARY\_SEARCH\_USER\_DIRS for DLL loading by mkitti · Pull Request #47775 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/47775) .

cc: @jameson

---

<div class="post-metadata">

### Author: ![jameson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jameson/32/23_2.png) [@jameson](https://discourse.julialang.org/u/jameson)
#### Post date: [January 6, 2023, 2:46am UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/44 "2023-01-06T02:46:15Z")

</div>

The real fix ([GLMakie and Plots fail to precompile under Julia 1.8.4 - #31 by giordano](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/31) above) looks nothing like that PR however

---

<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: [January 6, 2023, 3:48am UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/45 "2023-01-06T03:48:54Z")

</div>

Sure, but we would have more options for a workaround on Windows than modifying the PATH environment variable, which has likely side effects.

---

<div class="post-metadata">

### Author: ![Peter-Jolly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/peter-jolly/32/19371_2.png) [@Peter-Jolly](https://discourse.julialang.org/u/Peter-Jolly)
#### Post date: [January 6, 2023, 5:55am UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/46 "2023-01-06T05:55:28Z")

</div>

same for me - needed to tick add PATH during installation. Also, needed to delete couple of .julia directories (as indicated by another user). Hopefully 1.8.5 will address the issue as it is a frustration for users trying to come to terms with the language.

---

<div class="post-metadata">

### Author: ![SantiagoOrtiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/santiagoortiz/32/25378_2.png) [@SantiagoOrtiz](https://discourse.julialang.org/u/SantiagoOrtiz)
#### Post date: [January 9, 2023, 12:07am UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/47 "2023-01-09T00:07:59Z")

</div>

I did the following:

- Added 1.8.4 to PATH manually
- Ran the terminal as admin

This removed the error related to “Cairo\_jll.”  
However, now I am getting a precompiling error that says:

`ERROR: LoadError: InitError: UndefVarError: GR_jll not defined`

Note that, I also get the same error when I try: ` using GR`

Any guesses?

Thank you,  
Santiago

---

<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: [January 9, 2023, 12:18am UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/48 "2023-01-09T00:18:59Z")

</div>

You might need to force recompilation again by removing the folder `.julia/compiled/v1.8/GR`.

That said the Julia 1.8.5 release is imminent. It’s been tagged on Github, so binaries should be available shortly.

---

<div class="post-metadata">

### Author: ![SantiagoOrtiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/santiagoortiz/32/25378_2.png) [@SantiagoOrtiz](https://discourse.julialang.org/u/SantiagoOrtiz)
#### Post date: [January 9, 2023, 12:29am UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/49 "2023-01-09T00:29:59Z")

</div>

Thank you. It works now 😉

---

<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: [January 9, 2023, 12:31am UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/50 "2023-01-09T00:31:00Z")

</div>

I’m glad that I could help in this instance. Welcome to Julia.

---

<div class="post-metadata">

### Author: ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)
#### Post date: [January 9, 2023, 1:59pm UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/51 "2023-01-09T13:59:53Z")

</div>

Still seeing the same problem. However, I’m on a WIN10 machine where I cannot run in admin mode. ☹

Fresh install:  
Julia Version 1.8.4  
[ee78f7c6] Makie v0.19.1

```julia
[Info: Precompiling Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a]
ERROR: LoadError: InitError: could not load library "C:\JuliaPackages\artifacts\3aff78028a0bb2ad40ebc3ae7e465a52dcbe2730\bin\libcairo-2.dll"

```

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [January 9, 2023, 2:32pm UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/52 "2023-01-09T14:32:56Z")

</div>

Just use Julia 1.8.3 or wait for 1.8.5 which might be available tomorrow.

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [January 9, 2023, 3:00pm UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/53 "2023-01-09T15:00:02Z")

</div>

> [@ufechner7](#):
>
> which might be available tomorrow.

Unfortunately, 1.8.5 has some similar issues but now for linux: [julia 1.8.5 - could not load library "libssp.so.0" (`linux`) · Issue #48177 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/48177)…

---

<div class="post-metadata">

### Author: ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)
#### Post date: [January 9, 2023, 3:25pm UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/54 "2023-01-09T15:25:16Z")

</div>

The issue arises only when building with `USE_SYSTEM_CSL := 1` which IIUC is **not** the case for official releases.

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [January 9, 2023, 3:34pm UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/55 "2023-01-09T15:34:47Z")

</div>

True, [deps: fix broken `p7zip` url by t-bltg · Pull Request #48176 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/48176) also means that we cannot build the source tarballs.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [January 9, 2023, 4:01pm UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/56 "2023-01-09T16:01:24Z")

</div>

> [@ufechner7](#):
>
> Just use Julia 1.8.3 or wait for 1.8.5 which might be available tomorrow.

Or go directly to 1.9beta2. I think the problem does not manifest there. At least not for me (I’m on Windows too), but I don’t have in 1.8.4 either so not such a good example.

---

<div class="post-metadata">

### Author: ![tt1234567](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tt1234567](https://discourse.julialang.org/u/tt1234567)
#### Post date: [January 10, 2023, 10:34am UTC](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087/57 "2023-01-10T10:34:34Z")

</div>

Many thanks to everyone who put so much work into fixing this in 1.8.5. I’ve recently spent some time getting dll’s to work with CxxWrap and they definitely have my sympathy.

[Previous page](https://discourse.julialang.org/t/glmakie-and-plots-fail-to-precompile-under-julia-1-8-4/92087.md?page=2)
