Closed marimeireles closed 2 years ago
Closes #16
I wanted to give you a bit more information on opengl, which is something that prevented me from making headless builds for now:
In order to avoid depending on Qt, OpenGL context is provided by the GLFW library (which is multiplatform, which should help in using the kernel in multiple OSs).
However normally Octave does not really work without a display server (e.g. X) for opengl rendering. In the "normal" version thus I link against the OpenGL::GL
target which should be provided by the display server if I'm not mistaken.
I also added the possibility to link against osmesa which is software based opengl. Much slower but functional for a headless setup. (This is what you should be using for binder at least)
Probably you should be providing two conda recipes, one for normal and one for headless systems, unless we can dynamically load the correct OpenGL library, but that's much more complicated and I think we need to stabilize the two backends on their own before that.
Last thing, osmesa support is buggy from what I remember, I did not test it very much, having a non headless system. I'll try it again in the next days.
I hope I gave you a better picture, please ask if you need more info!
A little update on this:
I have checked osmesa support and now I remembered that it must be GLFW to support it, and usually there are many variants of GLFW that can be built and installed separately, supporting various backends (X11, Wayland, osmesa etc).
So the trick should be installing the glfw-osmesa variant and everithing should be working. I'm planning to add static compilation for GLFW as well, so that we can build whatever flavour we need (see #37)
Again little update:
I have tested and fixed the osmesa backend, and added the possibility to statically link the glfw library (see the README section about building for headless systems). Now you should be able to build xeus-octave for with the single osmesa library as a opengl related dependency.
Yeah, I think we might have to use something like this since creating the conda build is being way more difficult than I expected. It worked locally for me but the CI's OSs didn't like all this GL mish mash. Thanks for investing the time on this :) I'll get back to it on Monday!
Done in #56
This PR needs the conda-recipe to pass.
It happens to be one of those that requires a bit of extra work because of the OpenGL requirements, but I'm working on it. Hope to have it ready by today. https://github.com/conda-forge/staged-recipes/pull/15220