# Can't Complie Makie

**URL:** https://discourse.julialang.org/t/cant-complie-makie/55607
**Category:** General Usage
**Created:** [February 19, 2021, 7:31am UTC](https://discourse.julialang.org/t/cant-complie-makie/55607 "2021-02-19T07:31:29Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Nitish\_Dubey](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nitish_dubey/32/9092_2.png) [@Nitish\_Dubey](https://discourse.julialang.org/u/Nitish_Dubey)
#### Post date: [February 19, 2021, 7:31am UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/1 "2021-02-19T07:31:29Z")

</div>

I am trying to use Makie but can’t build it here is the error message

```julia
using Makie
[Info: Precompiling Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a]
ERROR: LoadError: UndefVarError: to_gl_text not defined
Stacktrace:
 [1] _precompile_() at /home/fuzzyflaptrash/.julia/packages/GLMakie/V1pC5/src/precompile.jl:9
 [2] top-level scope at /home/fuzzyflaptrash/.julia/packages/GLMakie/V1pC5/src/GLMakie.jl:82
 [3] include(::Function, ::Module, ::String) at ./Base.jl:380
 [4] include(::Module, ::String) at ./Base.jl:368
 [5] top-level scope at none:2
 [6] eval at ./boot.jl:331 [inlined]
 [7] eval(::Expr) at ./client.jl:467
 [8] top-level scope at ./none:3
in expression starting at /home/fuzzyflaptrash/.julia/packages/GLMakie/V1pC5/src/GLMakie.jl:80
ERROR: LoadError: Failed to precompile GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a] to /home/fuzzyflaptrash/.julia/compiled/v1.5/GLMakie/nfnZR_A8ocQ.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] include(::Function, ::Module, ::String) at ./Base.jl:380
 [7] include(::Module, ::String) at ./Base.jl:368
 [8] top-level scope at none:2
 [9] eval at ./boot.jl:331 [inlined]
 [10] eval(::Expr) at ./client.jl:467
 [11] top-level scope at ./none:3
in expression starting at /home/fuzzyflaptrash/.julia/packages/Makie/iTycG/src/Makie.jl:3
ERROR: Failed to precompile Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a] to /home/fuzzyflaptrash/.julia/compiled/v1.5/Makie/iZ1Bl_A8ocQ.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923

```

---

<div class="post-metadata">

### Author: ![Carsten](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Carsten](https://discourse.julialang.org/u/Carsten)
#### Post date: [February 19, 2021, 10:16am UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/2 "2021-02-19T10:16:22Z")

</div>

Try: using GLMakie

---

<div class="post-metadata">

### Author: ![Nitish\_Dubey](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nitish_dubey/32/9092_2.png) [@Nitish\_Dubey](https://discourse.julialang.org/u/Nitish_Dubey)
#### Post date: [February 19, 2021, 10:23am UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/3 "2021-02-19T10:23:41Z")

</div>

It is not working…

```julia
using GLMakie
[Info: Precompiling GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a]
ERROR: LoadError: UndefVarError: to_gl_text not defined
Stacktrace:
 [1] _precompile_() at /home/fuzzyflaptrash/.julia/packages/GLMakie/V1pC5/src/precompile.jl:9
 [2] top-level scope at /home/fuzzyflaptrash/.julia/packages/GLMakie/V1pC5/src/GLMakie.jl:82
 [3] include(::Function, ::Module, ::String) at ./Base.jl:380
 [4] include(::Module, ::String) at ./Base.jl:368
 [5] top-level scope at none:2
 [6] eval at ./boot.jl:331 [inlined]
 [7] eval(::Expr) at ./client.jl:467
 [8] top-level scope at ./none:3
in expression starting at /home/fuzzyflaptrash/.julia/packages/GLMakie/V1pC5/src/GLMakie.jl:80
ERROR: Failed to precompile GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a] to /home/fuzzyflaptrash/.julia/compiled/v1.5/GLMakie/nfnZR_A8ocQ.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091
 [7] repleval(::Module, ::String, ::String) at /home/fuzzyflaptrash/.vscode/extensions/julialang.language-julia-1.1.25/scripts/packages/VSCodeServer/src/repl.jl:104
 [8] (::VSCodeServer.var"#43#45"{Module,String,REPL.LineEditREPL,REPL.LineEdit.Prompt})() at /home/fuzzyflaptrash/.vscode/extensions/julialang.language-julia-1.1.25/scripts/packages/VSCodeServer/src/repl.jl:83
 [9] with_logstate(::Function, ::Any) at ./logging.jl:408
 [10] with_logger at ./logging.jl:514 [inlined]
 [11] (::VSCodeServer.var"#42#44"{Module,String,REPL.LineEditREPL,REPL.LineEdit.Prompt})() at /home/fuzzyflaptrash/.vscode/extensions/julialang.language-julia-1.1.25/scripts/packages/VSCodeServer/src/repl.jl:84
 [12] #invokelatest#1 at ./essentials.jl:710 [inlined]
 [13] invokelatest(::Any) at ./essentials.jl:709
 [14] macro expansion at /home/fuzzyflaptrash/.vscode/extensions/julialang.language-julia-1.1.25/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
 [15] (::VSCodeServer.var"#56#57")() at ./task.jl:356

```

---

<div class="post-metadata">

### Author: ![Carsten](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Carsten](https://discourse.julialang.org/u/Carsten)
#### Post date: [February 19, 2021, 10:29am UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/4 "2021-02-19T10:29:58Z")

</div>

Here my used packages to Makie

```julia
using GLMakie # add GLMakie#master
using CairoMakie
using AbstractPlotting
using MakieLayout

CairoMakie.activate!()
AbstractPlotting.inline!(true)

```

I added via:

```julia
(@v1.5) pkg> GLMakie#master

```

current version: v0.1.27

---

<div class="post-metadata">

### Author: ![Nitish\_Dubey](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nitish_dubey/32/9092_2.png) [@Nitish\_Dubey](https://discourse.julialang.org/u/Nitish_Dubey)
#### Post date: [February 19, 2021, 10:31am UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/5 "2021-02-19T10:31:23Z")

</div>

Okay then lemme try by removing and reinstalling it

---

<div class="post-metadata">

### Author: ![Nitish\_Dubey](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nitish_dubey/32/9092_2.png) [@Nitish\_Dubey](https://discourse.julialang.org/u/Nitish_Dubey)
#### Post date: [February 19, 2021, 10:37am UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/6 "2021-02-19T10:37:53Z")

</div>

I added MakieLayout and i am getting this error

```julia
 Building GLMakie → `~/.julia/packages/GLMakie/wpJsD/deps/build.log`
┌ Error: Error building `GLMakie`: 
│ libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
│ libGL error: failed to load driver: iris
│ libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
│ libGL error: failed to load driver: iris
│ libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
│ libGL error: failed to load driver: swrast
│ init error of GLFW
│ ERROR: LoadError: OpenGL/GLFW wasn't installed correctly. This likely means,
│ you don't have an OpenGL capable Graphic Card,
│ you don't have the newest video driver installed,
│ or the GLFW build failed. If you're on linux and `]build` GLFW failed,
│ try manually adding `sudo apt-get install libglfw3` and then `]build GLMakie`.
│ If you're on a headless server, you still need to install x-server and
│ proper GPU drivers. You can take inspiration from this article
│ on how to get Makie running on a headless system:
│ https://nextjournal.com/sdanisch/makie-1.0
│ If you don't have a GPU, there is also a Cairo software backend
│ for Makie which you can use:
│ https://github.com/JuliaPlots/CairoMakie.jl.
│ Please check the below error and open an issue at:
│ https://github.com/JuliaPlots/GLMakie.jl.
│ After you fixed your OpenGL install, please run `]build GLMakie` again!
│ GLMakie will still load, but will be disabled as a default backend for Makie
│ 
│ Stacktrace:
│ [1] error(::String) at ./error.jl:33
│ [2] top-level scope at /home/fuzzyflaptrash/.julia/packages/GLMakie/wpJsD/deps/build.jl:63
│ [3] include(::String) at ./client.jl:457
│ [4] top-level scope at none:5
│ in expression starting at /home/fuzzyflaptrash/.julia/packages/GLMakie/wpJsD/deps/build.jl:31
│ caused by [exception 1]
│ GLFWError (VERSION_UNAVAILABLE): GLX: Failed to create context: GLXBadFBConfig
│ Stacktrace:
│ [1] _ErrorCallbackWrapper(::Int32, ::Cstring) at /home/fuzzyflaptrash/.julia/packages/GLFW/CBo9c/src/callback.jl:43
│ [2] CreateWindow(::Int64, ::Int64, ::String, ::GLFW.Monitor, ::GLFW.Window) at /home/fuzzyflaptrash/.julia/packages/GLFW/CBo9c/src/glfw3.jl:499
│ [3] GLFW.Window(; name::String, resolution::Tuple{Int64,Int64}, debugging::Bool, major::Int64, minor::Int64, windowhints::Array{Tuple{UInt32,Int64},1}, contexthints::Array{Tuple{UInt32,Integer},1}, visible::Bool, focus::Bool, fullscreen::Bool, monitor::Nothing, share::GLFW.Window) at /home/fuzzyflaptrash/.julia/packages/GLFW/CBo9c/src/glfw3.jl:344
│ [4] top-level scope at /home/fuzzyflaptrash/.julia/packages/GLMakie/wpJsD/deps/build.jl:34
│ [5] include(::String) at ./client.jl:457
│ [6] top-level scope at none:5
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:949

```

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [February 19, 2021, 10:38am UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/7 "2021-02-19T10:38:10Z")

</div>

Don’t install MakieLayout as a package anymore, it lives inside AbstractPlotting now. You only need one or more out of GLMakie, CairoMakie or WGLMakie

---

<div class="post-metadata">

### Author: ![Nitish\_Dubey](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nitish_dubey/32/9092_2.png) [@Nitish\_Dubey](https://discourse.julialang.org/u/Nitish_Dubey)
#### Post date: [February 19, 2021, 10:39am UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/8 "2021-02-19T10:39:28Z")

</div>

Okay then should i install other two? cause GLmakie is not working

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [February 19, 2021, 10:39am UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/9 "2021-02-19T10:39:39Z")

</div>

The glfw error looks like something other people have had before. Maybe look around github issues a bit, I’m not sure if people found solutions for your particular problem. It’s not a GLMakie issue per se but about OpenGL not working properly

---

<div class="post-metadata">

### Author: ![Nitish\_Dubey](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nitish_dubey/32/9092_2.png) [@Nitish\_Dubey](https://discourse.julialang.org/u/Nitish_Dubey)
#### Post date: [February 19, 2021, 10:40am UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/10 "2021-02-19T10:40:46Z")

</div>

I looked on github but i couldn’t find… 😔

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [February 19, 2021, 11:07am UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/11 "2021-02-19T11:07:33Z")

</div>

This maybe [OpenGL/GLFW error building GLMakie · Issue #712 · JuliaPlots/Makie.jl · GitHub](https://github.com/JuliaPlots/Makie.jl/issues/712)

---

<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: [February 19, 2021, 1:13pm UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/12 "2021-02-19T13:13:46Z")

</div>

On a computer with Ubuntu 20.04 and Intel integrated graphics the following steps were needed to make OpenGL work:

```julia
sudo apt install libglfw3
cd ~/packages/julias/julia-1.5.3/lib/julia/
rm libstdc++.so.6 

```

After implementing this fix rebuild GLMakie with the following command from within Julia:

```julia
cd ~/repos/KiteViewer
julia --project
] 
build GLMakie

```

Removing the version of libstdc++.so.6 supplied with Julia is only needed for Julia versions older than 1.6.0 due to this bug: [Julia loading Julia's libstdc++ instead of system, causes inscrutable errors · Issue #198 · JuliaGL/GLFW.jl · GitHub](https://github.com/JuliaGL/GLFW.jl/issues/198)

---

<div class="post-metadata">

### Author: ![Nitish\_Dubey](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nitish_dubey/32/9092_2.png) [@Nitish\_Dubey](https://discourse.julialang.org/u/Nitish_Dubey)
#### Post date: [February 19, 2021, 1:31pm UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/13 "2021-02-19T13:31:01Z")

</div>

Hi,  
thanks for the reply, but my computer has two GPUs and I would like to utilize another one instead of this card. it is nvidia 1650 btw

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [February 19, 2021, 1:47pm UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/14 "2021-02-19T13:47:19Z")

</div>

Maybe this helps then [http://makie.juliaplots.org/stable/backends\_and\_output.html#Forcing-Dedicated-GPU-Use-In-Linux](http://makie.juliaplots.org/stable/backends_and_output.html#Forcing-Dedicated-GPU-Use-In-Linux)

---

<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: [February 19, 2021, 4:24pm UTC](https://discourse.julialang.org/t/cant-complie-makie/55607/15 "2021-02-19T16:24:16Z")

</div>

From your error message:

> [@Nitish\_Dubey](#):
>
> ```julia
> │ ERROR: LoadError: OpenGL/GLFW wasn't installed correctly. This likely means,
> │ you don't have an OpenGL capable Graphic Card,
> │ you don't have the newest video driver installed,
> │ or the GLFW build failed. If you're on linux and `]build` GLFW failed,
> │ try manually adding `sudo apt-get install libglfw3` and then `]build GLMakie`.
> 
> ```

Did you try to install libglfw3 manually?
