# GLMakie fails test on FreeBSD 12, Julia 1.1.0

**URL:** <https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783>\
**Category:** Visualization\
**Created:** [May 30, 2019, 8:14pm UTC](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783 "2019-05-30T20:14:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ko56](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ko56/32/2684_2.png) [@ko56](https://discourse.julialang.org/u/ko56)\
**Post date:** [May 30, 2019, 8:14pm UTC](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783/1 "2019-05-30T20:14:27Z")

</div>

```julia
(v1.1) pkg> test GLMakie
   Testing GLMakie
 Resolving package versions...
    Status `/tmp/tmp8KVQL5/Manifest.toml`
  [621f4979] AbstractFFTs v0.4.1
  [537997a7] AbstractPlotting v0.9.7
  ...
  [cf7118a7] UUIDs [`@stdlib/UUIDs`]
  [4ec0a83e] Unicode [`@stdlib/Unicode`]
[ Info: starting from index 1
running tutorial_simple_scatter
ERROR: LoadError: MethodError: no method matching backend_show(::Missing, ::IOContext{IOStream}, ::MIME{Symbol("image/jpeg")}, ::Scene)
Closest candidates are:
  backend_show(::Any, ::IO, ::MIME{Symbol("text/plain")}, ::Scene) at /usr/home/ko/.julia/packages/AbstractPlotting/UgfGB/src/display.jl:67
  backend_show(::Any, ::IO, ::MIME{Symbol("text/plain")}, ::Combined) at /usr/home/ko/.julia/packages/AbstractPlotting/UgfGB/src/display.jl:84
Stacktrace:

```

Can someone explain what is happening here? Thanks.

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [May 30, 2019, 8:16pm UTC](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783/2 "2019-05-30T20:16:27Z")

</div>

Did you have an build errors for `]build GLMakie`?

---

<div class="post-metadata">

**Author:** ![ko56](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ko56/32/2684_2.png) [@ko56](https://discourse.julialang.org/u/ko56)\
**Post date:** [May 30, 2019, 8:36pm UTC](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783/3 "2019-05-30T20:36:34Z")

</div>

The build shows some problems with ImageMagick, and with GLFW.

The ImageMagick problem is, in my opinion, somewhat bogus. I use the  
FreeBSD system package for ImageMagick, with a deps.jl file that I created by hand. That’s because Julia’s build process for ImageMagick fails due to reasons I haven’t totally tracked down.

```julia
(v1.1) pkg> test ImageMagick
   Testing ImageMagick
 Resolving package versions...
 Status `/tmp/tmp64yzd7/Manifest.toml`
...
  [4ec0a83e] Unicode [`@stdlib/Unicode`]
┌ Error: Exception while generating log record in module Main at /usr/home/ko/.julia/packages/ImageMagick/J74FC/test/runtests.jl:13
│ exception =
│ UndefVarError: libversion not defined
│ Stacktrace:
│ [1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13
│ [2] top-level scope at logging.jl:319
│ [3] include at ./boot.jl:326 [inlined]
│ [4] include_relative(::Module, ::String) at ./loading.jl:1038
│ [5] include(::Module, ::String) at ./sysimg.jl:29
│ [6] include(::String) at ./client.jl:403
│ [7] top-level scope at none:0
│ [8] eval(::Module, ::Any) at ./boot.jl:328
│ [9] exec_options(::Base.JLOptions) at ./client.jl:243
│ [10] _start() at ./client.jl:436
└ @ Main ~/.julia/packages/ImageMagick/J74FC/test/runtests.jl:13
┌ Warning: Mapping to the storage type failed; perhaps your data had out-of-range values?
│ Try `map(clamp01nan, img)` to clamp values to a valid range.

```

I don’t know what’s going on here. Perhaps my deps.jl file?

The GLFW problem is

```julia
  Building GLFW ────────────→ `~/.julia/packages/GLFW/69NQ7/deps/build.log`
  Building GLMakie ─────────→ `~/.julia/packages/GLMakie/nDrlO/deps/build.log`
┌ Error: Error building `GLMakie`: 
│ libGL error: unable to load driver: r600_dri.so
│ libGL error: driver pointer missing
│ libGL error: failed to load driver: r600
│ libGL error: unable to load driver: swrast_dri.so
│ 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,

```

Again, for GLFW I use the FreeBSD package. Here is what happens with testing that individually:

```julia
(v1.1) pkg> test GLFW
   Testing GLFW
    Status `/tmp/tmpkFZTW4/Manifest.toml`
...
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
   Testing GLFW tests passed 

```

So this seems ok to me.

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [May 30, 2019, 8:44pm UTC](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783/4 "2019-05-30T20:44:41Z")

</div>

> [@ko56](#):
>
> libGL error: unable to load driver: r600\_dri.so libGL error: driver pointer missing libGL error: failed to load driver: r600 libGL error: unable to load driver: swrast\_dri.so libGL error: failed to load driver: swrast

That does look anything but ok 😃 The only reason this passes tests is, that GLFW has really bad tests, since its hard to test OpenGL^^  
So, looks like you need to figure out why your video drivers aren’t installed correctly!

---

<div class="post-metadata">

**Author:** ![ko56](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ko56/32/2684_2.png) [@ko56](https://discourse.julialang.org/u/ko56)\
**Post date:** [May 30, 2019, 8:55pm UTC](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783/5 "2019-05-30T20:55:38Z")

</div>

Well, here I’m out of my depth. The FreeBSD package for glfw includes some demos, all appear to work fine. To begin with,

```julia
/usr/local/share/examples/glfw/tests/glfwinfo
GLFW header version: 3.2.1
GLFW library version: 3.2.1
GLFW library version string: "3.2.1 X11 GLX EGL clock_gettime Xf86vm shared"
OpenGL context version string: "3.1 Mesa 18.3.2"
OpenGL context version parsed by GLFW: 3.1.0
OpenGL context flags (0x00000000):
OpenGL context flags parsed by GLFW:
OpenGL robustness strategy (0x00008261): none
OpenGL robustness strategy parsed by GLFW: none
OpenGL context renderer string: "AMD CEDAR (DRM 2.50.0 / 12.0-RELEASE-p4, LLVM 6.0.1)"
OpenGL context vendor string: "X.Org"
OpenGL context shading language version: "1.40"
OpenGL framebuffer:
 red: 8 green: 8 blue: 8 alpha: 8 depth: 24 stencil: 8
 samples: 0 sample buffers: 0
 accum red: 0 accum green: 0 accum blue: 0 accum alpha: 0 aux buffers: 0
Vulkan loader: missing

```

Then the standard demos ‘gears’ and ‘wave’ work fine.

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [May 30, 2019, 9:00pm UTC](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783/6 "2019-05-30T21:00:16Z")

</div>

They likely use software mode, which is fine for simple OpenGL, but not for Makie.  
You need to install the correct AMD drivers, instead of using the Mesa drivers.

---

<div class="post-metadata">

**Author:** ![ko56](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ko56/32/2684_2.png) [@ko56](https://discourse.julialang.org/u/ko56)\
**Post date:** [May 30, 2019, 9:06pm UTC](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783/7 "2019-05-30T21:06:15Z")

</div>

So Makie wants one of these two?

```julia
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so

```

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [May 30, 2019, 9:07pm UTC](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783/8 "2019-05-30T21:07:01Z")

</div>

Makie wants real, gpu accelerated OpenGL - which you only get when you install the gpu drivers correctly.

---

<div class="post-metadata">

**Author:** ![ko56](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ko56/32/2684_2.png) [@ko56](https://discourse.julialang.org/u/ko56)\
**Post date:** [May 31, 2019, 2:59pm UTC](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783/9 "2019-05-31T14:59:53Z")

</div>

After some digging around, my system has /usr/local/lib/dri/r600\_dri.so.  
It is part of the package ‘mesa-dri’:

```julia
pkg info mesa-dri
mesa-dri-18.3.2_2
Name : mesa-dri
Version : 18.3.2_2
Installed on : Thu Apr 18 11:05:49 2019 EDT
Origin : graphics/mesa-dri
Architecture : FreeBSD:12:amd64
Prefix : /usr/local
Categories : graphics
Licenses : 
Maintainer : x11@FreeBSD.org
WWW : http://www.mesa3d.org/
Comment : OpenGL hardware acceleration drivers for DRI2+
Options :
	VAAPI : off
	VDPAU : off
	WAYLAND : on
Shared Libs required:
	libX11.so.6
	libxshmfence.so.1
	libexpat.so.1
	libLLVM-6.0.so
	libxcb-xfixes.so.0
	libwayland-client.so.0
	libXv.so.1
	libdrm_intel.so.1
	libxcb-present.so.0
	libunwind.so.8
	libX11-xcb.so.1
	libdrm_amdgpu.so.1
	libdrm.so.2
	libxcb-sync.so.1
	libxcb-dri3.so.0
	libxcb-randr.so.0
	libxcb.so.1
	libglapi.so.0
	libxcb-dri2.so.0
	libXvMC.so.1
	libdrm_radeon.so.1
Shared Libs provided:
	libvulkan_radeon.so
	libXvMCgallium.so.1
	libvulkan_intel.so
Annotations :
	FreeBSD_version: 1200086
	repo_type : binary
	repository : FreeBSD
Flat size : 29.1MiB
Description :
This package contains the current stable release of the client drivers for DRI2+

With a X Server configured for DRI, they allow direct rendering of hardware-
accelerated OpenGL. This package also includes the software renderer, either
llvmpipe or classic SWrast.

WWW: http://www.mesa3d.org/

```

Can you give some hint as to how to proceed?

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [May 31, 2019, 9:59pm UTC](https://discourse.julialang.org/t/glmakie-fails-test-on-freebsd-12-julia-1-1-0/24783/10 "2019-05-31T21:59:11Z")

</div>

yeah mesa is the default… you need to install the official amd drivers!
