MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.41k stars 310 forks source link

Feature request: support using WGL backend without requring GLMakie to successfully build #708

Closed chriselrod closed 4 years ago

chriselrod commented 4 years ago

If I understand correctly, Makie does not support using AMD graphics cards on Linux, as the AMD drivers need to load a different LLVM from the one Julia is linked with, causing conflicts. Once upon a time I could work around this by statically linking Julia's LLVM, but I can no longer successfully build Julia with a statically linked LLVM.

Unfortunately, this means I cannot use any of Makie's other backends either:

julia> using WGLMakie

julia> WGLMakie.activate!()
false

(@v1.5) pkg> build GLMakie # cannot build GLMakie
   Building ModernGL → `~/.julia/packages/ModernGL/rVuW2/deps/build.log`
   Building FFTW ────→ `~/.julia/packages/FFTW/DMUbN/deps/build.log`
   Building GLMakie ─→ `~/.julia/packages/GLMakie/4EXKe/deps/build.log`
┌ Error: Error building `GLMakie`:
│
│ signal (11): Segmentation fault
│ in expression starting at /home/chriselrod/.julia/packages/GLMakie/4EXKe/deps/build.jl:31
└ @ Pkg.Operations ~/Documents/languages/julia/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:949

julia> using Makie # which means I cannot using Makie
[ Info: Precompiling Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a]
ERROR: LoadError: The file /home/chriselrod/.julia/packages/GLMakie/4EXKe/src/../deps/deps.jl does not exist.
This file is generated during the build process; it is possible that GLMakie
wasn't built correctly.  To rerun the build process, run `Pkg.build("GLMakie"),
or enter the Pkg REPL mode (`]`) and then type `build GLMakie`.

Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] top-level scope at /home/chriselrod/.julia/packages/GLMakie/4EXKe/src/GLMakie.jl:48

Of course, I'd also be happy if GLMakie were supported.

ffreyer commented 4 years ago

I may be wrong about this but can't you use AbstractPlotting instead of Makie to skip GLMakie?

Moelf commented 4 years ago

@ffreyer Makie has:

Makie is the metapackage for a rich ecosystem, which consists of GLMakie.jl, CairoMakie.jl and WGLMakie.jl (the backends); AbstractPlotting.jl (the bulk of the package); and StatsMakie.jl (statistical plotting support, as in StatsPlots.jl).

I feel like using AbstractPlotting makes some part of the eco system missing?

ffreyer commented 4 years ago
module Makie

using AbstractPlotting, GLMakie
import FileIO
using GLMakie
using GLMakie: assetpath, loadasset

for name in names(AbstractPlotting)
    @eval import AbstractPlotting: $(name)
    @eval export $(name)
end

function logo()
    FileIO.load(joinpath(@__DIR__, "..", "assets", "logo.png"))
end

end

This is all that Makie is atm. You get everything by loading AbstractPlotting + a backend. You will lose out on some things depending on which backend you load, but that's it.

chriselrod commented 4 years ago

I'll file an issue with Polyhedra.jl then for requiring Makie instead of AbstractPlotting.

SimonDanisch commented 4 years ago

Sounds like a plan!