Can't Complie Makie

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

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

Try: using GLMakie

It is not working…

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

Here my used packages to Makie

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

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

I added via:

(@v1.5) pkg> GLMakie#master

current version: v0.1.27

Okay then lemme try by removing and reinstalling it

I added MakieLayout and i am getting this error

 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

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

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

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

I looked on github but i couldn’t find… :pensive:

This maybe OpenGL/GLFW error building GLMakie Β· Issue #712 Β· JuliaPlots/Makie.jl Β· GitHub

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

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:

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

2 Likes

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

Maybe this helps then Backends & Output Β· Makie Plotting Ecosystem

From your error message:

Did you try to install libglfw3 manually?