Notes on compilation efforts for compiling Slicer for arm64:
Problem: VTK does not compile. Solution:
Set VTK_OPENGL_HAS_EGL and VTK_OPENGL_HAS_ES
In <SlicerDir>/SuperBuild/External_VTK.cmake remove section that has -DModule_vtkGUISupportQtOpenGL:BOOL=ON in it
Edit QVTKOpenGLNativeWidget.cxx to use QOpenGLExtraFunctions instead of QOpenGLFunctions_3_2_Core
Problem: CTKAPPLAUNCHER is a download of amd64 Solution: Overwrite executable <Slicer-build>/CTKAPPLAUNCHER/bin/CTKAppLauncher with compiled executable from <Slicer-build>/CTKAppLauncherLib-build/bin/CTKAppLauncher
For sure, I’m expect it to be a slog, so this post is just for my notes as well as other googlers. Build options are all default unless a note is present in the main post.
Once I built Slicer on arm32. Please see here. I 'm surprised it 's so hard for arm64. Unfortunately, I don 't have any arm64 machine and can 't join in this effort. Good luck.
I doubt it, didn 't even pay attention to that. The build was not usable in practice, VTK GPU rendering did not work, even the slices were not shown in the views. I 'll try a new build paying attention to OpenGL ES some weekend.
Problem: zlib relocation errors Solution: where present, use system zlib (via CMAKE_USE_SYSTEM_ZLIB, USE_BUILTIN_ZLIB, Slicer_USE_SYSTEM_zlib depending on project)
I rebuilt Slicer on Odroid XU4 with a 32-bit ARM CPU. A clean build succeeded with this cmake config line :
#! Setting -DADDITIONAL_CXX_FLAGS -DCMAKE_C_FLAGS -DCMAKE_CXX_FLAGS is not sufficient.
#! export is required for python to build here
export CFLAGS=-I/usr/include/tirpc
export CXXFLAGS=-I/usr/include/tirpc; cmake -DSlicer_VTK_VERSION_MAJOR:INT=8 -DQt5_DIR:PATH=/usr/lib/cmake/Qt5 -DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=0 -DBUILD_TESTING:BOOL=0 -DCMAKE_BUILD_TYPE:STRING=Release -DSlicer_USE_SimpleITK:BOOL=0 …/Slicer
With a quick test, only one functionality is missing : viewing slices in 2D slice views ! With or without mali drivers. Volume rendering, segmention models show up. Slice data is visible in the 3D view, in the zoom preview (bottom left) but not in the RYG views. Would it really be an OpenGL ES problem ? I won’t insist of course, was just an experiment.
Does that machine/setup have OpenGL drivers for the Mali? If so, that simplifies things tremendously. Otherwise your setup is doing Mesa (software) rendering.