Hi. I’m having endless problems getting Makie to precompile successfully on GitHub in a package whose code I have inherited, but which compiles fine on my own machine. In particular, GitHub gives me these warnings from followed by the error at the end:
WARNING: Makie.MakieLayout is deprecatedThe module `MakieLayout` has been removed and integrated into Makie, so simply replace all usage of `MakieLayout` with `Makie`.
likely near none:1
WARNING: importing deprecated binding Makie.MakieLayout into GLMakie.
WARNING: Makie._alternative_fonts is deprecated, use ALTERNATIVE_FONTS instead.
likely near none:1
WARNING: importing deprecated binding Makie._alternative_fonts into GLMakie.
... bla-bla-bla ...
WARNING: Makie.minimal_default is deprecated, use MAKIE_DEFAULT_THEME instead.
likely near none:1
WARNING: importing deprecated binding Makie.minimal_default into GLMakie.
┌ Warning: OpenGL/GLFW wasn't loaded correctly or couldn't be initialized.
│ This likely means, you're on a headless server without having OpenGL support setup correctly.
│ Have a look at the troubleshooting section in the readme:
│ https://github.com/MakieOrg/Makie.jl/tree/master/GLMakie#troubleshooting-opengl.
└ @ GLMakie ~/.julia/packages/GLMakie/OVxAi/src/gl_backend.jl:4
ERROR: LoadError: InitError: Exception[GLFW.GLFWError(GLFW.PLATFORM_ERROR, "X11: The DISPLAY environment variable is missing"), ErrorException("glfwInit failed")]
I gather the final error means I should define an environment variable “:DISPLAY=0”, but surely I don’t have that access to the compile environment on GitHub. Can anyone please help? Thanks!
Thanks very much, but I’m not sure that can be the issue. I use GLMakie because I need to create animations, and I do that successfully in other packages without getting these errors during GitHub precompilation. Am I right in assuming that I need GLMakie rather than Cairo if I want to animate?
As far as WGLMakie is concerned, it seems that is for web-based applications, which is again not what I’m doing.
OK, I’ll have to be careful here, since it seems there is so much I don’t understand that I might easily say something stupid. I do indeed need an interactive panel - I’m using InteractiveDynamics with the Agents package - so I assume that I need GLMakie.
I don’t have much experience of creating projects on GitHub, so I can well imagine that I’m missing something basic, but each time I commit a change to another package of mine, GitHub runs three tests: julia 1.0, julia 1.9 and julia nightly. This other package also uses GLMakie with InteractiveDynamics and Agents, and I’m used to the julia 1.0 test failing, but the others pass ok. Now, with this new package (which as I say, I’ve inherited, so I’m unsure of all the code), I’m getting all three tests failing, but I can’t work out why.
I’m sorry it’s all a bit vague, but I’m rather unsure of myself, and the code is too big to condense it into a conveniently small demonstration example.
I’m having the same issue as I’m new with packages and get the same errors. The issue is that when Github tries to run the tests created by PkgTemplates which include precompiling GLMakie, it throws an error because it can’t initialize GLMakie. This is the same error @Niall is showing.
So the question is: how does one let GitHub run tests for a package under development that uses GLMakie but doesn’t actually test the parts that use it?
This is quite helpful. I need to learn how to use CI so I can set this up for my package. This helps letting me know what I need to learn and why. It’s a much better answer than just fixing my problem. Thanks!
Many thanks, @jules - I agree with @mattderstine that this is a really helpful answer. I’m just not quite as far has he seems to be, because I’m unsure how to incorporate the lines into my code. Do I simply copy the glmakie.yaml file across to my workflows folder, or do incorporate the relevant lines into my CompatHelper.yml file? Or something else?
@Niall, Here is my CI.yml file. The key lines for us are the last 2. If you add these you should be good to go. I also learned from the GLMakie file to narrow the different Julia version numbers that run each time.