Compiled! Trying to run, and the install for libs is <prefix>/lib/Slicer-4.11/libXYZ.so. If I configure <prefix>/lib (I have other programs installed in that prefix) under /etc/ld.so.conf.d/myconf.conf, it doesn’t seem to pickup subdirectories. Do I have to add Slicer-4.11 as a folder in my ld config?
Does Slicer start at least ? Can you load a volume ? See the slices ? Do a quick volume rendering ? A segmentation ? Not that I’ll be able to help, just to know your actual results.
BUG: Fix linux package removing dependency to GLVND libraries
By setting OpenGL_GL_PREFERENCE to LEGACY, this commit ensures that
the applications and libraries are linked against libGL.so (legacy) instead
of libOpenGL.so and libGLX.so (GL Vendor Neutral Dispatch library). It allows
to run the application on system where only libGL is available.
It fixes a regression introduced in r27988 (COMP: Update CMake minimum required
version from 3.5 to 3.13) after which one CMP0072 was set to NEW and led to
have the GLVND libraries being used by default.
Detailed explanation about GLVND (thanks @chuckatkins):
libOpenGL.so and libGLX.so are actually just the stub GLVND interface
libraries with no implementation behind them. GLVND uses a config file
to locate and dlopen the implementation at runtime like a plugin
(/usr/lib64/libGLX_nvidia.so.418.39 for instance).
So it's not really suitable for redistribution unless an implementation
like a glvnd-enabled mesa and associated config files are also packaged.
For broad redistributability, it is preferable to use use the legacy libGL
for now so at runtime it will be available on most systems.
That will likely need to be the case for the next few years until
the non-glvnd implementations are much less common.
Co-authored-by: Chuck Atkins <chuck.atkins@kitware.com>
Removing any mention of libGL.so in VTK cmake. gl2ps (and related projects) have to be removed by editing their CMakeLists.txt or module.cmake. Currently VTK checks for if(ANDROID or IOS) which isn’t correct.
Remaining undefined references
/opt/dev/S4R/VTK-build/lib/libvtkOpenGL-8.2.so.1: undefined reference to `glGetTexImage'
/opt/dev/S4R/VTK-build/lib/libvtkOpenGL-8.2.so.1: undefined reference to `glTexImage1D'
/opt/dev/S4R/VTK-build/lib/libvtkOpenGL-8.2.so.1: undefined reference to `glGetDoublev'
/opt/dev/S4R/VTK-build/lib/libvtkOpenGL-8.2.so.1: undefined reference to `glClearDepth'
/opt/dev/S4R/VTK-build/lib/libvtkOpenGL-8.2.so.1: undefined reference to `glDrawBuffer'
To expand, you can simplify this by changing <Slicer-build>VTK\CMake\vtkOpenGL.cmake:134
from
find_library(OPENGL_gl_LIBRARY NAMES GLESv3)
to find_library(OPENGL_gl_LIBRARY NAMES GLESv3 GLESv2)
(GLESv3 is an android specific library name, libGLESv2 on linux actually contains v3 functions)
To disable gl2ps: <Slicer-build>\VTK\ThirdParty\gl2ps\module.cmake <Slicer-build>\VTK\Rendering\GL2PSOpenGL2\module.cmake <Slicer-build>\VTK\IO\ExportOpenGL2\module.cmake
have them return immediately, up to you if you change the if condition or just remove the if condition.
<Slicer-build>VTK\IO\Export\module.cmake
change/remove the if condition so that the depends variable is left blank (equivalent to ANDROID or APPLE_IOS condition met) <Slicer-build>VTK\IO\Export\CMakeLists.txt
comment out or remove vtkGL2PSExporter.cxx
After reading the above, I installed qt5-xcb-private-headers and xcb-util-cursor, then rebuilt everything. Now the slices are displayed in the 2D views.
Ok, so trying to build VTK with GLES doesn’t seem to work. I have no idea how they do it for Android.
vtkRenderingContextOpenGL2 relies on OpenGL defines and functions. @jcfr do you think anyone at Kitware would have any use for this use-case (single-board computers with GPU acceleration)?