Building VTK using an Anaconda environment

I am trying to package our application into an Anaconda package. Our application uses Vtk 9.2.6 and due to some conflicts between VTK, ITK, Qt6, and JepgTurbo we need to build VTK as part of the packaging process. We are able to successfully build on Windows and MacOS (x64 and ARM64). The issue I am having on my Ubuntu 22.04 system is the following configure error.

-- Could NOT find OpenGL (missing: OPENGL_glx_LIBRARY) 
CMake Error at CMake/vtkModule.cmake:4578 (message):
  Could not find the OpenGL external dependency.
Call Stack (most recent call first):
  CMake/vtkModule.cmake:5172 (vtk_module_find_package)
  Utilities/OpenGL/CMakeLists.txt:58 (vtk_module_third_party_external)

I am running on a Intel 13Gen with integrated graphics (Core i5-1350P I think). When I look at the “Settings” in Ubuntu it says my Graphics are “llvmpipe (LLVM 12.0.0, 256 bits)”. I have tried installing the various “opengl-dev” libraries from Mesa but have no luck. Note that I can build VTK without any issues out side of the conda-build environment.

Has anyone seen anything like this or have any suggestions?

Thanks
Mike Jackson

Does Anaconda provide a libGLX.so (or similar)?

Tried add ’ - mesa-libgl-devel-cos7-x86_64 # [linux]’ to the meta.yaml file but that didn’t work.

I also tried: sudo apt install libgl1-mesa-glx

That didn’t help either.

I’ve tried hard coding the libopenGL_OpenGL_Library (or what ever that CMake variable is) and that didn’t work.

Since the warning is for the GLX library, libglvnd-glx-cos7-x86_64 might be what you need. Or at least, on my own Ubuntu 22.04 system the glx link-library is provided by glvnd (though I don’t use anaconda).

Also, my system has three separate Ubuntu dev packages installed for GL, one for each library:

libglx-dev - Vendor neutral GL dispatch library -- GLX development files
libgl-dev - Vendor neutral GL dispatch library -- GL development files
libglu1-mesa-dev - Mesa OpenGL utility library -- development files